RenExciter#

Renewable electrical control (exciter) group.

Common Parameters: u, name, reg

Common Variables: Pref, Qref, wg, Pord

Available models: REECA1, REECA1E, REECA1G

REECA1#

Renewable energy electrical control.

There are two user-defined voltages: Vref0 and Vref1.

  • The difference between the initial bus voltage and Vref0 should be within the voltage deadbands dbd1 and dbd2.

  • If VFLAG=0, the input to the second PI controller will be Vref1.

Regarding the additional reactive current injection during voltage dip:

  • Exercise caution when coordinating the parameters dbd1, dbd2, Vdip, and Vup to avoid unintended responses.

  • Kqv in pu current / pu voltage deviation controls the intensity of reactive power injection. The parameter needs to tuned properly to avoid voltage overshoot.

  • When multiple renewable generators are connected to the same bus, Kqv shall be reduced accordingly to avoid excessive reactive power injection.

Parameters#

Name

Symbol

Description

Default

Unit

Properties

idx

unique device idx

u

\(u\)

connection status

1

bool

name

device name

reg

Renewable generator idx

mandatory

busr

Optional remote bus for voltage control

PFFLAG

Power factor control flag; 1-PF control, 0-Q control

bool

mandatory

VFLAG

Voltage control flag; 1-Q control, 0-V control

bool

mandatory

QFLAG

Q control flag; 1-V or Q control, 0-const. PF or Q

bool

mandatory

PFLAG

P speed-dependency flag; 1-has speed dep., 0-no dep.

bool

mandatory

PQFLAG

P/Q priority flag for I limit; 0-Q priority, 1-P priority

bool

mandatory

Vdip

\(V_{dip}\)

Low V threshold to activate Iqinj logic

0.800

p.u.

Vup

\(V_{up}\)

V threshold above which to activate Iqinj logic

1.200

p.u.

Trv

\(T_{rv}\)

Voltage filter time constant

0.020

dbd1

\(d_{bd1}\)

Lower bound of the voltage deadband (<=0)

-0.020

dbd2

\(d_{bd2}\)

Upper bound of the voltage deadband (>=0)

0.020

Kqv

\(K_{qv}\)

Gain to compute Iqinj from V error (caution!!)

1

Iqh1

\(I_{qh1}\)

Upper limit on Iqinj

999

Iql1

\(I_{ql1}\)

Lower limit on Iqinj

-999

Vref0

\(V_{ref0}\)

User defined Vref (if 0, use initial bus V)

1

Iqfrz

\(I_{qfrz}\)

Hold Iqinj at the value for Thld (>0) seconds following a Vdip

0

Thld

\(T_{hld}\)

Time for which Iqinj is held. Hold at Iqinj if>0; hold at State 1 if<0

0

s

Thld2

\(T_{hld2}\)

Time for which IPMAX is held after voltage dip ends

0

s

Tp

\(T_p\)

Filter time constant for Pe

0.020

s

QMax

\(Q_{max}\)

Upper limit for reactive power regulator

999

QMin

\(Q_{min}\)

Lower limit for reactive power regulator

-999

VMAX

\(V_{max}\)

Upper limit for voltage control

999

VMIN

\(V_{min}\)

Lower limit for voltage control

-999

Kqp

\(K_{qp}\)

Proportional gain for reactive power error

1

Kqi

\(K_{qi}\)

Integral gain for reactive power error

0.100

Kvp

\(K_{vp}\)

Proportional gain for voltage error

1

Kvi

\(K_{vi}\)

Integral gain for voltage error

0.100

Vref1

\(V_{ref1}\)

Voltage ref. if VFLAG=0

1

non_zero

Tiq

\(T_{iq}\)

Filter time constant for Iq

0.020

dPmax

\(d_{Pmax}\)

Power reference max. ramp rate (>0)

999

dPmin

\(d_{Pin}\)

Power reference min. ramp rate (<0)

-999

PMAX

\(P_{max}\)

Max. active power limit > 0

999

PMIN

\(P_{min}\)

Min. active power limit

0

Imax

\(I_{max}\)

Max. apparent current limit

999

current

Tpord

\(T_{pord}\)

Filter time constant for power setpoint

0.020

Vq1

\(V_{q1}\)

Reactive power V-I pair (point 1), voltage

0.200

Iq1

\(I_{q1}\)

Reactive power V-I pair (point 1), current

2

current

Vq2

\(V_{q2}\)

Reactive power V-I pair (point 2), voltage

0.400

Iq2

\(I_{q2}\)

Reactive power V-I pair (point 2), current

4

current

Vq3

\(V_{q3}\)

Reactive power V-I pair (point 3), voltage

0.800

Iq3

\(I_{q3}\)

Reactive power V-I pair (point 3), current

8

current

Vq4

\(V_{q4}\)

Reactive power V-I pair (point 4), voltage

1

Iq4

\(I_{q4}\)

Reactive power V-I pair (point 4), current

10

current

Vp1

\(V_{p1}\)

Active power V-I pair (point 1), voltage

0.200

Ip1

\(I_{p1}\)

Active power V-I pair (point 1), current

2

current

Vp2

\(V_{p2}\)

Active power V-I pair (point 2), voltage

0.400

Ip2

\(I_{p2}\)

Active power V-I pair (point 2), current

4

current

Vp3

\(V_{p3}\)

Active power V-I pair (point 3), voltage

0.800

Ip3

\(I_{p3}\)

Active power V-I pair (point 3), current

8

current

Vp4

\(V_{p4}\)

Active power V-I pair (point 4), voltage

1

Ip4

\(I_{p4}\)

Active power V-I pair (point 4), current

12

current

bus

Retrieved bus idx

gen

Retrieved StaticGen idx

Sn

\(S_n\)

0

Variables#

Name

Symbol

Type

Description

Unit

Properties

s0_y

\(y_{s0}\)

State

State in lag transfer function

v_str

S1_y

\(y_{S_1}\)

State

State in lag transfer function

v_str

PIQ_xi

\(xi_{PIQ}\)

State

Integrator output

v_str

s4_y

\(y_{s_4}\)

State

State in lag transfer function

v_str

pfilt_y

\(y_{P_{filt}}\)

State

State in lag TF

v_str

s5_y

\(y_{s5}\)

State

State in lag TF

v_str

PIV_xi

\(xi_{PIV}\)

State

Integrator output

v_str

Pord

\(Pord\)

AliasState

Alias of s5_y

vp

\(V_{p}\)

Algeb

Sensed lower-capped voltage

v_str

pfaref

\(\Phi_{ref}\)

Algeb

power factor angle ref

rad

v_str

Qref

\(Q_{ref}\)

Algeb

external Q ref

p.u.

v_str

Qcpf

\(Q_{cpf}\)

Algeb

Q calculated from P and power factor

p.u.

v_str

PFsel

\(PFsel\)

Algeb

Output of PFFLAG selector

v_str

Qerr

\(Q_{err}\)

Algeb

Reactive power error

v_str

PIQ_ys

\(ys_{PIQ}\)

Algeb

PI summation before limit

v_str

PIQ_y

\(y_{PIQ}\)

Algeb

PI output

v_str

Vsel_x

\(x_{Vsel}\)

Algeb

Value before limiter

v_str

Vsel_y

\(y_{Vsel}\)

Algeb

Output after limiter and post gain

v_str

Verr

\(V_{err}\)

Algeb

Voltage error (Vref0)

v_str

dbV_y

\(y_{dbV}\)

Algeb

Deadband type 1 output

v_str

Iqinj

\(I_{qinj}\)

Algeb

Additional Iq signal during under- or over-voltage

v_str

wg

\(\omega_{g}\)

Algeb

Drive train generator speed

v_str

Pref

\(P_{ref}\)

Algeb

external P ref

p.u.

v_str

Psel

\(P_{sel}\)

Algeb

Output selection of PFLAG

v_str

VDL1_y

\(y_{V_{DL1}}\)

Algeb

Output of piecewise

v_str

VDL2_y

\(y_{V_{DL2}}\)

Algeb

Output of piecewise

v_str

Ipmax

\(I_{pmax}\)

Algeb

Upper limit on Ipcmd

v_str

Iqmax

\(I_{qmax}\)

Algeb

Upper limit on Iqcmd

v_str

PIV_ys

\(ys_{PIV}\)

Algeb

PI summation before limit

v_str

PIV_y

\(y_{PIV}\)

Algeb

PI output

v_str

Qsel

\(Q_{sel}\)

Algeb

Selection output of QFLAG

v_str

IpHL_x

\(x_{IpHL}\)

Algeb

Value before limiter

v_str

IpHL_y

\(y_{IpHL}\)

Algeb

Output after limiter and post gain

v_str

IqHL_x

\(x_{IqHL}\)

Algeb

Value before limiter

v_str

IqHL_y

\(y_{IqHL}\)

Algeb

Output after limiter and post gain

v_str

a

\(\theta\)

ExtAlgeb

Bus voltage angle

v

\(V_{d}\)

ExtAlgeb

d-axis bus voltage magnitude

Pe

\(Pe\)

ExtAlgeb

Retrieved Pe of RenGen

Qe

\(Qe\)

ExtAlgeb

Retrieved Qe of RenGen

Ipcmd

\(Ipcmd\)

ExtAlgeb

Retrieved Ipcmd of RenGen

Iqcmd

\(Iqcmd\)

ExtAlgeb

Retrieved Iqcmd of RenGen

Initialization Equations#

Name

Symbol

Type

Initial Value

s0_y

\(y_{s0}\)

State

\(V_{d}\)

S1_y

\(y_{S_1}\)

State

\(Pe\)

PIQ_xi

\(xi_{PIQ}\)

State

\(0.0\)

s4_y

\(y_{s_4}\)

State

\(\frac{PFsel}{V_{p}}\)

pfilt_y

\(y_{P_{filt}}\)

State

\(P_{ref}\)

s5_y

\(y_{s5}\)

State

\(P_{sel}\)

PIV_xi

\(xi_{PIV}\)

State

\(- Iqcmd_{0} SWQ_{s1}\)

Pord

\(Pord\)

AliasState

vp

\(V_{p}\)

Algeb

\(V_{d} z_{i}^{VLower} + 0.01 z_{l}^{VLower}\)

pfaref

\(\Phi_{ref}\)

Algeb

\(\Phi_{ref0}\)

Qref

\(Q_{ref}\)

Algeb

\(- q_{ref0}\)

Qcpf

\(Q_{cpf}\)

Algeb

\(Q_{0}\)

PFsel

\(PFsel\)

Algeb

\(Q_{cpf} SWPF_{s1} + Q_{ref} SWPF_{s0}\)

Qerr

\(Q_{err}\)

Algeb

\(PFsel z_{i}^{PFlim} + Q_{max} z_{u}^{PFlim} + Q_{min} z_{l}^{PFlim} - Qe\)

PIQ_ys

\(ys_{PIQ}\)

Algeb

\(K_{qp} Q_{err} SWV_{s1}\)

PIQ_y

\(y_{PIQ}\)

Algeb

\(PIQ_{lim zi} ys_{PIQ} + PIQ_{lim zl} V_{min} + PIQ_{lim zu} V_{max}\)

Vsel_x

\(x_{Vsel}\)

Algeb

\(SWV_{s0} \left(Q_{cpf} SWPF_{s1} + Q_{ref} SWPF_{s0} + V_{ref1}\right) + SWV_{s1} y_{PIQ}\)

Vsel_y

\(y_{Vsel}\)

Algeb

\(V_{max} Vsel_{lim zu} + V_{min} Vsel_{lim zl} + Vsel_{lim zi} x_{Vsel}\)

Verr

\(V_{err}\)

Algeb

\(V_{ref0} - y_{s0}\)

dbV_y

\(y_{dbV}\)

Algeb

\(1.0 dbV_{db zl} \left(V_{err} - d_{bd1}\right) + 1.0 dbV_{db zu} \left(V_{err} - d_{bd2}\right)\)

Iqinj

\(I_{qinj}\)

Algeb

\(K_{qv} y_{dbV} z_{Vdip} + fThld \left(1 - z_{Vdip}\right) \left(I_{qfrz} p_{Thld} + K_{qv} n_{Thld} y_{dbV}\right)\)

wg

\(\omega_{g}\)

Algeb

\(1.0\)

Pref

\(P_{ref}\)

Algeb

\(\frac{P_{0}}{\omega_{g}}\)

Psel

\(P_{sel}\)

Algeb

\(SWP_{s0} y_{P_{filt}} + SWP_{s1} \omega_{g} y_{P_{filt}}\)

VDL1_y

\(y_{V_{DL1}}\)

Algeb

\(\operatorname{FixPiecewise}{\left(\left( I_{q1}, \ V_{q1} \geq y_{s0}\right),\left( I_{q1} + k_{Vq12} \left(- V_{q1} + y_{s0}\right), \ V_{q2} \geq y_{s0}\right),\left( I_{q2} + k_{Vq23} \left(- V_{q2} + y_{s0}\right), \ V_{q3} \geq y_{s0}\right),\left( I_{q3} + k_{Vq34} \left(- V_{q3} + y_{s0}\right), \ V_{q4} \geq y_{s0}\right),\left( I_{q4}, \ \text{True}\right) \right)}\)

VDL2_y

\(y_{V_{DL2}}\)

Algeb

\(\operatorname{FixPiecewise}{\left(\left( I_{p1}, \ V_{p1} \geq y_{s0}\right),\left( I_{p1} + k_{Vp12} \left(- V_{p1} + y_{s0}\right), \ V_{p2} \geq y_{s0}\right),\left( I_{p2} + k_{Vp23} \left(- V_{p2} + y_{s0}\right), \ V_{p3} \geq y_{s0}\right),\left( I_{p3} + k_{Vp34} \left(- V_{p3} + y_{s0}\right), \ V_{p4} \geq y_{s0}\right),\left( I_{p4}, \ \text{True}\right) \right)}\)

Ipmax

\(I_{pmax}\)

Algeb

\(\left(1 - fThld_{2}\right) \left(\sqrt{I_{pmax20,nn}^2} SWPQ_{s0} + SWPQ_{s1} \left(z_{VDL2} \left(I_{maxr} \left(1 - VDL2c\right) + VDL2c y_{V_{DL2}}\right) - 100000000.0 z_{VDL2} + 100000000.0\right)\right)\)

Iqmax

\(I_{qmax}\)

Algeb

\(\sqrt{I_{qmax,nn}^2} SWPQ_{s1} + SWPQ_{s0} \left(z_{VDL1} \left(I_{maxr} \left(1 - VDL1c\right) + VDL1c y_{V_{DL1}}\right) - 100000000.0 z_{VDL1} + 100000000.0\right)\)

PIV_ys

\(ys_{PIV}\)

Algeb

\(- Iqcmd_{0} SWQ_{s1} + K_{vp} SWQ_{s1} \left(- SWV_{s0} y_{s0} + y_{Vsel}\right)\)

PIV_y

\(y_{PIV}\)

Algeb

\(I_{qmax} PIV_{lim zu} + I_{qmin} PIV_{lim zl} + PIV_{lim zi} ys_{PIV}\)

Qsel

\(Q_{sel}\)

Algeb

\(SWQ_{s0} y_{s_4} + SWQ_{s1} y_{PIV}\)

IpHL_x

\(x_{IpHL}\)

Algeb

\(\frac{y_{s5}}{V_{p}}\)

IpHL_y

\(y_{IpHL}\)

Algeb

\(I_{pmax} IpHL_{lim zu} + I_{pmin} IpHL_{lim zl} + IpHL_{lim zi} x_{IpHL}\)

IqHL_x

\(x_{IqHL}\)

Algeb

\(I_{qinj} + Q_{sel}\)

IqHL_y

\(y_{IqHL}\)

Algeb

\(I_{qmax} IqHL_{lim zu} + I_{qmin} IqHL_{lim zl} + IqHL_{lim zi} x_{IqHL}\)

a

\(\theta\)

ExtAlgeb

v

\(V_{d}\)

ExtAlgeb

Pe

\(Pe\)

ExtAlgeb

Qe

\(Qe\)

ExtAlgeb

Ipcmd

\(Ipcmd\)

ExtAlgeb

Iqcmd

\(Iqcmd\)

ExtAlgeb

Differential Equations#

Name

Symbol

Type

RHS of Equation "T x' = f(x, y)"

T (LHS)

s0_y

\(y_{s0}\)

State

\(V_{d} - y_{s0}\)

\(T_{rv}\)

S1_y

\(y_{S_1}\)

State

\(Pe - y_{S_1}\)

\(T_p\)

PIQ_xi

\(xi_{PIQ}\)

State

\(K_{qi} \left(1 - z_{Vdip}\right) \left(Q_{err} SWV_{s1} + 2 y_{PIQ} - 2 ys_{PIQ}\right)\)

s4_y

\(y_{s_4}\)

State

\(\left(1 - z_{Vdip}\right) \left(\frac{PFsel}{V_{p}} - y_{s_4}\right)\)

\(T_{iq}\)

pfilt_y

\(y_{P_{filt}}\)

State

\(P_{ref} - y_{P_{filt}}\)

\(0.02\)

s5_y

\(y_{s5}\)

State

\(\left(1 - z_{Vdip}\right) \left(P_{sel} - y_{s5}\right)\)

\(T_{pord}\)

PIV_xi

\(xi_{PIV}\)

State

\(K_{vi} \left(1 - z_{Vdip}\right) \left(SWQ_{s1} \left(- SWV_{s0} y_{s0} + y_{Vsel}\right) + 2 y_{PIV} - 2 ys_{PIV}\right)\)

Pord

\(Pord\)

AliasState

\(0\)

Algebraic Equations#

Name

Symbol

Type

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

vp

\(V_{p}\)

Algeb

\(V_{d} z_{i}^{VLower} - V_{p} + 0.01 z_{l}^{VLower}\)

pfaref

\(\Phi_{ref}\)

Algeb

\(\Phi_{ref0} - \Phi_{ref}\)

Qref

\(Q_{ref}\)

Algeb

\(- Q_{ref} - q_{ref0}\)

Qcpf

\(Q_{cpf}\)

Algeb

\(\left(1 - z_{1}^{zp}\right) \left(- Q_{cpf} + y_{S_1} \tan{\left(\Phi_{ref} \right)}\right)\)

PFsel

\(PFsel\)

Algeb

\(- PFsel + Q_{cpf} SWPF_{s1} + Q_{ref} SWPF_{s0}\)

Qerr

\(Q_{err}\)

Algeb

\(PFsel z_{i}^{PFlim} - Q_{err} + Q_{max} z_{u}^{PFlim} + Q_{min} z_{l}^{PFlim} - Qe\)

PIQ_ys

\(ys_{PIQ}\)

Algeb

\(\left(1 - z_{Vdip}\right) \left(K_{qp} Q_{err} SWV_{s1} + xi_{PIQ} - ys_{PIQ}\right)\)

PIQ_y

\(y_{PIQ}\)

Algeb

\(\left(1 - z_{Vdip}\right) \left(PIQ_{lim zi} ys_{PIQ} + PIQ_{lim zl} V_{min} + PIQ_{lim zu} V_{max} - y_{PIQ}\right)\)

Vsel_x

\(x_{Vsel}\)

Algeb

\(SWV_{s0} \left(Q_{cpf} SWPF_{s1} + Q_{ref} SWPF_{s0} + V_{ref1}\right) + SWV_{s1} y_{PIQ} - x_{Vsel}\)

Vsel_y

\(y_{Vsel}\)

Algeb

\(V_{max} Vsel_{lim zu} + V_{min} Vsel_{lim zl} + Vsel_{lim zi} x_{Vsel} - y_{Vsel}\)

Verr

\(V_{err}\)

Algeb

\(- V_{err} + V_{ref0} - y_{s0}\)

dbV_y

\(y_{dbV}\)

Algeb

\(1.0 dbV_{db zl} \left(V_{err} - d_{bd1}\right) + 1.0 dbV_{db zu} \left(V_{err} - d_{bd2}\right) - y_{dbV}\)

Iqinj

\(I_{qinj}\)

Algeb

\(- I_{qinj} + K_{qv} y_{dbV} z_{Vdip} + fThld \left(1 - z_{Vdip}\right) \left(I_{qfrz} p_{Thld} + K_{qv} n_{Thld} y_{dbV}\right)\)

wg

\(\omega_{g}\)

Algeb

\(1.0 - \omega_{g}\)

Pref

\(P_{ref}\)

Algeb

\(\frac{P_{0}}{\omega_{g}} - P_{ref}\)

Psel

\(P_{sel}\)

Algeb

\(- P_{sel} + SWP_{s0} y_{P_{filt}} + SWP_{s1} \omega_{g} y_{P_{filt}}\)

VDL1_y

\(y_{V_{DL1}}\)

Algeb

\(- y_{V_{DL1}} + \operatorname{FixPiecewise}{\left(\left( I_{q1}, \ V_{q1} \geq y_{s0}\right),\left( I_{q1} + k_{Vq12} \left(- V_{q1} + y_{s0}\right), \ V_{q2} \geq y_{s0}\right),\left( I_{q2} + k_{Vq23} \left(- V_{q2} + y_{s0}\right), \ V_{q3} \geq y_{s0}\right),\left( I_{q3} + k_{Vq34} \left(- V_{q3} + y_{s0}\right), \ V_{q4} \geq y_{s0}\right),\left( I_{q4}, \ \text{True}\right) \right)}\)

VDL2_y

\(y_{V_{DL2}}\)

Algeb

\(- y_{V_{DL2}} + \operatorname{FixPiecewise}{\left(\left( I_{p1}, \ V_{p1} \geq y_{s0}\right),\left( I_{p1} + k_{Vp12} \left(- V_{p1} + y_{s0}\right), \ V_{p2} \geq y_{s0}\right),\left( I_{p2} + k_{Vp23} \left(- V_{p2} + y_{s0}\right), \ V_{p3} \geq y_{s0}\right),\left( I_{p3} + k_{Vp34} \left(- V_{p3} + y_{s0}\right), \ V_{p4} \geq y_{s0}\right),\left( I_{p4}, \ \text{True}\right) \right)}\)

Ipmax

\(I_{pmax}\)

Algeb

\(- I_{pmax} + Ipmaxh fThld_{2} + \left(1 - fThld_{2}\right) \left(\sqrt{I_{pmax2}^2} SWPQ_{s0} + SWPQ_{s1} \left(z_{VDL2} \left(I_{maxr} \left(1 - VDL2c\right) + VDL2c y_{V_{DL2}}\right) - 100000000.0 z_{VDL2} + 100000000.0\right)\right)\)

Iqmax

\(I_{qmax}\)

Algeb

\(\sqrt{I_{qmax2}^2} SWPQ_{s1} - I_{qmax} + SWPQ_{s0} \left(z_{VDL1} \left(I_{maxr} \left(1 - VDL1c\right) + VDL1c y_{V_{DL1}}\right) - 100000000.0 z_{VDL1} + 100000000.0\right)\)

PIV_ys

\(ys_{PIV}\)

Algeb

\(\left(1 - z_{Vdip}\right) \left(K_{vp} SWQ_{s1} \left(- SWV_{s0} y_{s0} + y_{Vsel}\right) + xi_{PIV} - ys_{PIV}\right)\)

PIV_y

\(y_{PIV}\)

Algeb

\(\left(1 - z_{Vdip}\right) \left(I_{qmax} PIV_{lim zu} + I_{qmin} PIV_{lim zl} + PIV_{lim zi} ys_{PIV} - y_{PIV}\right)\)

Qsel

\(Q_{sel}\)

Algeb

\(- Q_{sel} + SWQ_{s0} y_{s_4} + SWQ_{s1} y_{PIV}\)

IpHL_x

\(x_{IpHL}\)

Algeb

\(- x_{IpHL} + \frac{y_{s5}}{V_{p}}\)

IpHL_y

\(y_{IpHL}\)

Algeb

\(I_{pmax} IpHL_{lim zu} + I_{pmin} IpHL_{lim zl} + IpHL_{lim zi} x_{IpHL} - y_{IpHL}\)

IqHL_x

\(x_{IqHL}\)

Algeb

\(I_{qinj} + Q_{sel} - x_{IqHL}\)

IqHL_y

\(y_{IqHL}\)

Algeb

\(I_{qmax} IqHL_{lim zu} + I_{qmin} IqHL_{lim zl} + IqHL_{lim zi} x_{IqHL} - y_{IqHL}\)

a

\(\theta\)

ExtAlgeb

\(0\)

v

\(V_{d}\)

ExtAlgeb

\(0\)

Pe

\(Pe\)

ExtAlgeb

\(0\)

Qe

\(Qe\)

ExtAlgeb

\(0\)

Ipcmd

\(Ipcmd\)

ExtAlgeb

\(- Ipcmd_{0} + y_{IpHL}\)

Iqcmd

\(Iqcmd\)

ExtAlgeb

\(- Iqcmd_{0} - y_{IqHL}\)

Services#

Name

Symbol

Equation

Type

Ipcmd0

\(Ipcmd0\)

\(\frac{P_{0}}{V_{d}}\)

ConstService

Iqcmd0

\(Iqcmd0\)

\(- \frac{Q_{0}}{V_{d}}\)

ConstService

pfaref0

\(\Phi_{ref0}\)

\(\operatorname{atan}_{2}{\left(Q_{0},P_{0} \right)}\)

ConstService

Volt_dip

\(z_{Vdip}\)

\(1 - Vcmp_{zi}\)

VarService

qref0

\(q_{ref0}\)

\(Iqcmd_{0} SWQ_{s0} \left(V_{d} z_{i}^{VLower} + 0.01 z_{l}^{VLower}\right) + SWQ_{s1} \left(V_{d} - V_{ref1}\right)\)

ConstService

PIQ_flag

\(z^{flag}_{PIQ}\)

\(0\)

EventFlag

s4_flag

\(z^{flag}_{s_4}\)

\(0\)

EventFlag

pThld

\(p_{Thld}\)

\(\operatorname{Indicator}{\left(T_{hld} > 0 \right)}\)

ConstService

nThld

\(n_{Thld}\)

\(\operatorname{Indicator}{\left(T_{hld} < 0 \right)}\)

ConstService

Thld_abs

\(|Thld|\)

\(\left|{T_{hld}}\right|\)

ConstService

fThld

\(fThld\)

\(0\)

ExtendedEvent

s5_flag

\(z^{flag}_{s5}\)

\(0\)

EventFlag

kVq12

\(k_{Vq12}\)

\(\frac{- I_{q1} + I_{q2}}{- V_{q1} + V_{q2}}\)

ConstService

kVq23

\(k_{Vq23}\)

\(\frac{- I_{q2} + I_{q3}}{- V_{q2} + V_{q3}}\)

ConstService

kVq34

\(k_{Vq34}\)

\(\frac{- I_{q3} + I_{q4}}{- V_{q3} + V_{q4}}\)

ConstService

zVDL1

\(z_{VDL1}\)

\(I_{q1} \leq I_{q2} \wedge I_{q2} \leq I_{q3} \wedge I_{q3} \leq I_{q4} \wedge V_{q1} \leq V_{q2} \wedge V_{q2} \leq V_{q3} \wedge V_{q3} \leq V_{q4}\)

ConstService

kVp12

\(k_{Vp12}\)

\(\frac{- I_{p1} + I_{p2}}{- V_{p1} + V_{p2}}\)

ConstService

kVp23

\(k_{Vp23}\)

\(\frac{- I_{p2} + I_{p3}}{- V_{p2} + V_{p3}}\)

ConstService

kVp34

\(k_{Vp34}\)

\(\frac{- I_{p3} + I_{p4}}{- V_{p3} + V_{p4}}\)

ConstService

zVDL2

\(z_{VDL2}\)

\(I_{p1} \leq I_{p2} \wedge I_{p2} \leq I_{p3} \wedge I_{p3} \leq I_{p4} \wedge V_{p1} \leq V_{p2} \wedge V_{p2} \leq V_{p3} \wedge V_{p3} \leq V_{p4}\)

ConstService

fThld2

\(fThld2\)

\(0\)

ExtendedEvent

VDL1c

\(VDL1c\)

\(y_{V_{DL1}} < I_{maxr}\)

VarService

VDL2c

\(VDL2c\)

\(y_{V_{DL2}} < I_{maxr}\)

VarService

Ipmax2sq0

\(I_{pmax20,nn}^2\)

\(\operatorname{FixPiecewise}{\left(\left( 0, \ I_{max}^{2} - Iqcmd_{0}^{2} \leq 0\right),\left( I_{max}^{2} - Iqcmd_{0}^{2}, \ \text{True}\right) \right)}\)

ConstService

Ipmax2sq

\(I_{pmax2}^2\)

\(\operatorname{FixPiecewise}{\left(\left( 0, \ I_{max}^{2} - y_{IqHL}^{2} \leq 0\right),\left( I_{max}^{2} - y_{IqHL}^{2}, \ \text{True}\right) \right)}\)

VarService

Ipmaxh

\(Ipmaxh\)

\(0\)

VarHold

Iqmax2sq0

\(I_{qmax,nn}^2\)

\(\operatorname{FixPiecewise}{\left(\left( 0, \ I_{max}^{2} - Ipcmd_{0}^{2} \leq 0\right),\left( I_{max}^{2} - Ipcmd_{0}^{2}, \ \text{True}\right) \right)}\)

ConstService

Iqmax2sq

\(I_{qmax2}^2\)

\(\operatorname{FixPiecewise}{\left(\left( 0, \ I_{max}^{2} - y_{IpHL}^{2} \leq 0\right),\left( I_{max}^{2} - y_{IpHL}^{2}, \ \text{True}\right) \right)}\)

VarService

Ipmin

\(I_{pmin}\)

\(0.0\)

ConstService

PIV_flag

\(z^{flag}_{PIV}\)

\(0\)

EventFlag

Discretes#

Name

Symbol

Type

Info

SWPF

\(SW_{PF}\)

Switcher

SWV

\(SW_{V}\)

Switcher

SWQ

\(SW_{V}\)

Switcher

SWP

\(SW_{P}\)

Switcher

SWPQ

\(SW_{PQ}\)

Switcher

zp

\(zp\)

IsEqual

Vcmp

\(V_{cmp}\)

Limiter

Voltage dip comparator

VLower

\(VLower\)

Limiter

Limiter for lower voltage cap

PFlim

\(PFlim\)

Limiter

PIQ_lim

\(lim_{PIQ}\)

HardLimiter

Vsel_lim

\(lim_{Vsel}\)

HardLimiter

dbV_db

\(db_{dbV}\)

DeadBand

pfilt_lim

\(lim_{P_{filt}}\)

RateLimiter

Rate limiter in Lag

s5_lim

\(lim_{s5}\)

AntiWindup

Limiter in Lag

PIV_lim

\(lim_{PIV}\)

HardLimiter

IpHL_lim

\(lim_{IpHL}\)

HardLimiter

IqHL_lim

\(lim_{IqHL}\)

HardLimiter

Blocks#

Name

Symbol

Type

Info

s0

\(s0\)

Lag

Voltage filter

S1

\(S_1\)

Lag

Pe filter

PIQ

\(PIQ\)

PITrackAWFreeze

Vsel

\(Vsel\)

GainLimiter

Selection output of VFLAG

s4

\(s_4\)

LagFreeze

Filter for calculated voltage with freeze

dbV

\(dbV\)

DeadBand1

Deadband for voltage error (ref0)

pfilt

\(P_{filt}\)

LagRate

Active power filter with rate limits

s5

\(s5\)

LagAWFreeze

VDL1

\(V_{DL1}\)

Piecewise

Piecewise linear characteristics of Vq-Iq

VDL2

\(V_{DL2}\)

Piecewise

Piecewise linear characteristics of Vp-Ip

PIV

\(PIV\)

PITrackAWFreeze

IpHL

\(IpHL\)

GainLimiter

IqHL

\(IqHL\)

GainLimiter

Config Fields in [REECA1]

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)

kqs

\(K_{qs}\)

2

Q PI controller tracking gain

kvs

\(K_{vs}\)

2

Voltage PI controller tracking gain

tpfilt

\(T_{pfilt}\)

0.020

Time const. for Pref filter

REECA1E#

REGCA1 with inertia emulation and primary frequency droop. Measurements are based on frequency measurement model.

Bus ROCOF obtained from BusROCOF devices.

Parameters#

Name

Symbol

Description

Default

Unit

Properties

idx

unique device idx

u

\(u\)

connection status

1

bool

name

device name

reg

Renewable generator idx

mandatory

busr

Optional remote bus for voltage control

PFFLAG

Power factor control flag; 1-PF control, 0-Q control

bool

mandatory

VFLAG

Voltage control flag; 1-Q control, 0-V control

bool

mandatory

QFLAG

Q control flag; 1-V or Q control, 0-const. PF or Q

bool

mandatory

PFLAG

P speed-dependency flag; 1-has speed dep., 0-no dep.

bool

mandatory

PQFLAG

P/Q priority flag for I limit; 0-Q priority, 1-P priority

bool

mandatory

Vdip

\(V_{dip}\)

Low V threshold to activate Iqinj logic

0.800

p.u.

Vup

\(V_{up}\)

V threshold above which to activate Iqinj logic

1.200

p.u.

Trv

\(T_{rv}\)

Voltage filter time constant

0.020

dbd1

\(d_{bd1}\)

Lower bound of the voltage deadband (<=0)

-0.020

dbd2

\(d_{bd2}\)

Upper bound of the voltage deadband (>=0)

0.020

Kqv

\(K_{qv}\)

Gain to compute Iqinj from V error (caution!!)

1

Iqh1

\(I_{qh1}\)

Upper limit on Iqinj

999

Iql1

\(I_{ql1}\)

Lower limit on Iqinj

-999

Vref0

\(V_{ref0}\)

User defined Vref (if 0, use initial bus V)

1

Iqfrz

\(I_{qfrz}\)

Hold Iqinj at the value for Thld (>0) seconds following a Vdip

0

Thld

\(T_{hld}\)

Time for which Iqinj is held. Hold at Iqinj if>0; hold at State 1 if<0

0

s

Thld2

\(T_{hld2}\)

Time for which IPMAX is held after voltage dip ends

0

s

Tp

\(T_p\)

Filter time constant for Pe

0.020

s

QMax

\(Q_{max}\)

Upper limit for reactive power regulator

999

QMin

\(Q_{min}\)

Lower limit for reactive power regulator

-999

VMAX

\(V_{max}\)

Upper limit for voltage control

999

VMIN

\(V_{min}\)

Lower limit for voltage control

-999

Kqp

\(K_{qp}\)

Proportional gain for reactive power error

1

Kqi

\(K_{qi}\)

Integral gain for reactive power error

0.100

Kvp

\(K_{vp}\)

Proportional gain for voltage error

1

Kvi

\(K_{vi}\)

Integral gain for voltage error

0.100

Vref1

\(V_{ref1}\)

Voltage ref. if VFLAG=0

1

non_zero

Tiq

\(T_{iq}\)

Filter time constant for Iq

0.020

dPmax

\(d_{Pmax}\)

Power reference max. ramp rate (>0)

999

dPmin

\(d_{Pin}\)

Power reference min. ramp rate (<0)

-999

PMAX

\(P_{max}\)

Max. active power limit > 0

999

PMIN

\(P_{min}\)

Min. active power limit

0

Imax

\(I_{max}\)

Max. apparent current limit

999

current

Tpord

\(T_{pord}\)

Filter time constant for power setpoint

0.020

Vq1

\(V_{q1}\)

Reactive power V-I pair (point 1), voltage

0.200

Iq1

\(I_{q1}\)

Reactive power V-I pair (point 1), current

2

current

Vq2

\(V_{q2}\)

Reactive power V-I pair (point 2), voltage

0.400

Iq2

\(I_{q2}\)

Reactive power V-I pair (point 2), current

4

current

Vq3

\(V_{q3}\)

Reactive power V-I pair (point 3), voltage

0.800

Iq3

\(I_{q3}\)

Reactive power V-I pair (point 3), current

8

current

Vq4

\(V_{q4}\)

Reactive power V-I pair (point 4), voltage

1

Iq4

\(I_{q4}\)

Reactive power V-I pair (point 4), current

10

current

Vp1

\(V_{p1}\)

Active power V-I pair (point 1), voltage

0.200

Ip1

\(I_{p1}\)

Active power V-I pair (point 1), current

2

current

Vp2

\(V_{p2}\)

Active power V-I pair (point 2), voltage

0.400

Ip2

\(I_{p2}\)

Active power V-I pair (point 2), current

4

current

Vp3

\(V_{p3}\)

Active power V-I pair (point 3), voltage

0.800

Ip3

\(I_{p3}\)

Active power V-I pair (point 3), current

8

current

Vp4

\(V_{p4}\)

Active power V-I pair (point 4), voltage

1

Ip4

\(I_{p4}\)

Active power V-I pair (point 4), current

12

current

Kf

\(K_{df}\)

gain for frequency deviation

0

Kdf

\(K_{df}\)

gain for rate-of-change of frequency

0

busroc

Optional BusROCOF device idx

bus

Retrieved bus idx

gen

Retrieved StaticGen idx

Sn

\(S_n\)

0

Variables#

Name

Symbol

Type

Description

Unit

Properties

s0_y

\(y_{s0}\)

State

State in lag transfer function

v_str

S1_y

\(y_{S_1}\)

State

State in lag transfer function

v_str

PIQ_xi

\(xi_{PIQ}\)

State

Integrator output

v_str

s4_y

\(y_{s_4}\)

State

State in lag transfer function

v_str

pfilt_y

\(y_{P_{filt}}\)

State

State in lag TF

v_str

s5_y

\(y_{s5}\)

State

State in lag TF

v_str

PIV_xi

\(xi_{PIV}\)

State

Integrator output

v_str

Pord

\(Pord\)

AliasState

Alias of s5_y

vp

\(V_{p}\)

Algeb

Sensed lower-capped voltage

v_str

pfaref

\(\Phi_{ref}\)

Algeb

power factor angle ref

rad

v_str

Qref

\(Q_{ref}\)

Algeb

external Q ref

p.u.

v_str

Qcpf

\(Q_{cpf}\)

Algeb

Q calculated from P and power factor

p.u.

v_str

PFsel

\(PFsel\)

Algeb

Output of PFFLAG selector

v_str

Qerr

\(Q_{err}\)

Algeb

Reactive power error

v_str

PIQ_ys

\(ys_{PIQ}\)

Algeb

PI summation before limit

v_str

PIQ_y

\(y_{PIQ}\)

Algeb

PI output

v_str

Vsel_x

\(x_{Vsel}\)

Algeb

Value before limiter

v_str

Vsel_y

\(y_{Vsel}\)

Algeb

Output after limiter and post gain

v_str

Verr

\(V_{err}\)

Algeb

Voltage error (Vref0)

v_str

dbV_y

\(y_{dbV}\)

Algeb

Deadband type 1 output

v_str

Iqinj

\(I_{qinj}\)

Algeb

Additional Iq signal during under- or over-voltage

v_str

wg

\(\omega_{g}\)

Algeb

Drive train generator speed

v_str

Pref

\(P_{ref}\)

Algeb

external P ref

p.u.

v_str

Psel

\(P_{sel}\)

Algeb

Output selection of PFLAG

v_str

VDL1_y

\(y_{V_{DL1}}\)

Algeb

Output of piecewise

v_str

VDL2_y

\(y_{V_{DL2}}\)

Algeb

Output of piecewise

v_str

Ipmax

\(I_{pmax}\)

Algeb

Upper limit on Ipcmd

v_str

Iqmax

\(I_{qmax}\)

Algeb

Upper limit on Iqcmd

v_str

PIV_ys

\(ys_{PIV}\)

Algeb

PI summation before limit

v_str

PIV_y

\(y_{PIV}\)

Algeb

PI output

v_str

Qsel

\(Q_{sel}\)

Algeb

Selection output of QFLAG

v_str

IpHL_x

\(x_{IpHL}\)

Algeb

Value before limiter

v_str

IpHL_y

\(y_{IpHL}\)

Algeb

Output after limiter and post gain

v_str

IqHL_x

\(x_{IqHL}\)

Algeb

Value before limiter

v_str

IqHL_y

\(y_{IqHL}\)

Algeb

Output after limiter and post gain

v_str

a

\(\theta\)

ExtAlgeb

Bus voltage angle

v

\(V_{d}\)

ExtAlgeb

d-axis bus voltage magnitude

Pe

\(Pe\)

ExtAlgeb

Retrieved Pe of RenGen

Qe

\(Qe\)

ExtAlgeb

Retrieved Qe of RenGen

Ipcmd

\(Ipcmd\)

ExtAlgeb

Retrieved Ipcmd of RenGen

Iqcmd

\(Iqcmd\)

ExtAlgeb

Retrieved Iqcmd of RenGen

df

\(df\)

ExtAlgeb

Bus frequency deviation

dfdt

\(dfdt\)

ExtAlgeb

Bus ROCOF

p.u.

Initialization Equations#

Name

Symbol

Type

Initial Value

s0_y

\(y_{s0}\)

State

\(V_{d}\)

S1_y

\(y_{S_1}\)

State

\(Pe\)

PIQ_xi

\(xi_{PIQ}\)

State

\(0.0\)

s4_y

\(y_{s_4}\)

State

\(\frac{PFsel}{V_{p}}\)

pfilt_y

\(y_{P_{filt}}\)

State

\(P_{ref}\)

s5_y

\(y_{s5}\)

State

\(P_{sel}\)

PIV_xi

\(xi_{PIV}\)

State

\(- Iqcmd_{0} SWQ_{s1}\)

Pord

\(Pord\)

AliasState

vp

\(V_{p}\)

Algeb

\(V_{d} z_{i}^{VLower} + 0.01 z_{l}^{VLower}\)

pfaref

\(\Phi_{ref}\)

Algeb

\(\Phi_{ref0}\)

Qref

\(Q_{ref}\)

Algeb

\(- q_{ref0}\)

Qcpf

\(Q_{cpf}\)

Algeb

\(Q_{0}\)

PFsel

\(PFsel\)

Algeb

\(Q_{cpf} SWPF_{s1} + Q_{ref} SWPF_{s0}\)

Qerr

\(Q_{err}\)

Algeb

\(PFsel z_{i}^{PFlim} + Q_{max} z_{u}^{PFlim} + Q_{min} z_{l}^{PFlim} - Qe\)

PIQ_ys

\(ys_{PIQ}\)

Algeb

\(K_{qp} Q_{err} SWV_{s1}\)

PIQ_y

\(y_{PIQ}\)

Algeb

\(PIQ_{lim zi} ys_{PIQ} + PIQ_{lim zl} V_{min} + PIQ_{lim zu} V_{max}\)

Vsel_x

\(x_{Vsel}\)

Algeb

\(SWV_{s0} \left(Q_{cpf} SWPF_{s1} + Q_{ref} SWPF_{s0} + V_{ref1}\right) + SWV_{s1} y_{PIQ}\)

Vsel_y

\(y_{Vsel}\)

Algeb

\(V_{max} Vsel_{lim zu} + V_{min} Vsel_{lim zl} + Vsel_{lim zi} x_{Vsel}\)

Verr

\(V_{err}\)

Algeb

\(V_{ref0} - y_{s0}\)

dbV_y

\(y_{dbV}\)

Algeb

\(1.0 dbV_{db zl} \left(V_{err} - d_{bd1}\right) + 1.0 dbV_{db zu} \left(V_{err} - d_{bd2}\right)\)

Iqinj

\(I_{qinj}\)

Algeb

\(K_{qv} y_{dbV} z_{Vdip} + fThld \left(1 - z_{Vdip}\right) \left(I_{qfrz} p_{Thld} + K_{qv} n_{Thld} y_{dbV}\right)\)

wg

\(\omega_{g}\)

Algeb

\(1.0\)

Pref

\(P_{ref}\)

Algeb

\(\frac{P_{0}}{\omega_{g}}\)

Psel

\(P_{sel}\)

Algeb

\(SWP_{s0} y_{P_{filt}} + SWP_{s1} \omega_{g} y_{P_{filt}}\)

VDL1_y

\(y_{V_{DL1}}\)

Algeb

\(\operatorname{FixPiecewise}{\left(\left( I_{q1}, \ V_{q1} \geq y_{s0}\right),\left( I_{q1} + k_{Vq12} \left(- V_{q1} + y_{s0}\right), \ V_{q2} \geq y_{s0}\right),\left( I_{q2} + k_{Vq23} \left(- V_{q2} + y_{s0}\right), \ V_{q3} \geq y_{s0}\right),\left( I_{q3} + k_{Vq34} \left(- V_{q3} + y_{s0}\right), \ V_{q4} \geq y_{s0}\right),\left( I_{q4}, \ \text{True}\right) \right)}\)

VDL2_y

\(y_{V_{DL2}}\)

Algeb

\(\operatorname{FixPiecewise}{\left(\left( I_{p1}, \ V_{p1} \geq y_{s0}\right),\left( I_{p1} + k_{Vp12} \left(- V_{p1} + y_{s0}\right), \ V_{p2} \geq y_{s0}\right),\left( I_{p2} + k_{Vp23} \left(- V_{p2} + y_{s0}\right), \ V_{p3} \geq y_{s0}\right),\left( I_{p3} + k_{Vp34} \left(- V_{p3} + y_{s0}\right), \ V_{p4} \geq y_{s0}\right),\left( I_{p4}, \ \text{True}\right) \right)}\)

Ipmax

\(I_{pmax}\)

Algeb

\(\left(1 - fThld_{2}\right) \left(\sqrt{I_{pmax20,nn}^2} SWPQ_{s0} + SWPQ_{s1} \left(z_{VDL2} \left(I_{maxr} \left(1 - VDL2c\right) + VDL2c y_{V_{DL2}}\right) - 100000000.0 z_{VDL2} + 100000000.0\right)\right)\)

Iqmax

\(I_{qmax}\)

Algeb

\(\sqrt{I_{qmax,nn}^2} SWPQ_{s1} + SWPQ_{s0} \left(z_{VDL1} \left(I_{maxr} \left(1 - VDL1c\right) + VDL1c y_{V_{DL1}}\right) - 100000000.0 z_{VDL1} + 100000000.0\right)\)

PIV_ys

\(ys_{PIV}\)

Algeb

\(- Iqcmd_{0} SWQ_{s1} + K_{vp} SWQ_{s1} \left(- SWV_{s0} y_{s0} + y_{Vsel}\right)\)

PIV_y

\(y_{PIV}\)

Algeb

\(I_{qmax} PIV_{lim zu} + I_{qmin} PIV_{lim zl} + PIV_{lim zi} ys_{PIV}\)

Qsel

\(Q_{sel}\)

Algeb

\(SWQ_{s0} y_{s_4} + SWQ_{s1} y_{PIV}\)

IpHL_x

\(x_{IpHL}\)

Algeb

\(\frac{y_{s5}}{V_{p}}\)

IpHL_y

\(y_{IpHL}\)

Algeb

\(I_{pmax} IpHL_{lim zu} + I_{pmin} IpHL_{lim zl} + IpHL_{lim zi} x_{IpHL}\)

IqHL_x

\(x_{IqHL}\)

Algeb

\(I_{qinj} + Q_{sel}\)

IqHL_y

\(y_{IqHL}\)

Algeb

\(I_{qmax} IqHL_{lim zu} + I_{qmin} IqHL_{lim zl} + IqHL_{lim zi} x_{IqHL}\)

a

\(\theta\)

ExtAlgeb

v

\(V_{d}\)

ExtAlgeb

Pe

\(Pe\)

ExtAlgeb

Qe

\(Qe\)

ExtAlgeb

Ipcmd

\(Ipcmd\)

ExtAlgeb

Iqcmd

\(Iqcmd\)

ExtAlgeb

df

\(df\)

ExtAlgeb

dfdt

\(dfdt\)

ExtAlgeb

Differential Equations#

Name

Symbol

Type

RHS of Equation "T x' = f(x, y)"

T (LHS)

s0_y

\(y_{s0}\)

State

\(V_{d} - y_{s0}\)

\(T_{rv}\)

S1_y

\(y_{S_1}\)

State

\(Pe - y_{S_1}\)

\(T_p\)

PIQ_xi

\(xi_{PIQ}\)

State

\(K_{qi} \left(1 - z_{Vdip}\right) \left(Q_{err} SWV_{s1} + 2 y_{PIQ} - 2 ys_{PIQ}\right)\)

s4_y

\(y_{s_4}\)

State

\(\left(1 - z_{Vdip}\right) \left(\frac{PFsel}{V_{p}} - y_{s_4}\right)\)

\(T_{iq}\)

pfilt_y

\(y_{P_{filt}}\)

State

\(P_{ref} - y_{P_{filt}}\)

\(0.02\)

s5_y

\(y_{s5}\)

State

\(\left(1 - z_{Vdip}\right) \left(P_{sel} - y_{s5}\right)\)

\(T_{pord}\)

PIV_xi

\(xi_{PIV}\)

State

\(K_{vi} \left(1 - z_{Vdip}\right) \left(SWQ_{s1} \left(- SWV_{s0} y_{s0} + y_{Vsel}\right) + 2 y_{PIV} - 2 ys_{PIV}\right)\)

Pord

\(Pord\)

AliasState

\(0\)

Algebraic Equations#

Name

Symbol

Type

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

vp

\(V_{p}\)

Algeb

\(V_{d} z_{i}^{VLower} - V_{p} + 0.01 z_{l}^{VLower}\)

pfaref

\(\Phi_{ref}\)

Algeb

\(\Phi_{ref0} - \Phi_{ref}\)

Qref

\(Q_{ref}\)

Algeb

\(- Q_{ref} - q_{ref0}\)

Qcpf

\(Q_{cpf}\)

Algeb

\(\left(1 - z_{1}^{zp}\right) \left(- Q_{cpf} + y_{S_1} \tan{\left(\Phi_{ref} \right)}\right)\)

PFsel

\(PFsel\)

Algeb

\(- PFsel + Q_{cpf} SWPF_{s1} + Q_{ref} SWPF_{s0}\)

Qerr

\(Q_{err}\)

Algeb

\(PFsel z_{i}^{PFlim} - Q_{err} + Q_{max} z_{u}^{PFlim} + Q_{min} z_{l}^{PFlim} - Qe\)

PIQ_ys

\(ys_{PIQ}\)

Algeb

\(\left(1 - z_{Vdip}\right) \left(K_{qp} Q_{err} SWV_{s1} + xi_{PIQ} - ys_{PIQ}\right)\)

PIQ_y

\(y_{PIQ}\)

Algeb

\(\left(1 - z_{Vdip}\right) \left(PIQ_{lim zi} ys_{PIQ} + PIQ_{lim zl} V_{min} + PIQ_{lim zu} V_{max} - y_{PIQ}\right)\)

Vsel_x

\(x_{Vsel}\)

Algeb

\(SWV_{s0} \left(Q_{cpf} SWPF_{s1} + Q_{ref} SWPF_{s0} + V_{ref1}\right) + SWV_{s1} y_{PIQ} - x_{Vsel}\)

Vsel_y

\(y_{Vsel}\)

Algeb

\(V_{max} Vsel_{lim zu} + V_{min} Vsel_{lim zl} + Vsel_{lim zi} x_{Vsel} - y_{Vsel}\)

Verr

\(V_{err}\)

Algeb

\(- V_{err} + V_{ref0} - y_{s0}\)

dbV_y

\(y_{dbV}\)

Algeb

\(1.0 dbV_{db zl} \left(V_{err} - d_{bd1}\right) + 1.0 dbV_{db zu} \left(V_{err} - d_{bd2}\right) - y_{dbV}\)

Iqinj

\(I_{qinj}\)

Algeb

\(- I_{qinj} + K_{qv} y_{dbV} z_{Vdip} + fThld \left(1 - z_{Vdip}\right) \left(I_{qfrz} p_{Thld} + K_{qv} n_{Thld} y_{dbV}\right)\)

wg

\(\omega_{g}\)

Algeb

\(1.0 - \omega_{g}\)

Pref

\(P_{ref}\)

Algeb

\(- K_{df} df - K_{df} dfdt + \frac{P_{0}}{\omega_{g}} - P_{ref}\)

Psel

\(P_{sel}\)

Algeb

\(- P_{sel} + SWP_{s0} y_{P_{filt}} + SWP_{s1} \omega_{g} y_{P_{filt}}\)

VDL1_y

\(y_{V_{DL1}}\)

Algeb

\(- y_{V_{DL1}} + \operatorname{FixPiecewise}{\left(\left( I_{q1}, \ V_{q1} \geq y_{s0}\right),\left( I_{q1} + k_{Vq12} \left(- V_{q1} + y_{s0}\right), \ V_{q2} \geq y_{s0}\right),\left( I_{q2} + k_{Vq23} \left(- V_{q2} + y_{s0}\right), \ V_{q3} \geq y_{s0}\right),\left( I_{q3} + k_{Vq34} \left(- V_{q3} + y_{s0}\right), \ V_{q4} \geq y_{s0}\right),\left( I_{q4}, \ \text{True}\right) \right)}\)

VDL2_y

\(y_{V_{DL2}}\)

Algeb

\(- y_{V_{DL2}} + \operatorname{FixPiecewise}{\left(\left( I_{p1}, \ V_{p1} \geq y_{s0}\right),\left( I_{p1} + k_{Vp12} \left(- V_{p1} + y_{s0}\right), \ V_{p2} \geq y_{s0}\right),\left( I_{p2} + k_{Vp23} \left(- V_{p2} + y_{s0}\right), \ V_{p3} \geq y_{s0}\right),\left( I_{p3} + k_{Vp34} \left(- V_{p3} + y_{s0}\right), \ V_{p4} \geq y_{s0}\right),\left( I_{p4}, \ \text{True}\right) \right)}\)

Ipmax

\(I_{pmax}\)

Algeb

\(- I_{pmax} + Ipmaxh fThld_{2} + \left(1 - fThld_{2}\right) \left(\sqrt{I_{pmax2}^2} SWPQ_{s0} + SWPQ_{s1} \left(z_{VDL2} \left(I_{maxr} \left(1 - VDL2c\right) + VDL2c y_{V_{DL2}}\right) - 100000000.0 z_{VDL2} + 100000000.0\right)\right)\)

Iqmax

\(I_{qmax}\)

Algeb

\(\sqrt{I_{qmax2}^2} SWPQ_{s1} - I_{qmax} + SWPQ_{s0} \left(z_{VDL1} \left(I_{maxr} \left(1 - VDL1c\right) + VDL1c y_{V_{DL1}}\right) - 100000000.0 z_{VDL1} + 100000000.0\right)\)

PIV_ys

\(ys_{PIV}\)

Algeb

\(\left(1 - z_{Vdip}\right) \left(K_{vp} SWQ_{s1} \left(- SWV_{s0} y_{s0} + y_{Vsel}\right) + xi_{PIV} - ys_{PIV}\right)\)

PIV_y

\(y_{PIV}\)

Algeb

\(\left(1 - z_{Vdip}\right) \left(I_{qmax} PIV_{lim zu} + I_{qmin} PIV_{lim zl} + PIV_{lim zi} ys_{PIV} - y_{PIV}\right)\)

Qsel

\(Q_{sel}\)

Algeb

\(- Q_{sel} + SWQ_{s0} y_{s_4} + SWQ_{s1} y_{PIV}\)

IpHL_x

\(x_{IpHL}\)

Algeb

\(- x_{IpHL} + \frac{y_{s5}}{V_{p}}\)

IpHL_y

\(y_{IpHL}\)

Algeb

\(I_{pmax} IpHL_{lim zu} + I_{pmin} IpHL_{lim zl} + IpHL_{lim zi} x_{IpHL} - y_{IpHL}\)

IqHL_x

\(x_{IqHL}\)

Algeb

\(I_{qinj} + Q_{sel} - x_{IqHL}\)

IqHL_y

\(y_{IqHL}\)

Algeb

\(I_{qmax} IqHL_{lim zu} + I_{qmin} IqHL_{lim zl} + IqHL_{lim zi} x_{IqHL} - y_{IqHL}\)

a

\(\theta\)

ExtAlgeb

\(0\)

v

\(V_{d}\)

ExtAlgeb

\(0\)

Pe

\(Pe\)

ExtAlgeb

\(0\)

Qe

\(Qe\)

ExtAlgeb

\(0\)

Ipcmd

\(Ipcmd\)

ExtAlgeb

\(- Ipcmd_{0} + y_{IpHL}\)

Iqcmd

\(Iqcmd\)

ExtAlgeb

\(- Iqcmd_{0} - y_{IqHL}\)

df

\(df\)

ExtAlgeb

\(0\)

dfdt

\(dfdt\)

ExtAlgeb

\(0\)

Services#

Name

Symbol

Equation

Type

Ipcmd0

\(Ipcmd0\)

\(\frac{P_{0}}{V_{d}}\)

ConstService

Iqcmd0

\(Iqcmd0\)

\(- \frac{Q_{0}}{V_{d}}\)

ConstService

pfaref0

\(\Phi_{ref0}\)

\(\operatorname{atan}_{2}{\left(Q_{0},P_{0} \right)}\)

ConstService

Volt_dip

\(z_{Vdip}\)

\(1 - Vcmp_{zi}\)

VarService

qref0

\(q_{ref0}\)

\(Iqcmd_{0} SWQ_{s0} \left(V_{d} z_{i}^{VLower} + 0.01 z_{l}^{VLower}\right) + SWQ_{s1} \left(V_{d} - V_{ref1}\right)\)

ConstService

PIQ_flag

\(z^{flag}_{PIQ}\)

\(0\)

EventFlag

s4_flag

\(z^{flag}_{s_4}\)

\(0\)

EventFlag

pThld

\(p_{Thld}\)

\(\operatorname{Indicator}{\left(T_{hld} > 0 \right)}\)

ConstService

nThld

\(n_{Thld}\)

\(\operatorname{Indicator}{\left(T_{hld} < 0 \right)}\)

ConstService

Thld_abs

\(|Thld|\)

\(\left|{T_{hld}}\right|\)

ConstService

fThld

\(fThld\)

\(0\)

ExtendedEvent

s5_flag

\(z^{flag}_{s5}\)

\(0\)

EventFlag

kVq12

\(k_{Vq12}\)

\(\frac{- I_{q1} + I_{q2}}{- V_{q1} + V_{q2}}\)

ConstService

kVq23

\(k_{Vq23}\)

\(\frac{- I_{q2} + I_{q3}}{- V_{q2} + V_{q3}}\)

ConstService

kVq34

\(k_{Vq34}\)

\(\frac{- I_{q3} + I_{q4}}{- V_{q3} + V_{q4}}\)

ConstService

zVDL1

\(z_{VDL1}\)

\(I_{q1} \leq I_{q2} \wedge I_{q2} \leq I_{q3} \wedge I_{q3} \leq I_{q4} \wedge V_{q1} \leq V_{q2} \wedge V_{q2} \leq V_{q3} \wedge V_{q3} \leq V_{q4}\)

ConstService

kVp12

\(k_{Vp12}\)

\(\frac{- I_{p1} + I_{p2}}{- V_{p1} + V_{p2}}\)

ConstService

kVp23

\(k_{Vp23}\)

\(\frac{- I_{p2} + I_{p3}}{- V_{p2} + V_{p3}}\)

ConstService

kVp34

\(k_{Vp34}\)

\(\frac{- I_{p3} + I_{p4}}{- V_{p3} + V_{p4}}\)

ConstService

zVDL2

\(z_{VDL2}\)

\(I_{p1} \leq I_{p2} \wedge I_{p2} \leq I_{p3} \wedge I_{p3} \leq I_{p4} \wedge V_{p1} \leq V_{p2} \wedge V_{p2} \leq V_{p3} \wedge V_{p3} \leq V_{p4}\)

ConstService

fThld2

\(fThld2\)

\(0\)

ExtendedEvent

VDL1c

\(VDL1c\)

\(y_{V_{DL1}} < I_{maxr}\)

VarService

VDL2c

\(VDL2c\)

\(y_{V_{DL2}} < I_{maxr}\)

VarService

Ipmax2sq0

\(I_{pmax20,nn}^2\)

\(\operatorname{FixPiecewise}{\left(\left( 0, \ I_{max}^{2} - Iqcmd_{0}^{2} \leq 0\right),\left( I_{max}^{2} - Iqcmd_{0}^{2}, \ \text{True}\right) \right)}\)

ConstService

Ipmax2sq

\(I_{pmax2}^2\)

\(\operatorname{FixPiecewise}{\left(\left( 0, \ I_{max}^{2} - y_{IqHL}^{2} \leq 0\right),\left( I_{max}^{2} - y_{IqHL}^{2}, \ \text{True}\right) \right)}\)

VarService

Ipmaxh

\(Ipmaxh\)

\(0\)

VarHold

Iqmax2sq0

\(I_{qmax,nn}^2\)

\(\operatorname{FixPiecewise}{\left(\left( 0, \ I_{max}^{2} - Ipcmd_{0}^{2} \leq 0\right),\left( I_{max}^{2} - Ipcmd_{0}^{2}, \ \text{True}\right) \right)}\)

ConstService

Iqmax2sq

\(I_{qmax2}^2\)

\(\operatorname{FixPiecewise}{\left(\left( 0, \ I_{max}^{2} - y_{IpHL}^{2} \leq 0\right),\left( I_{max}^{2} - y_{IpHL}^{2}, \ \text{True}\right) \right)}\)

VarService

Ipmin

\(I_{pmin}\)

\(0.0\)

ConstService

PIV_flag

\(z^{flag}_{PIV}\)

\(0\)

EventFlag

Discretes#

Name

Symbol

Type

Info

SWPF

\(SW_{PF}\)

Switcher

SWV

\(SW_{V}\)

Switcher

SWQ

\(SW_{V}\)

Switcher

SWP

\(SW_{P}\)

Switcher

SWPQ

\(SW_{PQ}\)

Switcher

zp

\(zp\)

IsEqual

Vcmp

\(V_{cmp}\)

Limiter

Voltage dip comparator

VLower

\(VLower\)

Limiter

Limiter for lower voltage cap

PFlim

\(PFlim\)

Limiter

PIQ_lim

\(lim_{PIQ}\)

HardLimiter

Vsel_lim

\(lim_{Vsel}\)

HardLimiter

dbV_db

\(db_{dbV}\)

DeadBand

pfilt_lim

\(lim_{P_{filt}}\)

RateLimiter

Rate limiter in Lag

s5_lim

\(lim_{s5}\)

AntiWindup

Limiter in Lag

PIV_lim

\(lim_{PIV}\)

HardLimiter

IpHL_lim

\(lim_{IpHL}\)

HardLimiter

IqHL_lim

\(lim_{IqHL}\)

HardLimiter

Blocks#

Name

Symbol

Type

Info

s0

\(s0\)

Lag

Voltage filter

S1

\(S_1\)

Lag

Pe filter

PIQ

\(PIQ\)

PITrackAWFreeze

Vsel

\(Vsel\)

GainLimiter

Selection output of VFLAG

s4

\(s_4\)

LagFreeze

Filter for calculated voltage with freeze

dbV

\(dbV\)

DeadBand1

Deadband for voltage error (ref0)

pfilt

\(P_{filt}\)

LagRate

Active power filter with rate limits

s5

\(s5\)

LagAWFreeze

VDL1

\(V_{DL1}\)

Piecewise

Piecewise linear characteristics of Vq-Iq

VDL2

\(V_{DL2}\)

Piecewise

Piecewise linear characteristics of Vp-Ip

PIV

\(PIV\)

PITrackAWFreeze

IpHL

\(IpHL\)

GainLimiter

IqHL

\(IqHL\)

GainLimiter

Config Fields in [REECA1E]

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)

kqs

\(K_{qs}\)

2

Q PI controller tracking gain

kvs

\(K_{vs}\)

2

Voltage PI controller tracking gain

tpfilt

\(T_{pfilt}\)

0.020

Time const. for Pref filter

REECA1G#

REECA1G is a variant of REECA1E.

REECA1G uses speed from synchronous generators.

The application of this model is limited because it is uncommon to connect a SynGen on the same bus as a RenGen.

Parameters#

Name

Symbol

Description

Default

Unit

Properties

idx

unique device idx

u

\(u\)

connection status

1

bool

name

device name

reg

Renewable generator idx

mandatory

busr

Optional remote bus for voltage control

PFFLAG

Power factor control flag; 1-PF control, 0-Q control

bool

mandatory

VFLAG

Voltage control flag; 1-Q control, 0-V control

bool

mandatory

QFLAG

Q control flag; 1-V or Q control, 0-const. PF or Q

bool

mandatory

PFLAG

P speed-dependency flag; 1-has speed dep., 0-no dep.

bool

mandatory

PQFLAG

P/Q priority flag for I limit; 0-Q priority, 1-P priority

bool

mandatory

Vdip

\(V_{dip}\)

Low V threshold to activate Iqinj logic

0.800

p.u.

Vup

\(V_{up}\)

V threshold above which to activate Iqinj logic

1.200

p.u.

Trv

\(T_{rv}\)

Voltage filter time constant

0.020

dbd1

\(d_{bd1}\)

Lower bound of the voltage deadband (<=0)

-0.020

dbd2

\(d_{bd2}\)

Upper bound of the voltage deadband (>=0)

0.020

Kqv

\(K_{qv}\)

Gain to compute Iqinj from V error (caution!!)

1

Iqh1

\(I_{qh1}\)

Upper limit on Iqinj

999

Iql1

\(I_{ql1}\)

Lower limit on Iqinj

-999

Vref0

\(V_{ref0}\)

User defined Vref (if 0, use initial bus V)

1

Iqfrz

\(I_{qfrz}\)

Hold Iqinj at the value for Thld (>0) seconds following a Vdip

0

Thld

\(T_{hld}\)

Time for which Iqinj is held. Hold at Iqinj if>0; hold at State 1 if<0

0

s

Thld2

\(T_{hld2}\)

Time for which IPMAX is held after voltage dip ends

0

s

Tp

\(T_p\)

Filter time constant for Pe

0.020

s

QMax

\(Q_{max}\)

Upper limit for reactive power regulator

999

QMin

\(Q_{min}\)

Lower limit for reactive power regulator

-999

VMAX

\(V_{max}\)

Upper limit for voltage control

999

VMIN

\(V_{min}\)

Lower limit for voltage control

-999

Kqp

\(K_{qp}\)

Proportional gain for reactive power error

1

Kqi

\(K_{qi}\)

Integral gain for reactive power error

0.100

Kvp

\(K_{vp}\)

Proportional gain for voltage error

1

Kvi

\(K_{vi}\)

Integral gain for voltage error

0.100

Vref1

\(V_{ref1}\)

Voltage ref. if VFLAG=0

1

non_zero

Tiq

\(T_{iq}\)

Filter time constant for Iq

0.020

dPmax

\(d_{Pmax}\)

Power reference max. ramp rate (>0)

999

dPmin

\(d_{Pin}\)

Power reference min. ramp rate (<0)

-999

PMAX

\(P_{max}\)

Max. active power limit > 0

999

PMIN

\(P_{min}\)

Min. active power limit

0

Imax

\(I_{max}\)

Max. apparent current limit

999

current

Tpord

\(T_{pord}\)

Filter time constant for power setpoint

0.020

Vq1

\(V_{q1}\)

Reactive power V-I pair (point 1), voltage

0.200

Iq1

\(I_{q1}\)

Reactive power V-I pair (point 1), current

2

current

Vq2

\(V_{q2}\)

Reactive power V-I pair (point 2), voltage

0.400

Iq2

\(I_{q2}\)

Reactive power V-I pair (point 2), current

4

current

Vq3

\(V_{q3}\)

Reactive power V-I pair (point 3), voltage

0.800

Iq3

\(I_{q3}\)

Reactive power V-I pair (point 3), current

8

current

Vq4

\(V_{q4}\)

Reactive power V-I pair (point 4), voltage

1

Iq4

\(I_{q4}\)

Reactive power V-I pair (point 4), current

10

current

Vp1

\(V_{p1}\)

Active power V-I pair (point 1), voltage

0.200

Ip1

\(I_{p1}\)

Active power V-I pair (point 1), current

2

current

Vp2

\(V_{p2}\)

Active power V-I pair (point 2), voltage

0.400

Ip2

\(I_{p2}\)

Active power V-I pair (point 2), current

4

current

Vp3

\(V_{p3}\)

Active power V-I pair (point 3), voltage

0.800

Ip3

\(I_{p3}\)

Active power V-I pair (point 3), current

8

current

Vp4

\(V_{p4}\)

Active power V-I pair (point 4), voltage

1

Ip4

\(I_{p4}\)

Active power V-I pair (point 4), current

12

current

Kf

\(K_{df}\)

gain for frequency deviation

0

sg

synchronous gen idx

mandatory

bus

Retrieved bus idx

gen

Retrieved StaticGen idx

Sn

\(S_n\)

0

Variables#

Name

Symbol

Type

Description

Unit

Properties

s0_y

\(y_{s0}\)

State

State in lag transfer function

v_str

S1_y

\(y_{S_1}\)

State

State in lag transfer function

v_str

PIQ_xi

\(xi_{PIQ}\)

State

Integrator output

v_str

s4_y

\(y_{s_4}\)

State

State in lag transfer function

v_str

pfilt_y

\(y_{P_{filt}}\)

State

State in lag TF

v_str

s5_y

\(y_{s5}\)

State

State in lag TF

v_str

PIV_xi

\(xi_{PIV}\)

State

Integrator output

v_str

Pord

\(Pord\)

AliasState

Alias of s5_y

omega

\(\omega\)

ExtState

generator speed

pu

vp

\(V_{p}\)

Algeb

Sensed lower-capped voltage

v_str

pfaref

\(\Phi_{ref}\)

Algeb

power factor angle ref

rad

v_str

Qref

\(Q_{ref}\)

Algeb

external Q ref

p.u.

v_str

Qcpf

\(Q_{cpf}\)

Algeb

Q calculated from P and power factor

p.u.

v_str

PFsel

\(PFsel\)

Algeb

Output of PFFLAG selector

v_str

Qerr

\(Q_{err}\)

Algeb

Reactive power error

v_str

PIQ_ys

\(ys_{PIQ}\)

Algeb

PI summation before limit

v_str

PIQ_y

\(y_{PIQ}\)

Algeb

PI output

v_str

Vsel_x

\(x_{Vsel}\)

Algeb

Value before limiter

v_str

Vsel_y

\(y_{Vsel}\)

Algeb

Output after limiter and post gain

v_str

Verr

\(V_{err}\)

Algeb

Voltage error (Vref0)

v_str

dbV_y

\(y_{dbV}\)

Algeb

Deadband type 1 output

v_str

Iqinj

\(I_{qinj}\)

Algeb

Additional Iq signal during under- or over-voltage

v_str

wg

\(\omega_{g}\)

Algeb

Drive train generator speed

v_str

Pref

\(P_{ref}\)

Algeb

external P ref

p.u.

v_str

Psel

\(P_{sel}\)

Algeb

Output selection of PFLAG

v_str

VDL1_y

\(y_{V_{DL1}}\)

Algeb

Output of piecewise

v_str

VDL2_y

\(y_{V_{DL2}}\)

Algeb

Output of piecewise

v_str

Ipmax

\(I_{pmax}\)

Algeb

Upper limit on Ipcmd

v_str

Iqmax

\(I_{qmax}\)

Algeb

Upper limit on Iqcmd

v_str

PIV_ys

\(ys_{PIV}\)

Algeb

PI summation before limit

v_str

PIV_y

\(y_{PIV}\)

Algeb

PI output

v_str

Qsel

\(Q_{sel}\)

Algeb

Selection output of QFLAG

v_str

IpHL_x

\(x_{IpHL}\)

Algeb

Value before limiter

v_str

IpHL_y

\(y_{IpHL}\)

Algeb

Output after limiter and post gain

v_str

IqHL_x

\(x_{IqHL}\)

Algeb

Value before limiter

v_str

IqHL_y

\(y_{IqHL}\)

Algeb

Output after limiter and post gain

v_str

a

\(\theta\)

ExtAlgeb

Bus voltage angle

v

\(V_{d}\)

ExtAlgeb

d-axis bus voltage magnitude

Pe

\(Pe\)

ExtAlgeb

Retrieved Pe of RenGen

Qe

\(Qe\)

ExtAlgeb

Retrieved Qe of RenGen

Ipcmd

\(Ipcmd\)

ExtAlgeb

Retrieved Ipcmd of RenGen

Iqcmd

\(Iqcmd\)

ExtAlgeb

Retrieved Iqcmd of RenGen

Initialization Equations#

Name

Symbol

Type

Initial Value

s0_y

\(y_{s0}\)

State

\(V_{d}\)

S1_y

\(y_{S_1}\)

State

\(Pe\)

PIQ_xi

\(xi_{PIQ}\)

State

\(0.0\)

s4_y

\(y_{s_4}\)

State

\(\frac{PFsel}{V_{p}}\)

pfilt_y

\(y_{P_{filt}}\)

State

\(P_{ref}\)

s5_y

\(y_{s5}\)

State

\(P_{sel}\)

PIV_xi

\(xi_{PIV}\)

State

\(- Iqcmd_{0} SWQ_{s1}\)

Pord

\(Pord\)

AliasState

omega

\(\omega\)

ExtState

vp

\(V_{p}\)

Algeb

\(V_{d} z_{i}^{VLower} + 0.01 z_{l}^{VLower}\)

pfaref

\(\Phi_{ref}\)

Algeb

\(\Phi_{ref0}\)

Qref

\(Q_{ref}\)

Algeb

\(- q_{ref0}\)

Qcpf

\(Q_{cpf}\)

Algeb

\(Q_{0}\)

PFsel

\(PFsel\)

Algeb

\(Q_{cpf} SWPF_{s1} + Q_{ref} SWPF_{s0}\)

Qerr

\(Q_{err}\)

Algeb

\(PFsel z_{i}^{PFlim} + Q_{max} z_{u}^{PFlim} + Q_{min} z_{l}^{PFlim} - Qe\)

PIQ_ys

\(ys_{PIQ}\)

Algeb

\(K_{qp} Q_{err} SWV_{s1}\)

PIQ_y

\(y_{PIQ}\)

Algeb

\(PIQ_{lim zi} ys_{PIQ} + PIQ_{lim zl} V_{min} + PIQ_{lim zu} V_{max}\)

Vsel_x

\(x_{Vsel}\)

Algeb

\(SWV_{s0} \left(Q_{cpf} SWPF_{s1} + Q_{ref} SWPF_{s0} + V_{ref1}\right) + SWV_{s1} y_{PIQ}\)

Vsel_y

\(y_{Vsel}\)

Algeb

\(V_{max} Vsel_{lim zu} + V_{min} Vsel_{lim zl} + Vsel_{lim zi} x_{Vsel}\)

Verr

\(V_{err}\)

Algeb

\(V_{ref0} - y_{s0}\)

dbV_y

\(y_{dbV}\)

Algeb

\(1.0 dbV_{db zl} \left(V_{err} - d_{bd1}\right) + 1.0 dbV_{db zu} \left(V_{err} - d_{bd2}\right)\)

Iqinj

\(I_{qinj}\)

Algeb

\(K_{qv} y_{dbV} z_{Vdip} + fThld \left(1 - z_{Vdip}\right) \left(I_{qfrz} p_{Thld} + K_{qv} n_{Thld} y_{dbV}\right)\)

wg

\(\omega_{g}\)

Algeb

\(1.0\)

Pref

\(P_{ref}\)

Algeb

\(\frac{P_{0}}{\omega_{g}}\)

Psel

\(P_{sel}\)

Algeb

\(SWP_{s0} y_{P_{filt}} + SWP_{s1} \omega_{g} y_{P_{filt}}\)

VDL1_y

\(y_{V_{DL1}}\)

Algeb

\(\operatorname{FixPiecewise}{\left(\left( I_{q1}, \ V_{q1} \geq y_{s0}\right),\left( I_{q1} + k_{Vq12} \left(- V_{q1} + y_{s0}\right), \ V_{q2} \geq y_{s0}\right),\left( I_{q2} + k_{Vq23} \left(- V_{q2} + y_{s0}\right), \ V_{q3} \geq y_{s0}\right),\left( I_{q3} + k_{Vq34} \left(- V_{q3} + y_{s0}\right), \ V_{q4} \geq y_{s0}\right),\left( I_{q4}, \ \text{True}\right) \right)}\)

VDL2_y

\(y_{V_{DL2}}\)

Algeb

\(\operatorname{FixPiecewise}{\left(\left( I_{p1}, \ V_{p1} \geq y_{s0}\right),\left( I_{p1} + k_{Vp12} \left(- V_{p1} + y_{s0}\right), \ V_{p2} \geq y_{s0}\right),\left( I_{p2} + k_{Vp23} \left(- V_{p2} + y_{s0}\right), \ V_{p3} \geq y_{s0}\right),\left( I_{p3} + k_{Vp34} \left(- V_{p3} + y_{s0}\right), \ V_{p4} \geq y_{s0}\right),\left( I_{p4}, \ \text{True}\right) \right)}\)

Ipmax

\(I_{pmax}\)

Algeb

\(\left(1 - fThld_{2}\right) \left(\sqrt{I_{pmax20,nn}^2} SWPQ_{s0} + SWPQ_{s1} \left(z_{VDL2} \left(I_{maxr} \left(1 - VDL2c\right) + VDL2c y_{V_{DL2}}\right) - 100000000.0 z_{VDL2} + 100000000.0\right)\right)\)

Iqmax

\(I_{qmax}\)

Algeb

\(\sqrt{I_{qmax,nn}^2} SWPQ_{s1} + SWPQ_{s0} \left(z_{VDL1} \left(I_{maxr} \left(1 - VDL1c\right) + VDL1c y_{V_{DL1}}\right) - 100000000.0 z_{VDL1} + 100000000.0\right)\)

PIV_ys

\(ys_{PIV}\)

Algeb

\(- Iqcmd_{0} SWQ_{s1} + K_{vp} SWQ_{s1} \left(- SWV_{s0} y_{s0} + y_{Vsel}\right)\)

PIV_y

\(y_{PIV}\)

Algeb

\(I_{qmax} PIV_{lim zu} + I_{qmin} PIV_{lim zl} + PIV_{lim zi} ys_{PIV}\)

Qsel

\(Q_{sel}\)

Algeb

\(SWQ_{s0} y_{s_4} + SWQ_{s1} y_{PIV}\)

IpHL_x

\(x_{IpHL}\)

Algeb

\(\frac{y_{s5}}{V_{p}}\)

IpHL_y

\(y_{IpHL}\)

Algeb

\(I_{pmax} IpHL_{lim zu} + I_{pmin} IpHL_{lim zl} + IpHL_{lim zi} x_{IpHL}\)

IqHL_x

\(x_{IqHL}\)

Algeb

\(I_{qinj} + Q_{sel}\)

IqHL_y

\(y_{IqHL}\)

Algeb

\(I_{qmax} IqHL_{lim zu} + I_{qmin} IqHL_{lim zl} + IqHL_{lim zi} x_{IqHL}\)

a

\(\theta\)

ExtAlgeb

v

\(V_{d}\)

ExtAlgeb

Pe

\(Pe\)

ExtAlgeb

Qe

\(Qe\)

ExtAlgeb

Ipcmd

\(Ipcmd\)

ExtAlgeb

Iqcmd

\(Iqcmd\)

ExtAlgeb

Differential Equations#

Name

Symbol

Type

RHS of Equation "T x' = f(x, y)"

T (LHS)

s0_y

\(y_{s0}\)

State

\(V_{d} - y_{s0}\)

\(T_{rv}\)

S1_y

\(y_{S_1}\)

State

\(Pe - y_{S_1}\)

\(T_p\)

PIQ_xi

\(xi_{PIQ}\)

State

\(K_{qi} \left(1 - z_{Vdip}\right) \left(Q_{err} SWV_{s1} + 2 y_{PIQ} - 2 ys_{PIQ}\right)\)

s4_y

\(y_{s_4}\)

State

\(\left(1 - z_{Vdip}\right) \left(\frac{PFsel}{V_{p}} - y_{s_4}\right)\)

\(T_{iq}\)

pfilt_y

\(y_{P_{filt}}\)

State

\(P_{ref} - y_{P_{filt}}\)

\(0.02\)

s5_y

\(y_{s5}\)

State

\(\left(1 - z_{Vdip}\right) \left(P_{sel} - y_{s5}\right)\)

\(T_{pord}\)

PIV_xi

\(xi_{PIV}\)

State

\(K_{vi} \left(1 - z_{Vdip}\right) \left(SWQ_{s1} \left(- SWV_{s0} y_{s0} + y_{Vsel}\right) + 2 y_{PIV} - 2 ys_{PIV}\right)\)

Pord

\(Pord\)

AliasState

\(0\)

omega

\(\omega\)

ExtState

\(0\)

Algebraic Equations#

Name

Symbol

Type

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

vp

\(V_{p}\)

Algeb

\(V_{d} z_{i}^{VLower} - V_{p} + 0.01 z_{l}^{VLower}\)

pfaref

\(\Phi_{ref}\)

Algeb

\(\Phi_{ref0} - \Phi_{ref}\)

Qref

\(Q_{ref}\)

Algeb

\(- Q_{ref} - q_{ref0}\)

Qcpf

\(Q_{cpf}\)

Algeb

\(\left(1 - z_{1}^{zp}\right) \left(- Q_{cpf} + y_{S_1} \tan{\left(\Phi_{ref} \right)}\right)\)

PFsel

\(PFsel\)

Algeb

\(- PFsel + Q_{cpf} SWPF_{s1} + Q_{ref} SWPF_{s0}\)

Qerr

\(Q_{err}\)

Algeb

\(PFsel z_{i}^{PFlim} - Q_{err} + Q_{max} z_{u}^{PFlim} + Q_{min} z_{l}^{PFlim} - Qe\)

PIQ_ys

\(ys_{PIQ}\)

Algeb

\(\left(1 - z_{Vdip}\right) \left(K_{qp} Q_{err} SWV_{s1} + xi_{PIQ} - ys_{PIQ}\right)\)

PIQ_y

\(y_{PIQ}\)

Algeb

\(\left(1 - z_{Vdip}\right) \left(PIQ_{lim zi} ys_{PIQ} + PIQ_{lim zl} V_{min} + PIQ_{lim zu} V_{max} - y_{PIQ}\right)\)

Vsel_x

\(x_{Vsel}\)

Algeb

\(SWV_{s0} \left(Q_{cpf} SWPF_{s1} + Q_{ref} SWPF_{s0} + V_{ref1}\right) + SWV_{s1} y_{PIQ} - x_{Vsel}\)

Vsel_y

\(y_{Vsel}\)

Algeb

\(V_{max} Vsel_{lim zu} + V_{min} Vsel_{lim zl} + Vsel_{lim zi} x_{Vsel} - y_{Vsel}\)

Verr

\(V_{err}\)

Algeb

\(- V_{err} + V_{ref0} - y_{s0}\)

dbV_y

\(y_{dbV}\)

Algeb

\(1.0 dbV_{db zl} \left(V_{err} - d_{bd1}\right) + 1.0 dbV_{db zu} \left(V_{err} - d_{bd2}\right) - y_{dbV}\)

Iqinj

\(I_{qinj}\)

Algeb

\(- I_{qinj} + K_{qv} y_{dbV} z_{Vdip} + fThld \left(1 - z_{Vdip}\right) \left(I_{qfrz} p_{Thld} + K_{qv} n_{Thld} y_{dbV}\right)\)

wg

\(\omega_{g}\)

Algeb

\(1.0 - \omega_{g}\)

Pref

\(P_{ref}\)

Algeb

\(- K_{df} \left(\omega - 1\right) + \frac{P_{0}}{\omega_{g}} - P_{ref}\)

Psel

\(P_{sel}\)

Algeb

\(- P_{sel} + SWP_{s0} y_{P_{filt}} + SWP_{s1} \omega_{g} y_{P_{filt}}\)

VDL1_y

\(y_{V_{DL1}}\)

Algeb

\(- y_{V_{DL1}} + \operatorname{FixPiecewise}{\left(\left( I_{q1}, \ V_{q1} \geq y_{s0}\right),\left( I_{q1} + k_{Vq12} \left(- V_{q1} + y_{s0}\right), \ V_{q2} \geq y_{s0}\right),\left( I_{q2} + k_{Vq23} \left(- V_{q2} + y_{s0}\right), \ V_{q3} \geq y_{s0}\right),\left( I_{q3} + k_{Vq34} \left(- V_{q3} + y_{s0}\right), \ V_{q4} \geq y_{s0}\right),\left( I_{q4}, \ \text{True}\right) \right)}\)

VDL2_y

\(y_{V_{DL2}}\)

Algeb

\(- y_{V_{DL2}} + \operatorname{FixPiecewise}{\left(\left( I_{p1}, \ V_{p1} \geq y_{s0}\right),\left( I_{p1} + k_{Vp12} \left(- V_{p1} + y_{s0}\right), \ V_{p2} \geq y_{s0}\right),\left( I_{p2} + k_{Vp23} \left(- V_{p2} + y_{s0}\right), \ V_{p3} \geq y_{s0}\right),\left( I_{p3} + k_{Vp34} \left(- V_{p3} + y_{s0}\right), \ V_{p4} \geq y_{s0}\right),\left( I_{p4}, \ \text{True}\right) \right)}\)

Ipmax

\(I_{pmax}\)

Algeb

\(- I_{pmax} + Ipmaxh fThld_{2} + \left(1 - fThld_{2}\right) \left(\sqrt{I_{pmax2}^2} SWPQ_{s0} + SWPQ_{s1} \left(z_{VDL2} \left(I_{maxr} \left(1 - VDL2c\right) + VDL2c y_{V_{DL2}}\right) - 100000000.0 z_{VDL2} + 100000000.0\right)\right)\)

Iqmax

\(I_{qmax}\)

Algeb

\(\sqrt{I_{qmax2}^2} SWPQ_{s1} - I_{qmax} + SWPQ_{s0} \left(z_{VDL1} \left(I_{maxr} \left(1 - VDL1c\right) + VDL1c y_{V_{DL1}}\right) - 100000000.0 z_{VDL1} + 100000000.0\right)\)

PIV_ys

\(ys_{PIV}\)

Algeb

\(\left(1 - z_{Vdip}\right) \left(K_{vp} SWQ_{s1} \left(- SWV_{s0} y_{s0} + y_{Vsel}\right) + xi_{PIV} - ys_{PIV}\right)\)

PIV_y

\(y_{PIV}\)

Algeb

\(\left(1 - z_{Vdip}\right) \left(I_{qmax} PIV_{lim zu} + I_{qmin} PIV_{lim zl} + PIV_{lim zi} ys_{PIV} - y_{PIV}\right)\)

Qsel

\(Q_{sel}\)

Algeb

\(- Q_{sel} + SWQ_{s0} y_{s_4} + SWQ_{s1} y_{PIV}\)

IpHL_x

\(x_{IpHL}\)

Algeb

\(- x_{IpHL} + \frac{y_{s5}}{V_{p}}\)

IpHL_y

\(y_{IpHL}\)

Algeb

\(I_{pmax} IpHL_{lim zu} + I_{pmin} IpHL_{lim zl} + IpHL_{lim zi} x_{IpHL} - y_{IpHL}\)

IqHL_x

\(x_{IqHL}\)

Algeb

\(I_{qinj} + Q_{sel} - x_{IqHL}\)

IqHL_y

\(y_{IqHL}\)

Algeb

\(I_{qmax} IqHL_{lim zu} + I_{qmin} IqHL_{lim zl} + IqHL_{lim zi} x_{IqHL} - y_{IqHL}\)

a

\(\theta\)

ExtAlgeb

\(0\)

v

\(V_{d}\)

ExtAlgeb

\(0\)

Pe

\(Pe\)

ExtAlgeb

\(0\)

Qe

\(Qe\)

ExtAlgeb

\(0\)

Ipcmd

\(Ipcmd\)

ExtAlgeb

\(- Ipcmd_{0} + y_{IpHL}\)

Iqcmd

\(Iqcmd\)

ExtAlgeb

\(- Iqcmd_{0} - y_{IqHL}\)

Services#

Name

Symbol

Equation

Type

Ipcmd0

\(Ipcmd0\)

\(\frac{P_{0}}{V_{d}}\)

ConstService

Iqcmd0

\(Iqcmd0\)

\(- \frac{Q_{0}}{V_{d}}\)

ConstService

pfaref0

\(\Phi_{ref0}\)

\(\operatorname{atan}_{2}{\left(Q_{0},P_{0} \right)}\)

ConstService

Volt_dip

\(z_{Vdip}\)

\(1 - Vcmp_{zi}\)

VarService

qref0

\(q_{ref0}\)

\(Iqcmd_{0} SWQ_{s0} \left(V_{d} z_{i}^{VLower} + 0.01 z_{l}^{VLower}\right) + SWQ_{s1} \left(V_{d} - V_{ref1}\right)\)

ConstService

PIQ_flag

\(z^{flag}_{PIQ}\)

\(0\)

EventFlag

s4_flag

\(z^{flag}_{s_4}\)

\(0\)

EventFlag

pThld

\(p_{Thld}\)

\(\operatorname{Indicator}{\left(T_{hld} > 0 \right)}\)

ConstService

nThld

\(n_{Thld}\)

\(\operatorname{Indicator}{\left(T_{hld} < 0 \right)}\)

ConstService

Thld_abs

\(|Thld|\)

\(\left|{T_{hld}}\right|\)

ConstService

fThld

\(fThld\)

\(0\)

ExtendedEvent

s5_flag

\(z^{flag}_{s5}\)

\(0\)

EventFlag

kVq12

\(k_{Vq12}\)

\(\frac{- I_{q1} + I_{q2}}{- V_{q1} + V_{q2}}\)

ConstService

kVq23

\(k_{Vq23}\)

\(\frac{- I_{q2} + I_{q3}}{- V_{q2} + V_{q3}}\)

ConstService

kVq34

\(k_{Vq34}\)

\(\frac{- I_{q3} + I_{q4}}{- V_{q3} + V_{q4}}\)

ConstService

zVDL1

\(z_{VDL1}\)

\(I_{q1} \leq I_{q2} \wedge I_{q2} \leq I_{q3} \wedge I_{q3} \leq I_{q4} \wedge V_{q1} \leq V_{q2} \wedge V_{q2} \leq V_{q3} \wedge V_{q3} \leq V_{q4}\)

ConstService

kVp12

\(k_{Vp12}\)

\(\frac{- I_{p1} + I_{p2}}{- V_{p1} + V_{p2}}\)

ConstService

kVp23

\(k_{Vp23}\)

\(\frac{- I_{p2} + I_{p3}}{- V_{p2} + V_{p3}}\)

ConstService

kVp34

\(k_{Vp34}\)

\(\frac{- I_{p3} + I_{p4}}{- V_{p3} + V_{p4}}\)

ConstService

zVDL2

\(z_{VDL2}\)

\(I_{p1} \leq I_{p2} \wedge I_{p2} \leq I_{p3} \wedge I_{p3} \leq I_{p4} \wedge V_{p1} \leq V_{p2} \wedge V_{p2} \leq V_{p3} \wedge V_{p3} \leq V_{p4}\)

ConstService

fThld2

\(fThld2\)

\(0\)

ExtendedEvent

VDL1c

\(VDL1c\)

\(y_{V_{DL1}} < I_{maxr}\)

VarService

VDL2c

\(VDL2c\)

\(y_{V_{DL2}} < I_{maxr}\)

VarService

Ipmax2sq0

\(I_{pmax20,nn}^2\)

\(\operatorname{FixPiecewise}{\left(\left( 0, \ I_{max}^{2} - Iqcmd_{0}^{2} \leq 0\right),\left( I_{max}^{2} - Iqcmd_{0}^{2}, \ \text{True}\right) \right)}\)

ConstService

Ipmax2sq

\(I_{pmax2}^2\)

\(\operatorname{FixPiecewise}{\left(\left( 0, \ I_{max}^{2} - y_{IqHL}^{2} \leq 0\right),\left( I_{max}^{2} - y_{IqHL}^{2}, \ \text{True}\right) \right)}\)

VarService

Ipmaxh

\(Ipmaxh\)

\(0\)

VarHold

Iqmax2sq0

\(I_{qmax,nn}^2\)

\(\operatorname{FixPiecewise}{\left(\left( 0, \ I_{max}^{2} - Ipcmd_{0}^{2} \leq 0\right),\left( I_{max}^{2} - Ipcmd_{0}^{2}, \ \text{True}\right) \right)}\)

ConstService

Iqmax2sq

\(I_{qmax2}^2\)

\(\operatorname{FixPiecewise}{\left(\left( 0, \ I_{max}^{2} - y_{IpHL}^{2} \leq 0\right),\left( I_{max}^{2} - y_{IpHL}^{2}, \ \text{True}\right) \right)}\)

VarService

Ipmin

\(I_{pmin}\)

\(0.0\)

ConstService

PIV_flag

\(z^{flag}_{PIV}\)

\(0\)

EventFlag

Discretes#

Name

Symbol

Type

Info

SWPF

\(SW_{PF}\)

Switcher

SWV

\(SW_{V}\)

Switcher

SWQ

\(SW_{V}\)

Switcher

SWP

\(SW_{P}\)

Switcher

SWPQ

\(SW_{PQ}\)

Switcher

zp

\(zp\)

IsEqual

Vcmp

\(V_{cmp}\)

Limiter

Voltage dip comparator

VLower

\(VLower\)

Limiter

Limiter for lower voltage cap

PFlim

\(PFlim\)

Limiter

PIQ_lim

\(lim_{PIQ}\)

HardLimiter

Vsel_lim

\(lim_{Vsel}\)

HardLimiter

dbV_db

\(db_{dbV}\)

DeadBand

pfilt_lim

\(lim_{P_{filt}}\)

RateLimiter

Rate limiter in Lag

s5_lim

\(lim_{s5}\)

AntiWindup

Limiter in Lag

PIV_lim

\(lim_{PIV}\)

HardLimiter

IpHL_lim

\(lim_{IpHL}\)

HardLimiter

IqHL_lim

\(lim_{IqHL}\)

HardLimiter

Blocks#

Name

Symbol

Type

Info

s0

\(s0\)

Lag

Voltage filter

S1

\(S_1\)

Lag

Pe filter

PIQ

\(PIQ\)

PITrackAWFreeze

Vsel

\(Vsel\)

GainLimiter

Selection output of VFLAG

s4

\(s_4\)

LagFreeze

Filter for calculated voltage with freeze

dbV

\(dbV\)

DeadBand1

Deadband for voltage error (ref0)

pfilt

\(P_{filt}\)

LagRate

Active power filter with rate limits

s5

\(s5\)

LagAWFreeze

VDL1

\(V_{DL1}\)

Piecewise

Piecewise linear characteristics of Vq-Iq

VDL2

\(V_{DL2}\)

Piecewise

Piecewise linear characteristics of Vp-Ip

PIV

\(PIV\)

PITrackAWFreeze

IpHL

\(IpHL\)

GainLimiter

IqHL

\(IqHL\)

GainLimiter

Config Fields in [REECA1G]

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)

kqs

\(K_{qs}\)

2

Q PI controller tracking gain

kvs

\(K_{vs}\)

2

Voltage PI controller tracking gain

tpfilt

\(T_{pfilt}\)

0.020

Time const. for Pref filter