.. _DG: ================================================================================ DG ================================================================================ Distributed generation (small-scale). See :ref:`SynGen` for the notes on replacing StaticGen and setting the power ratio parameters. Common Parameters: u, name, bus, fn Available models: PVD1_, ESD1_, EV1_, EV2_ .. _PVD1: -------------------------------------------------------------------------------- PVD1 -------------------------------------------------------------------------------- WECC Distributed PV model. Device power rating is specified in `Sn`. Output currents are named `Ipout_y` and `Iqout_y`. Output power can be computed as ``Pe = Ipout_y * v`` and ``Qe = Iqout_y * v``. Frequency tripping response points `ft0`, `ft1`, `ft2`, and `ft3` must be monotinically increasing. Same rule applies to the voltage tripping response points `vt0`, `vt1`, `vt2`, and `vt3`. The program does not check these values, and the user is responsible for the parameter validity. Frequency and voltage recovery latching is yet to be implemented. Modifications to the active and reactive power references, typically by an external scheduling program, should write to `pref0.v` and `qref0.v` in place. AGC signals should write to `pext0.v` in place. Maximum power limit `pmx` can be disabled by editing the configuration file by setting `plim=0`. It cannot be modified in runtime. Reference: [1] ESIG, WECC Distributed and Small PV Plants Generic Model (PVD1), [Online], Available: https://www.esig.energy/wiki-main-page/wecc-distributed-and-small-pv-plants-generic-model-pvd1/ Parameters ---------- +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | Name | Symbol | Description | Default | Unit | Properties | +==========+==================+=========================================================+=========+==============+===============================+ | idx | | unique device idx | | | | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | u | :math:`u` | connection status | 1 | *bool* | | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | name | | device name | | | | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | bus | | interface bus id | | | mandatory | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | gen | | static generator index | | | mandatory | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | Sn | :math:`S_n` | device MVA rating | 100 | *MVA* | | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | fn | :math:`f_n` | nominal frequency | 60 | *Hz* | | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | busf | | Optional BusFreq measurement device idx | | | | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | xc | :math:`x_c` | coupling reactance | 0 | *p.u.* | z | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | pqflag | | P/Q priority for I limit; 0-Q priority, 1-P priority | | *bool* | mandatory | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | igreg | | Remote bus idx for droop response, None for local | | | | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | qmx | :math:`q_{mx}` | Max. reactive power command | 0.330 | *pu* | power | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | qmn | :math:`q_{mn}` | Min. reactive power command | -0.330 | *pu* | power | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | pmx | :math:`p_{mx}` | maximum power limit | 9999 | *pu* | power | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | v0 | :math:`v_0` | Lower limit of deadband for Vdroop response | 0.800 | *pu* | non_zero | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | v1 | :math:`v_1` | Upper limit of deadband for Vdroop response | 1.100 | *pu* | non_zero | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | dqdv | :math:`dq/dv` | Q-V droop characteristics (negative) | -1 | | non_zero,power | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | fdbd | :math:`f_{dbd}` | frequency deviation deadband | -0.017 | *Hz* | non_positive | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | ddn | :math:`D_{dn}` | Gain after f deadband | 0 | *pu (MW)/Hz* | non_negative,power | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | ialim | :math:`I_{alim}` | Apparent power limit | 1.300 | | non_zero,non_negative,current | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | vt0 | :math:`V_{t0}` | Voltage tripping response curve point 0 | 0.880 | *p.u.* | non_zero,non_negative | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | vt1 | :math:`V_{t1}` | Voltage tripping response curve point 1 | 0.900 | *p.u.* | non_zero,non_negative | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | vt2 | :math:`V_{t2}` | Voltage tripping response curve point 2 | 1.100 | *p.u.* | non_zero,non_negative | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | vt3 | :math:`V_{t3}` | Voltage tripping response curve point 3 | 1.200 | *p.u.* | non_zero,non_negative | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | vrflag | :math:`z_{VR}` | V-trip is latching (0) or self-resetting (0-1) | 0 | | | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | ft0 | :math:`f_{t0}` | Frequency tripping response curve point 0 | 59.500 | *Hz* | non_zero,non_negative | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | ft1 | :math:`f_{t1}` | Frequency tripping response curve point 1 | 59.700 | *Hz* | non_zero,non_negative | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | ft2 | :math:`f_{t2}` | Frequency tripping response curve point 2 | 60.300 | *Hz* | non_zero,non_negative | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | ft3 | :math:`f_{t3}` | Frequency tripping response curve point 3 | 60.500 | *Hz* | non_zero,non_negative | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | frflag | :math:`z_{FR}` | f-trip is latching (0) or self-resetting (0-1) | 0 | | | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | tip | :math:`T_{ip}` | Inverter active current lag time constant | 0.020 | *s* | non_negative | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | tiq | :math:`T_{iq}` | Inverter reactive current lag time constant | 0.020 | *s* | non_negative | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | gammap | :math:`\gamma_p` | Ratio of PVD1.pref0 w.r.t to that of static PV | 1 | | | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | gammaq | :math:`\gamma_q` | Ratio of PVD1.qref0 w.r.t to that of static PV | 1 | | | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | recflag | :math:`z_{rec}` | Enable flag for voltage and frequency recovery limiters | 1 | | | +----------+------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ Variables --------- +----------+----------------------+----------+--------------------------------------------------+--------+------------+ | Name | Symbol | Type | Description | Unit | Properties | +==========+======================+==========+==================================================+========+============+ | Ipout_y | :math:`y_{Ipout}` | State | State in lag transfer function | | v_str | +----------+----------------------+----------+--------------------------------------------------+--------+------------+ | Iqout_y | :math:`y_{Iqout}` | State | State in lag transfer function | | v_str | +----------+----------------------+----------+--------------------------------------------------+--------+------------+ | fHz | :math:`f_{Hz}` | Algeb | frequency in Hz | *Hz* | v_str | +----------+----------------------+----------+--------------------------------------------------+--------+------------+ | Ffl | :math:`F_{fl}` | Algeb | Coeff. for under frequency | | v_str | +----------+----------------------+----------+--------------------------------------------------+--------+------------+ | Ffh | :math:`F_{fh}` | Algeb | Coeff. for over frequency | | v_str | +----------+----------------------+----------+--------------------------------------------------+--------+------------+ | Fdev | :math:`f_{dev}` | Algeb | Frequency deviation | *Hz* | v_str | +----------+----------------------+----------+--------------------------------------------------+--------+------------+ | DB_y | :math:`y_{DB}` | Algeb | Deadband type 1 output | | v_str | +----------+----------------------+----------+--------------------------------------------------+--------+------------+ | Fvl | :math:`F_{vl}` | Algeb | Coeff. for under voltage | | v_str | +----------+----------------------+----------+--------------------------------------------------+--------+------------+ | Fvh | :math:`F_{vh}` | Algeb | Coeff. for over voltage | | v_str | +----------+----------------------+----------+--------------------------------------------------+--------+------------+ | vp | :math:`V_{p}` | Algeb | Sensed positive voltage | | v_str | +----------+----------------------+----------+--------------------------------------------------+--------+------------+ | Pext | :math:`P_{ext}` | Algeb | External power signal (for AGC) | | v_str | +----------+----------------------+----------+--------------------------------------------------+--------+------------+ | Pref | :math:`P_{ref}` | Algeb | Reference power signal (for scheduling setpoint) | | v_str | +----------+----------------------+----------+--------------------------------------------------+--------+------------+ | Psum | :math:`P_{tot}` | Algeb | Sum of P signals | | v_str | +----------+----------------------+----------+--------------------------------------------------+--------+------------+ | Qdrp | :math:`Q_{drp}` | Algeb | External power signal (for AGC) | | v_str | +----------+----------------------+----------+--------------------------------------------------+--------+------------+ | Qref | :math:`Q_{ref}` | Algeb | Reference power signal (for scheduling setpoint) | | v_str | +----------+----------------------+----------+--------------------------------------------------+--------+------------+ | Qsum | :math:`Q_{tot}` | Algeb | Sum of Q signals | | v_str | +----------+----------------------+----------+--------------------------------------------------+--------+------------+ | Ipul | :math:`I_{p,ul}` | Algeb | Ipcmd before Ip hard limit | | v_str | +----------+----------------------+----------+--------------------------------------------------+--------+------------+ | Iqul | :math:`I_{q,ul}` | Algeb | Iqcmd before Iq hard limit | | v_str | +----------+----------------------+----------+--------------------------------------------------+--------+------------+ | Ipmax | :math:`I_{pmax}` | Algeb | Upper limit of Ip | | v_str | +----------+----------------------+----------+--------------------------------------------------+--------+------------+ | Iqmax | :math:`I_{qmax}` | Algeb | Upper limit of Iq | | v_str | +----------+----------------------+----------+--------------------------------------------------+--------+------------+ | Ipcmd_x | :math:`x_{I^{pcmd}}` | Algeb | Value before limiter | | v_str | +----------+----------------------+----------+--------------------------------------------------+--------+------------+ | Ipcmd_y | :math:`y_{I^{pcmd}}` | Algeb | Output after limiter and post gain | | v_str | +----------+----------------------+----------+--------------------------------------------------+--------+------------+ | Iqcmd_x | :math:`x_{I^{qcmd}}` | Algeb | Value before limiter | | v_str | +----------+----------------------+----------+--------------------------------------------------+--------+------------+ | Iqcmd_y | :math:`y_{I^{qcmd}}` | Algeb | Output after limiter and post gain | | v_str | +----------+----------------------+----------+--------------------------------------------------+--------+------------+ | a | :math:`\theta` | ExtAlgeb | bus (or igreg) phase angle | *rad.* | | +----------+----------------------+----------+--------------------------------------------------+--------+------------+ | v | :math:`V` | ExtAlgeb | bus (or igreg) terminal voltage | *p.u.* | | +----------+----------------------+----------+--------------------------------------------------+--------+------------+ | f | :math:`f` | ExtAlgeb | Bus frequency | *p.u.* | | +----------+----------------------+----------+--------------------------------------------------+--------+------------+ Initialization Equations ------------------------ +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Name | Symbol | Type | Initial Value | +==========+======================+==========+========================================================================================================================================================================================================================================================================================+ | Ipout_y | :math:`y_{Ipout}` | State | :math:`1.0 y_{I^{pcmd}}` | +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqout_y | :math:`y_{Iqout}` | State | :math:`1.0 y_{I^{qcmd}}` | +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | fHz | :math:`f_{Hz}` | Algeb | :math:`f f_{n}` | +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ffl | :math:`F_{fl}` | Algeb | :math:`K_{ft01} z_{i}^{FL_{1}} \left(f_{Hz} - f_{t0}\right) + z_{u}^{FL_{1}}` | +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ffh | :math:`F_{fh}` | Algeb | :math:`z_{i}^{FL_{2}} \left(K_{ft23} \left(- f_{Hz} + f_{t2}\right) + 1\right) + z_{l}^{FL_{2}}` | +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Fdev | :math:`f_{dev}` | Algeb | :math:`f_{n} - f_{Hz}` | +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | DB_y | :math:`y_{DB}` | Algeb | :math:`D_{dn} \left(DB_{db zl} \left(- f_{dbd} + f_{dev}\right) + DB_{db zu} f_{dev}\right)` | +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Fvl | :math:`F_{vl}` | Algeb | :math:`K_{vt01} z_{i}^{VL_{1}} \left(V - V_{t0}\right) + z_{u}^{VL_{1}}` | +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Fvh | :math:`F_{vh}` | Algeb | :math:`z_{i}^{VL_{2}} \left(K_{vt23} \left(- V + V_{t2}\right) + 1\right) + z_{l}^{VL_{2}}` | +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | vp | :math:`V_{p}` | Algeb | :math:`V z_{i}^{VLo} + 0.01 z_{l}^{VLo}` | +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Pext | :math:`P_{ext}` | Algeb | :math:`P_{ext0} u` | +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Pref | :math:`P_{ref}` | Algeb | :math:`P_{ref0} u` | +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Psum | :math:`P_{tot}` | Algeb | :math:`u \left(P_{ext} + P_{ref} + y_{DB}\right)` | +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Qdrp | :math:`Q_{drp}` | Algeb | :math:`dq/dv u z_{i}^{VQ_{2}} \left(- V_{comp} + v_{1}\right) + q_{mn} z_{u}^{VQ_{2}} + q_{mx} u z_{l}^{VQ_{1}} + u z_{i}^{VQ_{1}} \left(dq/dv \left(- V_{comp} + V_{qu}\right) + q_{mx}\right)` | +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Qref | :math:`Q_{ref}` | Algeb | :math:`Q_{ref0} u` | +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Qsum | :math:`Q_{tot}` | Algeb | :math:`u \left(Q_{ref0} + dq/dv u z_{i}^{VQ_{2}} \left(- V_{comp} + v_{1}\right) + q_{mn} z_{u}^{VQ_{2}} + q_{mx} u z_{l}^{VQ_{1}} + u z_{i}^{VQ_{1}} \left(dq/dv \left(- V_{comp} + V_{qu}\right) + q_{mx}\right)\right)` | +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipul | :math:`I_{p,ul}` | Algeb | :math:`\frac{P_{tot} z_{i}^{PHL} + p_{mx} z_{u}^{PHL}}{V_{p}}` | +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqul | :math:`I_{q,ul}` | Algeb | :math:`\frac{Q_{tot}}{V_{p}}` | +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipmax | :math:`I_{pmax}` | Algeb | :math:`I_{alim} SWPQ_{s1} + \sqrt{I_{pmax0}^2} SWPQ_{s0}` | +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqmax | :math:`I_{qmax}` | Algeb | :math:`I_{alim} SWPQ_{s0} + \sqrt{I_{qmax0}^2} SWPQ_{s1}` | +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipcmd_x | :math:`x_{I^{pcmd}}` | Algeb | :math:`I_{p,ul}` | +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipcmd_y | :math:`y_{I^{pcmd}}` | Algeb | :math:`I_{pmax} Ipcmd_{lim zu} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) + Ipcmd_{lim zi} x_{I^{pcmd}} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right)` | +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqcmd_x | :math:`x_{I^{qcmd}}` | Algeb | :math:`I_{q,ul}` | +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqcmd_y | :math:`y_{I^{qcmd}}` | Algeb | :math:`- I_{qmax} Iqcmd_{lim zl} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) + I_{qmax} Iqcmd_{lim zu} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) + Iqcmd_{lim zi} x_{I^{qcmd}} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right)` | +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | a | :math:`\theta` | ExtAlgeb | | +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | v | :math:`V` | ExtAlgeb | | +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | f | :math:`f` | ExtAlgeb | | +----------+----------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Differential Equations ----------------------------- +----------+-------------------+-------+--------------------------------------+----------------+ | Name | Symbol | Type | RHS of Equation "T x' = f(x, y)" | T (LHS) | +==========+===================+=======+======================================+================+ | Ipout_y | :math:`y_{Ipout}` | State | :math:`1.0 y_{I^{pcmd}} - y_{Ipout}` | :math:`T_{ip}` | +----------+-------------------+-------+--------------------------------------+----------------+ | Iqout_y | :math:`y_{Iqout}` | State | :math:`1.0 y_{I^{qcmd}} - y_{Iqout}` | :math:`T_{iq}` | +----------+-------------------+-------+--------------------------------------+----------------+ Algebraic Equations ----------------------------- +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Name | Symbol | Type | RHS of Equation "0 = g(x, y)" | +==========+======================+==========+=======================================================================================================================================================================================================================================================================================================+ | fHz | :math:`f_{Hz}` | Algeb | :math:`f f_{n} - f_{Hz}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ffl | :math:`F_{fl}` | Algeb | :math:`- F_{fl} + K_{ft01} z_{i}^{FL_{1}} \left(f_{Hz} - f_{t0}\right) + z_{u}^{FL_{1}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ffh | :math:`F_{fh}` | Algeb | :math:`- F_{fh} + z_{i}^{FL_{2}} \left(K_{ft23} \left(- f_{Hz} + f_{t2}\right) + 1\right) + z_{l}^{FL_{2}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Fdev | :math:`f_{dev}` | Algeb | :math:`f_{n} - f_{Hz} - f_{dev}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | DB_y | :math:`y_{DB}` | Algeb | :math:`D_{dn} \left(DB_{db zl} \left(- f_{dbd} + f_{dev}\right) + DB_{db zu} f_{dev}\right) - y_{DB}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Fvl | :math:`F_{vl}` | Algeb | :math:`- F_{vl} + K_{vt01} z_{i}^{VL_{1}} \left(V - V_{t0}\right) + z_{u}^{VL_{1}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Fvh | :math:`F_{vh}` | Algeb | :math:`- F_{vh} + z_{i}^{VL_{2}} \left(K_{vt23} \left(- V + V_{t2}\right) + 1\right) + z_{l}^{VL_{2}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | vp | :math:`V_{p}` | Algeb | :math:`V z_{i}^{VLo} - V_{p} + 0.01 z_{l}^{VLo}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Pext | :math:`P_{ext}` | Algeb | :math:`P_{ext0} u - P_{ext}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Pref | :math:`P_{ref}` | Algeb | :math:`P_{ref0} u - P_{ref}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Psum | :math:`P_{tot}` | Algeb | :math:`- P_{tot} + u \left(P_{ext} + P_{ref} + y_{DB}\right)` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Qdrp | :math:`Q_{drp}` | Algeb | :math:`- Q_{drp} + dq/dv u z_{i}^{VQ_{2}} \left(- V_{comp} + v_{1}\right) + q_{mn} z_{u}^{VQ_{2}} + q_{mx} u z_{l}^{VQ_{1}} + u z_{i}^{VQ_{1}} \left(dq/dv \left(- V_{comp} + V_{qu}\right) + q_{mx}\right)` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Qref | :math:`Q_{ref}` | Algeb | :math:`Q_{ref0} u - Q_{ref}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Qsum | :math:`Q_{tot}` | Algeb | :math:`- Q_{tot} + u \left(Q_{drp} + Q_{ref}\right)` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipul | :math:`I_{p,ul}` | Algeb | :math:`- I_{p,ul} + \frac{P_{tot} z_{i}^{PHL} + p_{mx} z_{u}^{PHL}}{V_{p}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqul | :math:`I_{q,ul}` | Algeb | :math:`- I_{q,ul} + \frac{Q_{tot}}{V_{p}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipmax | :math:`I_{pmax}` | Algeb | :math:`I_{alim} SWPQ_{s1} - I_{pmax} + \sqrt{I_{pmax}^2} SWPQ_{s0}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqmax | :math:`I_{qmax}` | Algeb | :math:`I_{alim} SWPQ_{s0} - I_{qmax} + \sqrt{I_{qmax}^2} SWPQ_{s1}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipcmd_x | :math:`x_{I^{pcmd}}` | Algeb | :math:`I_{p,ul} - x_{I^{pcmd}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipcmd_y | :math:`y_{I^{pcmd}}` | Algeb | :math:`I_{pmax} Ipcmd_{lim zu} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) + Ipcmd_{lim zi} x_{I^{pcmd}} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) - y_{I^{pcmd}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqcmd_x | :math:`x_{I^{qcmd}}` | Algeb | :math:`I_{q,ul} - x_{I^{qcmd}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqcmd_y | :math:`y_{I^{qcmd}}` | Algeb | :math:`- I_{qmax} Iqcmd_{lim zl} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) + I_{qmax} Iqcmd_{lim zu} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) + Iqcmd_{lim zi} x_{I^{qcmd}} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) - y_{I^{qcmd}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | a | :math:`\theta` | ExtAlgeb | :math:`- V u y_{Ipout}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | v | :math:`V` | ExtAlgeb | :math:`- V u y_{Iqout}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | f | :math:`f` | ExtAlgeb | :math:`0` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Services ---------- +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Name | Symbol | Equation | Type | +===========+=====================+=============================================================================================================================================================================================================+==============+ | pref0 | :math:`P_{ref0}` | :math:`P_{0s} \gamma_{p}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | qref0 | :math:`Q_{ref0}` | :math:`Q_{0s} \gamma_{q}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Kft01 | :math:`K_{ft01}` | :math:`\frac{1}{- f_{t0} + f_{t1}}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Kft23 | :math:`K_{ft23}` | :math:`\frac{1}{- f_{t2} + f_{t3}}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Kvt01 | :math:`K_{vt01}` | :math:`\frac{1}{- V_{t0} + V_{t1}}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Kvt23 | :math:`K_{vt23}` | :math:`\frac{1}{- V_{t2} + V_{t3}}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Pext0 | :math:`P_{ext0}` | :math:`0` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Vcomp | :math:`V_{comp}` | :math:`\left|{V e^{i \theta} + i x_{c} \left(y_{Ipout} + i y_{Iqout}\right)}\right|` | VarService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Vqu | :math:`V_{qu}` | :math:`v_{1} - \frac{Q_{ref0} - q_{mn}}{dq/dv}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Vql | :math:`V_{ql}` | :math:`v_{0} + \frac{- Q_{ref0} + q_{mx}}{dq/dv}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Ipmaxsq | :math:`I_{pmax}^2` | :math:`\operatorname{FixPiecewise}{\left(\left( 0, \ I_{alim}^{2} - \left(y_{I^{qcmd}}\right)^{2} \leq 0\right),\left( I_{alim}^{2} - \left(y_{I^{qcmd}}\right)^{2}, \ \text{True}\right) \right)}` | VarService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Ipmaxsq0 | :math:`I_{pmax0}^2` | :math:`\operatorname{FixPiecewise}{\left(\left( 0, \ I_{alim}^{2} - \frac{Q_{ref0}^{2} u^{2}}{V^{2}} \leq 0\right),\left( I_{alim}^{2} - \frac{Q_{ref0}^{2} u^{2}}{V^{2}}, \ \text{True}\right) \right)}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Iqmaxsq | :math:`I_{qmax}^2` | :math:`\operatorname{FixPiecewise}{\left(\left( 0, \ I_{alim}^{2} - \left(y_{I^{pcmd}}\right)^{2} \leq 0\right),\left( I_{alim}^{2} - \left(y_{I^{pcmd}}\right)^{2}, \ \text{True}\right) \right)}` | VarService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Iqmaxsq0 | :math:`I_{qmax0}^2` | :math:`\operatorname{FixPiecewise}{\left(\left( 0, \ I_{alim}^{2} - \frac{P_{ref0}^{2} u^{2}}{V^{2}} \leq 0\right),\left( I_{alim}^{2} - \frac{P_{ref0}^{2} u^{2}}{V^{2}}, \ \text{True}\right) \right)}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ Discretes ----------- +------------+------------------------+-------------+------------------------------------+ | Name | Symbol | Type | Info | +============+========================+=============+====================================+ | SWPQ | :math:`SW_{PQ}` | Switcher | | +------------+------------------------+-------------+------------------------------------+ | FL1 | :math:`FL1` | Limiter | Under frequency comparer | +------------+------------------------+-------------+------------------------------------+ | FL2 | :math:`FL2` | Limiter | Over frequency comparer | +------------+------------------------+-------------+------------------------------------+ | DB_db | :math:`db_{DB}` | DeadBand | | +------------+------------------------+-------------+------------------------------------+ | VL1 | :math:`VL1` | Limiter | Under voltage comparer | +------------+------------------------+-------------+------------------------------------+ | VL2 | :math:`VL2` | Limiter | Over voltage comparer | +------------+------------------------+-------------+------------------------------------+ | VLo | :math:`VLo` | Limiter | Voltage lower limit (0.01) flag | +------------+------------------------+-------------+------------------------------------+ | PHL | :math:`PHL` | Limiter | limiter for Psum in [0, pmx] | +------------+------------------------+-------------+------------------------------------+ | VQ1 | :math:`VQ1` | Limiter | Under voltage comparer for Q droop | +------------+------------------------+-------------+------------------------------------+ | VQ2 | :math:`VQ2` | Limiter | Over voltage comparer for Q droop | +------------+------------------------+-------------+------------------------------------+ | Ipcmd_lim | :math:`lim_{I^{pcmd}}` | HardLimiter | | +------------+------------------------+-------------+------------------------------------+ | Iqcmd_lim | :math:`lim_{I^{qcmd}}` | HardLimiter | | +------------+------------------------+-------------+------------------------------------+ Blocks ------- +--------+------------------+-------------+----------------------------------------+ | Name | Symbol | Type | Info | +========+==================+=============+========================================+ | DB | :math:`DB` | DeadBand1 | frequency deviation deadband with gain | +--------+------------------+-------------+----------------------------------------+ | Ipcmd | :math:`I^{pcmd}` | GainLimiter | Ip with limiter and coeff. | +--------+------------------+-------------+----------------------------------------+ | Iqcmd | :math:`I^{qcmd}` | GainLimiter | Iq with limiter and coeff. | +--------+------------------+-------------+----------------------------------------+ | Ipout | :math:`Ipout` | Lag | Output Ip filter | +--------+------------------+-------------+----------------------------------------+ | Iqout | :math:`Iqout` | Lag | Output Iq filter | +--------+------------------+-------------+----------------------------------------+ Config Fields in [PVD1] +---------------+-----------------+-------+--------------------------------------------------+-----------------+ | 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) | +---------------+-----------------+-------+--------------------------------------------------+-----------------+ | plim | :math:`P_{lim}` | 1 | enable input power limit check bound by [0, pmx] | (0, 1) | +---------------+-----------------+-------+--------------------------------------------------+-----------------+ .. _ESD1: -------------------------------------------------------------------------------- ESD1 -------------------------------------------------------------------------------- Distributed energy storage model. A state-of-charge limit is added to the PVD1 model. This limit is applied to Ipmax and Ipmin. The state of charge is in state variable ``SOC``, which is an alias of ``pIG_y``. Reference: [1] Powerworld, Renewable Energy Electrical Control Model REEC_C Available: https://www.powerworld.com/WebHelp/Content/TransientModels_HTML/Exciter%20REEC_C.htm Parameters ---------- +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | Name | Symbol | Description | Default | Unit | Properties | +==========+====================+=========================================================+=========+==============+===============================+ | idx | | unique device idx | | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | u | :math:`u` | connection status | 1 | *bool* | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | name | | device name | | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | bus | | interface bus id | | | mandatory | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | gen | | static generator index | | | mandatory | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | Sn | :math:`S_n` | device MVA rating | 100 | *MVA* | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | fn | :math:`f_n` | nominal frequency | 60 | *Hz* | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | busf | | Optional BusFreq measurement device idx | | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | xc | :math:`x_c` | coupling reactance | 0 | *p.u.* | z | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | pqflag | | P/Q priority for I limit; 0-Q priority, 1-P priority | | *bool* | mandatory | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | igreg | | Remote bus idx for droop response, None for local | | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | qmx | :math:`q_{mx}` | Max. reactive power command | 0.330 | *pu* | power | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | qmn | :math:`q_{mn}` | Min. reactive power command | -0.330 | *pu* | power | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | pmx | :math:`p_{mx}` | maximum power limit | 9999 | *pu* | power | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | v0 | :math:`v_0` | Lower limit of deadband for Vdroop response | 0.800 | *pu* | non_zero | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | v1 | :math:`v_1` | Upper limit of deadband for Vdroop response | 1.100 | *pu* | non_zero | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | dqdv | :math:`dq/dv` | Q-V droop characteristics (negative) | -1 | | non_zero,power | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | fdbd | :math:`f_{dbd}` | frequency deviation deadband | -0.017 | *Hz* | non_positive | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | ddn | :math:`D_{dn}` | Gain after f deadband | 0 | *pu (MW)/Hz* | non_negative,power | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | ialim | :math:`I_{alim}` | Apparent power limit | 1.300 | | non_zero,non_negative,current | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | vt0 | :math:`V_{t0}` | Voltage tripping response curve point 0 | 0.880 | *p.u.* | non_zero,non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | vt1 | :math:`V_{t1}` | Voltage tripping response curve point 1 | 0.900 | *p.u.* | non_zero,non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | vt2 | :math:`V_{t2}` | Voltage tripping response curve point 2 | 1.100 | *p.u.* | non_zero,non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | vt3 | :math:`V_{t3}` | Voltage tripping response curve point 3 | 1.200 | *p.u.* | non_zero,non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | vrflag | :math:`z_{VR}` | V-trip is latching (0) or self-resetting (0-1) | 0 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | ft0 | :math:`f_{t0}` | Frequency tripping response curve point 0 | 59.500 | *Hz* | non_zero,non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | ft1 | :math:`f_{t1}` | Frequency tripping response curve point 1 | 59.700 | *Hz* | non_zero,non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | ft2 | :math:`f_{t2}` | Frequency tripping response curve point 2 | 60.300 | *Hz* | non_zero,non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | ft3 | :math:`f_{t3}` | Frequency tripping response curve point 3 | 60.500 | *Hz* | non_zero,non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | frflag | :math:`z_{FR}` | f-trip is latching (0) or self-resetting (0-1) | 0 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | tip | :math:`T_{ip}` | Inverter active current lag time constant | 0.020 | *s* | non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | tiq | :math:`T_{iq}` | Inverter reactive current lag time constant | 0.020 | *s* | non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | gammap | :math:`\gamma_p` | Ratio of PVD1.pref0 w.r.t to that of static PV | 1 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | gammaq | :math:`\gamma_q` | Ratio of PVD1.qref0 w.r.t to that of static PV | 1 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | recflag | :math:`z_{rec}` | Enable flag for voltage and frequency recovery limiters | 1 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | Tf | :math:`T_f` | Integrator constant for SOC model | 1 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | SOCmin | :math:`SOC_{min}` | Minimum required value for SOC in limiter | 0 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | SOCmax | :math:`SOC_{max}` | Maximum allowed value for SOC in limiter | 1 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | SOCinit | :math:`SOC_{init}` | Initial state of charge | 0.500 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | En | :math:`E_n` | Rated energy capacity | 100 | *MWh* | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | EtaC | :math:`Eta_C` | Efficiency during charging | 1 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | EtaD | :math:`Eta_D` | Efficiency during discharging | 1 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ Variables --------- +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Name | Symbol | Type | Description | Unit | Properties | +==========+======================+============+==================================================+========+============+ | Ipout_y | :math:`y_{Ipout}` | State | State in lag transfer function | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Iqout_y | :math:`y_{Iqout}` | State | State in lag transfer function | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | pIG_y | :math:`y_{pIG}` | State | Integrator output | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | SOC | :math:`SOC` | AliasState | Alias for state of charge | | | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | fHz | :math:`f_{Hz}` | Algeb | frequency in Hz | *Hz* | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Ffl | :math:`F_{fl}` | Algeb | Coeff. for under frequency | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Ffh | :math:`F_{fh}` | Algeb | Coeff. for over frequency | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Fdev | :math:`f_{dev}` | Algeb | Frequency deviation | *Hz* | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | DB_y | :math:`y_{DB}` | Algeb | Deadband type 1 output | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Fvl | :math:`F_{vl}` | Algeb | Coeff. for under voltage | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Fvh | :math:`F_{vh}` | Algeb | Coeff. for over voltage | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | vp | :math:`V_{p}` | Algeb | Sensed positive voltage | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Pext | :math:`P_{ext}` | Algeb | External power signal (for AGC) | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Pref | :math:`P_{ref}` | Algeb | Reference power signal (for scheduling setpoint) | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Psum | :math:`P_{tot}` | Algeb | Sum of P signals | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Qdrp | :math:`Q_{drp}` | Algeb | External power signal (for AGC) | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Qref | :math:`Q_{ref}` | Algeb | Reference power signal (for scheduling setpoint) | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Qsum | :math:`Q_{tot}` | Algeb | Sum of Q signals | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Ipul | :math:`I_{p,ul}` | Algeb | Ipcmd before Ip hard limit | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Iqul | :math:`I_{q,ul}` | Algeb | Iqcmd before Iq hard limit | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Ipmax | :math:`I_{pmax}` | Algeb | Upper limit of Ip | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Iqmax | :math:`I_{qmax}` | Algeb | Upper limit of Iq | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Ipcmd_x | :math:`x_{I^{pcmd}}` | Algeb | Value before limiter | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Ipcmd_y | :math:`y_{I^{pcmd}}` | Algeb | Output after limiter and post gain | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Iqcmd_x | :math:`x_{I^{qcmd}}` | Algeb | Value before limiter | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Iqcmd_y | :math:`y_{I^{qcmd}}` | Algeb | Output after limiter and post gain | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Ipmin | :math:`Ipmin` | Algeb | Minimum value of Ip | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | a | :math:`\theta` | ExtAlgeb | bus (or igreg) phase angle | *rad.* | | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | v | :math:`V` | ExtAlgeb | bus (or igreg) terminal voltage | *p.u.* | | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | f | :math:`f` | ExtAlgeb | Bus frequency | *p.u.* | | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ Initialization Equations ------------------------ +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Name | Symbol | Type | Initial Value | +==========+======================+============+========================================================================================================================================================================================================================================================================================+ | Ipout_y | :math:`y_{Ipout}` | State | :math:`1.0 y_{I^{pcmd}}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqout_y | :math:`y_{Iqout}` | State | :math:`1.0 y_{I^{qcmd}}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | pIG_y | :math:`y_{pIG}` | State | :math:`SOC_{init}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | SOC | :math:`SOC` | AliasState | | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | fHz | :math:`f_{Hz}` | Algeb | :math:`f f_{n}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ffl | :math:`F_{fl}` | Algeb | :math:`K_{ft01} z_{i}^{FL_{1}} \left(f_{Hz} - f_{t0}\right) + z_{u}^{FL_{1}}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ffh | :math:`F_{fh}` | Algeb | :math:`z_{i}^{FL_{2}} \left(K_{ft23} \left(- f_{Hz} + f_{t2}\right) + 1\right) + z_{l}^{FL_{2}}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Fdev | :math:`f_{dev}` | Algeb | :math:`f_{n} - f_{Hz}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | DB_y | :math:`y_{DB}` | Algeb | :math:`D_{dn} \left(DB_{db zl} \left(- f_{dbd} + f_{dev}\right) + DB_{db zu} f_{dev}\right)` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Fvl | :math:`F_{vl}` | Algeb | :math:`K_{vt01} z_{i}^{VL_{1}} \left(V - V_{t0}\right) + z_{u}^{VL_{1}}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Fvh | :math:`F_{vh}` | Algeb | :math:`z_{i}^{VL_{2}} \left(K_{vt23} \left(- V + V_{t2}\right) + 1\right) + z_{l}^{VL_{2}}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | vp | :math:`V_{p}` | Algeb | :math:`V z_{i}^{VLo} + 0.01 z_{l}^{VLo}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Pext | :math:`P_{ext}` | Algeb | :math:`P_{ext0} u` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Pref | :math:`P_{ref}` | Algeb | :math:`P_{ref0} u` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Psum | :math:`P_{tot}` | Algeb | :math:`u \left(P_{ext} + P_{ref} + y_{DB}\right)` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Qdrp | :math:`Q_{drp}` | Algeb | :math:`dq/dv u z_{i}^{VQ_{2}} \left(- V_{comp} + v_{1}\right) + q_{mn} z_{u}^{VQ_{2}} + q_{mx} u z_{l}^{VQ_{1}} + u z_{i}^{VQ_{1}} \left(dq/dv \left(- V_{comp} + V_{qu}\right) + q_{mx}\right)` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Qref | :math:`Q_{ref}` | Algeb | :math:`Q_{ref0} u` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Qsum | :math:`Q_{tot}` | Algeb | :math:`u \left(Q_{ref0} + dq/dv u z_{i}^{VQ_{2}} \left(- V_{comp} + v_{1}\right) + q_{mn} z_{u}^{VQ_{2}} + q_{mx} u z_{l}^{VQ_{1}} + u z_{i}^{VQ_{1}} \left(dq/dv \left(- V_{comp} + V_{qu}\right) + q_{mx}\right)\right)` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipul | :math:`I_{p,ul}` | Algeb | :math:`\frac{P_{tot} z_{i}^{PHL} + p_{mx} z_{u}^{PHL}}{V_{p}}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqul | :math:`I_{q,ul}` | Algeb | :math:`\frac{Q_{tot}}{V_{p}}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipmax | :math:`I_{pmax}` | Algeb | :math:`\left(1 - z_{l}^{SOClim}\right) \left(I_{alim} SWPQ_{s1} + \sqrt{I_{pmax0}^2} SWPQ_{s0}\right)` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqmax | :math:`I_{qmax}` | Algeb | :math:`I_{alim} SWPQ_{s0} + \sqrt{I_{qmax0}^2} SWPQ_{s1}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipcmd_x | :math:`x_{I^{pcmd}}` | Algeb | :math:`I_{p,ul}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipcmd_y | :math:`y_{I^{pcmd}}` | Algeb | :math:`I_{pmax} Ipcmd_{lim zu} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) + Ipcmd_{lim zi} x_{I^{pcmd}} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right)` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqcmd_x | :math:`x_{I^{qcmd}}` | Algeb | :math:`I_{q,ul}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqcmd_y | :math:`y_{I^{qcmd}}` | Algeb | :math:`- I_{qmax} Iqcmd_{lim zl} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) + I_{qmax} Iqcmd_{lim zu} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) + Iqcmd_{lim zi} x_{I^{qcmd}} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right)` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipmin | :math:`Ipmin` | Algeb | :math:`\left(z_{u}^{SOClim} - 1\right) \left(I_{alim} SWPQ_{s1} + \sqrt{I_{pmax0}^2} SWPQ_{s0}\right)` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | a | :math:`\theta` | ExtAlgeb | | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | v | :math:`V` | ExtAlgeb | | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | f | :math:`f` | ExtAlgeb | | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Differential Equations ----------------------------- +----------+-------------------+------------+---------------------------------------------------------------------------------------------------------------------------------------------+----------------+ | Name | Symbol | Type | RHS of Equation "T x' = f(x, y)" | T (LHS) | +==========+===================+============+=============================================================================================================================================+================+ | Ipout_y | :math:`y_{Ipout}` | State | :math:`1.0 y_{I^{pcmd}} - y_{Ipout}` | :math:`T_{ip}` | +----------+-------------------+------------+---------------------------------------------------------------------------------------------------------------------------------------------+----------------+ | Iqout_y | :math:`y_{Iqout}` | State | :math:`1.0 y_{I^{qcmd}} - y_{Iqout}` | :math:`T_{iq}` | +----------+-------------------+------------+---------------------------------------------------------------------------------------------------------------------------------------------+----------------+ | pIG_y | :math:`y_{pIG}` | State | :math:`\frac{S_{b,sys} \left(- \mathrm{H}_{C} V y_{Ipout} z_{1}^{LTN} - \frac{V y_{Ipout} z_{0}^{LTN}}{\mathrm{H}_{D}}\right)}{3600 E_{n}}` | :math:`T_f` | +----------+-------------------+------------+---------------------------------------------------------------------------------------------------------------------------------------------+----------------+ | SOC | :math:`SOC` | AliasState | :math:`0` | | +----------+-------------------+------------+---------------------------------------------------------------------------------------------------------------------------------------------+----------------+ Algebraic Equations ----------------------------- +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Name | Symbol | Type | RHS of Equation "0 = g(x, y)" | +==========+======================+==========+=======================================================================================================================================================================================================================================================================================================+ | fHz | :math:`f_{Hz}` | Algeb | :math:`f f_{n} - f_{Hz}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ffl | :math:`F_{fl}` | Algeb | :math:`- F_{fl} + K_{ft01} z_{i}^{FL_{1}} \left(f_{Hz} - f_{t0}\right) + z_{u}^{FL_{1}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ffh | :math:`F_{fh}` | Algeb | :math:`- F_{fh} + z_{i}^{FL_{2}} \left(K_{ft23} \left(- f_{Hz} + f_{t2}\right) + 1\right) + z_{l}^{FL_{2}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Fdev | :math:`f_{dev}` | Algeb | :math:`f_{n} - f_{Hz} - f_{dev}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | DB_y | :math:`y_{DB}` | Algeb | :math:`D_{dn} \left(DB_{db zl} \left(- f_{dbd} + f_{dev}\right) + DB_{db zu} f_{dev}\right) - y_{DB}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Fvl | :math:`F_{vl}` | Algeb | :math:`- F_{vl} + K_{vt01} z_{i}^{VL_{1}} \left(V - V_{t0}\right) + z_{u}^{VL_{1}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Fvh | :math:`F_{vh}` | Algeb | :math:`- F_{vh} + z_{i}^{VL_{2}} \left(K_{vt23} \left(- V + V_{t2}\right) + 1\right) + z_{l}^{VL_{2}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | vp | :math:`V_{p}` | Algeb | :math:`V z_{i}^{VLo} - V_{p} + 0.01 z_{l}^{VLo}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Pext | :math:`P_{ext}` | Algeb | :math:`P_{ext0} u - P_{ext}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Pref | :math:`P_{ref}` | Algeb | :math:`P_{ref0} u - P_{ref}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Psum | :math:`P_{tot}` | Algeb | :math:`- P_{tot} + u \left(P_{ext} + P_{ref} + y_{DB}\right)` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Qdrp | :math:`Q_{drp}` | Algeb | :math:`- Q_{drp} + dq/dv u z_{i}^{VQ_{2}} \left(- V_{comp} + v_{1}\right) + q_{mn} z_{u}^{VQ_{2}} + q_{mx} u z_{l}^{VQ_{1}} + u z_{i}^{VQ_{1}} \left(dq/dv \left(- V_{comp} + V_{qu}\right) + q_{mx}\right)` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Qref | :math:`Q_{ref}` | Algeb | :math:`Q_{ref0} u - Q_{ref}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Qsum | :math:`Q_{tot}` | Algeb | :math:`- Q_{tot} + u \left(Q_{drp} + Q_{ref}\right)` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipul | :math:`I_{p,ul}` | Algeb | :math:`- I_{p,ul} + \frac{P_{tot} z_{i}^{PHL} + p_{mx} z_{u}^{PHL}}{V_{p}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqul | :math:`I_{q,ul}` | Algeb | :math:`- I_{q,ul} + \frac{Q_{tot}}{V_{p}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipmax | :math:`I_{pmax}` | Algeb | :math:`- I_{pmax} + \left(1 - z_{l}^{SOClim}\right) \left(I_{alim} SWPQ_{s1} + \sqrt{I_{pmax}^2} SWPQ_{s0}\right)` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqmax | :math:`I_{qmax}` | Algeb | :math:`I_{alim} SWPQ_{s0} - I_{qmax} + \sqrt{I_{qmax}^2} SWPQ_{s1}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipcmd_x | :math:`x_{I^{pcmd}}` | Algeb | :math:`I_{p,ul} - x_{I^{pcmd}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipcmd_y | :math:`y_{I^{pcmd}}` | Algeb | :math:`I_{pmax} Ipcmd_{lim zu} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) + Ipcmd_{lim zi} x_{I^{pcmd}} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) - y_{I^{pcmd}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqcmd_x | :math:`x_{I^{qcmd}}` | Algeb | :math:`I_{q,ul} - x_{I^{qcmd}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqcmd_y | :math:`y_{I^{qcmd}}` | Algeb | :math:`- I_{qmax} Iqcmd_{lim zl} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) + I_{qmax} Iqcmd_{lim zu} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) + Iqcmd_{lim zi} x_{I^{qcmd}} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) - y_{I^{qcmd}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipmin | :math:`Ipmin` | Algeb | :math:`- Ipmin + \left(z_{u}^{SOClim} - 1\right) \left(I_{alim} SWPQ_{s1} + \sqrt{I_{pmax}^2} SWPQ_{s0}\right)` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | a | :math:`\theta` | ExtAlgeb | :math:`- V u y_{Ipout}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | v | :math:`V` | ExtAlgeb | :math:`- V u y_{Iqout}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | f | :math:`f` | ExtAlgeb | :math:`0` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Services ---------- +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Name | Symbol | Equation | Type | +===========+=====================+=============================================================================================================================================================================================================+==============+ | pref0 | :math:`P_{ref0}` | :math:`P_{0s} \gamma_{p}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | qref0 | :math:`Q_{ref0}` | :math:`Q_{0s} \gamma_{q}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Kft01 | :math:`K_{ft01}` | :math:`\frac{1}{- f_{t0} + f_{t1}}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Kft23 | :math:`K_{ft23}` | :math:`\frac{1}{- f_{t2} + f_{t3}}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Kvt01 | :math:`K_{vt01}` | :math:`\frac{1}{- V_{t0} + V_{t1}}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Kvt23 | :math:`K_{vt23}` | :math:`\frac{1}{- V_{t2} + V_{t3}}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Pext0 | :math:`P_{ext0}` | :math:`0` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Vcomp | :math:`V_{comp}` | :math:`\left|{V e^{i \theta} + i x_{c} \left(y_{Ipout} + i y_{Iqout}\right)}\right|` | VarService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Vqu | :math:`V_{qu}` | :math:`v_{1} - \frac{Q_{ref0} - q_{mn}}{dq/dv}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Vql | :math:`V_{ql}` | :math:`v_{0} + \frac{- Q_{ref0} + q_{mx}}{dq/dv}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Ipmaxsq | :math:`I_{pmax}^2` | :math:`\operatorname{FixPiecewise}{\left(\left( 0, \ I_{alim}^{2} - \left(y_{I^{qcmd}}\right)^{2} \leq 0\right),\left( I_{alim}^{2} - \left(y_{I^{qcmd}}\right)^{2}, \ \text{True}\right) \right)}` | VarService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Ipmaxsq0 | :math:`I_{pmax0}^2` | :math:`\operatorname{FixPiecewise}{\left(\left( 0, \ I_{alim}^{2} - \frac{Q_{ref0}^{2} u^{2}}{V^{2}} \leq 0\right),\left( I_{alim}^{2} - \frac{Q_{ref0}^{2} u^{2}}{V^{2}}, \ \text{True}\right) \right)}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Iqmaxsq | :math:`I_{qmax}^2` | :math:`\operatorname{FixPiecewise}{\left(\left( 0, \ I_{alim}^{2} - \left(y_{I^{pcmd}}\right)^{2} \leq 0\right),\left( I_{alim}^{2} - \left(y_{I^{pcmd}}\right)^{2}, \ \text{True}\right) \right)}` | VarService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Iqmaxsq0 | :math:`I_{qmax0}^2` | :math:`\operatorname{FixPiecewise}{\left(\left( 0, \ I_{alim}^{2} - \frac{P_{ref0}^{2} u^{2}}{V^{2}} \leq 0\right),\left( I_{alim}^{2} - \frac{P_{ref0}^{2} u^{2}}{V^{2}}, \ \text{True}\right) \right)}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ Discretes ----------- +------------+------------------------+-------------+------------------------------------+ | Name | Symbol | Type | Info | +============+========================+=============+====================================+ | SWPQ | :math:`SW_{PQ}` | Switcher | | +------------+------------------------+-------------+------------------------------------+ | FL1 | :math:`FL1` | Limiter | Under frequency comparer | +------------+------------------------+-------------+------------------------------------+ | FL2 | :math:`FL2` | Limiter | Over frequency comparer | +------------+------------------------+-------------+------------------------------------+ | DB_db | :math:`db_{DB}` | DeadBand | | +------------+------------------------+-------------+------------------------------------+ | VL1 | :math:`VL1` | Limiter | Under voltage comparer | +------------+------------------------+-------------+------------------------------------+ | VL2 | :math:`VL2` | Limiter | Over voltage comparer | +------------+------------------------+-------------+------------------------------------+ | VLo | :math:`VLo` | Limiter | Voltage lower limit (0.01) flag | +------------+------------------------+-------------+------------------------------------+ | PHL | :math:`PHL` | Limiter | limiter for Psum in [0, pmx] | +------------+------------------------+-------------+------------------------------------+ | VQ1 | :math:`VQ1` | Limiter | Under voltage comparer for Q droop | +------------+------------------------+-------------+------------------------------------+ | VQ2 | :math:`VQ2` | Limiter | Over voltage comparer for Q droop | +------------+------------------------+-------------+------------------------------------+ | Ipcmd_lim | :math:`lim_{I^{pcmd}}` | HardLimiter | | +------------+------------------------+-------------+------------------------------------+ | Iqcmd_lim | :math:`lim_{I^{qcmd}}` | HardLimiter | | +------------+------------------------+-------------+------------------------------------+ | LTN | :math:`LTN` | LessThan | | +------------+------------------------+-------------+------------------------------------+ | SOClim | :math:`SOClim` | HardLimiter | | +------------+------------------------+-------------+------------------------------------+ Blocks ------- +--------+------------------+-------------+----------------------------------------+ | Name | Symbol | Type | Info | +========+==================+=============+========================================+ | DB | :math:`DB` | DeadBand1 | frequency deviation deadband with gain | +--------+------------------+-------------+----------------------------------------+ | Ipcmd | :math:`I^{pcmd}` | GainLimiter | Ip with limiter and coeff. | +--------+------------------+-------------+----------------------------------------+ | Iqcmd | :math:`I^{qcmd}` | GainLimiter | Iq with limiter and coeff. | +--------+------------------+-------------+----------------------------------------+ | Ipout | :math:`Ipout` | Lag | Output Ip filter | +--------+------------------+-------------+----------------------------------------+ | Iqout | :math:`Iqout` | Lag | Output Iq filter | +--------+------------------+-------------+----------------------------------------+ | pIG | :math:`pIG` | Integrator | State of charge | +--------+------------------+-------------+----------------------------------------+ Config Fields in [ESD1] +---------------+-----------------+-------+--------------------------------------------------+-----------------+ | 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) | +---------------+-----------------+-------+--------------------------------------------------+-----------------+ | plim | :math:`P_{lim}` | 1 | enable input power limit check bound by [0, pmx] | (0, 1) | +---------------+-----------------+-------+--------------------------------------------------+-----------------+ .. _EV1: -------------------------------------------------------------------------------- EV1 -------------------------------------------------------------------------------- Electric vehicle model type 1. Modified from ESD1 model by adding the minumum power limit `pmn`. Like `pmx`, `pmn` acts on `Psum`, the sum of the active power references. The limiter that uses `pmx` and `pmn` is enabled by default. Parameters ---------- +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | Name | Symbol | Description | Default | Unit | Properties | +==========+====================+=========================================================+=========+==============+===============================+ | idx | | unique device idx | | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | u | :math:`u` | connection status | 1 | *bool* | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | name | | device name | | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | bus | | interface bus id | | | mandatory | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | gen | | static generator index | | | mandatory | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | Sn | :math:`S_n` | device MVA rating | 100 | *MVA* | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | fn | :math:`f_n` | nominal frequency | 60 | *Hz* | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | busf | | Optional BusFreq measurement device idx | | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | xc | :math:`x_c` | coupling reactance | 0 | *p.u.* | z | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | pqflag | | P/Q priority for I limit; 0-Q priority, 1-P priority | | *bool* | mandatory | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | igreg | | Remote bus idx for droop response, None for local | | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | qmx | :math:`q_{mx}` | Max. reactive power command | 0.330 | *pu* | power | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | qmn | :math:`q_{mn}` | Min. reactive power command | -0.330 | *pu* | power | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | pmx | :math:`p_{mx}` | maximum power limit | 9999 | *pu* | power | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | v0 | :math:`v_0` | Lower limit of deadband for Vdroop response | 0.800 | *pu* | non_zero | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | v1 | :math:`v_1` | Upper limit of deadband for Vdroop response | 1.100 | *pu* | non_zero | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | dqdv | :math:`dq/dv` | Q-V droop characteristics (negative) | -1 | | non_zero,power | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | fdbd | :math:`f_{dbd}` | frequency deviation deadband | -0.017 | *Hz* | non_positive | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | ddn | :math:`D_{dn}` | Gain after f deadband | 0 | *pu (MW)/Hz* | non_negative,power | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | ialim | :math:`I_{alim}` | Apparent power limit | 1.300 | | non_zero,non_negative,current | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | vt0 | :math:`V_{t0}` | Voltage tripping response curve point 0 | 0.880 | *p.u.* | non_zero,non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | vt1 | :math:`V_{t1}` | Voltage tripping response curve point 1 | 0.900 | *p.u.* | non_zero,non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | vt2 | :math:`V_{t2}` | Voltage tripping response curve point 2 | 1.100 | *p.u.* | non_zero,non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | vt3 | :math:`V_{t3}` | Voltage tripping response curve point 3 | 1.200 | *p.u.* | non_zero,non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | vrflag | :math:`z_{VR}` | V-trip is latching (0) or self-resetting (0-1) | 0 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | ft0 | :math:`f_{t0}` | Frequency tripping response curve point 0 | 59.500 | *Hz* | non_zero,non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | ft1 | :math:`f_{t1}` | Frequency tripping response curve point 1 | 59.700 | *Hz* | non_zero,non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | ft2 | :math:`f_{t2}` | Frequency tripping response curve point 2 | 60.300 | *Hz* | non_zero,non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | ft3 | :math:`f_{t3}` | Frequency tripping response curve point 3 | 60.500 | *Hz* | non_zero,non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | frflag | :math:`z_{FR}` | f-trip is latching (0) or self-resetting (0-1) | 0 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | tip | :math:`T_{ip}` | Inverter active current lag time constant | 0.020 | *s* | non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | tiq | :math:`T_{iq}` | Inverter reactive current lag time constant | 0.020 | *s* | non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | gammap | :math:`\gamma_p` | Ratio of PVD1.pref0 w.r.t to that of static PV | 1 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | gammaq | :math:`\gamma_q` | Ratio of PVD1.qref0 w.r.t to that of static PV | 1 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | recflag | :math:`z_{rec}` | Enable flag for voltage and frequency recovery limiters | 1 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | Tf | :math:`T_f` | Integrator constant for SOC model | 1 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | SOCmin | :math:`SOC_{min}` | Minimum required value for SOC in limiter | 0 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | SOCmax | :math:`SOC_{max}` | Maximum allowed value for SOC in limiter | 1 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | SOCinit | :math:`SOC_{init}` | Initial state of charge | 0.500 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | En | :math:`E_n` | Rated energy capacity | 100 | *MWh* | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | EtaC | :math:`Eta_C` | Efficiency during charging | 1 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | EtaD | :math:`Eta_D` | Efficiency during discharging | 1 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | pmn | :math:`p_{mn}` | minimum power limit | -999 | *pu* | power | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ Variables --------- +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Name | Symbol | Type | Description | Unit | Properties | +==========+======================+============+==================================================+========+============+ | Ipout_y | :math:`y_{Ipout}` | State | State in lag transfer function | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Iqout_y | :math:`y_{Iqout}` | State | State in lag transfer function | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | pIG_y | :math:`y_{pIG}` | State | Integrator output | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | SOC | :math:`SOC` | AliasState | Alias for state of charge | | | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | fHz | :math:`f_{Hz}` | Algeb | frequency in Hz | *Hz* | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Ffl | :math:`F_{fl}` | Algeb | Coeff. for under frequency | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Ffh | :math:`F_{fh}` | Algeb | Coeff. for over frequency | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Fdev | :math:`f_{dev}` | Algeb | Frequency deviation | *Hz* | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | DB_y | :math:`y_{DB}` | Algeb | Deadband type 1 output | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Fvl | :math:`F_{vl}` | Algeb | Coeff. for under voltage | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Fvh | :math:`F_{vh}` | Algeb | Coeff. for over voltage | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | vp | :math:`V_{p}` | Algeb | Sensed positive voltage | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Pext | :math:`P_{ext}` | Algeb | External power signal (for AGC) | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Pref | :math:`P_{ref}` | Algeb | Reference power signal (for scheduling setpoint) | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Psum | :math:`P_{tot}` | Algeb | Sum of P signals | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Qdrp | :math:`Q_{drp}` | Algeb | External power signal (for AGC) | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Qref | :math:`Q_{ref}` | Algeb | Reference power signal (for scheduling setpoint) | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Qsum | :math:`Q_{tot}` | Algeb | Sum of Q signals | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Ipul | :math:`I_{p,ul}` | Algeb | Ipcmd before Ip hard limit | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Iqul | :math:`I_{q,ul}` | Algeb | Iqcmd before Iq hard limit | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Ipmax | :math:`I_{pmax}` | Algeb | Upper limit of Ip | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Iqmax | :math:`I_{qmax}` | Algeb | Upper limit of Iq | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Ipcmd_x | :math:`x_{I^{pcmd}}` | Algeb | Value before limiter | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Ipcmd_y | :math:`y_{I^{pcmd}}` | Algeb | Output after limiter and post gain | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Iqcmd_x | :math:`x_{I^{qcmd}}` | Algeb | Value before limiter | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Iqcmd_y | :math:`y_{I^{qcmd}}` | Algeb | Output after limiter and post gain | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Ipmin | :math:`Ipmin` | Algeb | Minimum value of Ip | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | a | :math:`\theta` | ExtAlgeb | bus (or igreg) phase angle | *rad.* | | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | v | :math:`V` | ExtAlgeb | bus (or igreg) terminal voltage | *p.u.* | | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | f | :math:`f` | ExtAlgeb | Bus frequency | *p.u.* | | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ Initialization Equations ------------------------ +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Name | Symbol | Type | Initial Value | +==========+======================+============+========================================================================================================================================================================================================================================================================================+ | Ipout_y | :math:`y_{Ipout}` | State | :math:`1.0 y_{I^{pcmd}}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqout_y | :math:`y_{Iqout}` | State | :math:`1.0 y_{I^{qcmd}}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | pIG_y | :math:`y_{pIG}` | State | :math:`SOC_{init}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | SOC | :math:`SOC` | AliasState | | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | fHz | :math:`f_{Hz}` | Algeb | :math:`f f_{n}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ffl | :math:`F_{fl}` | Algeb | :math:`K_{ft01} z_{i}^{FL_{1}} \left(f_{Hz} - f_{t0}\right) + z_{u}^{FL_{1}}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ffh | :math:`F_{fh}` | Algeb | :math:`z_{i}^{FL_{2}} \left(K_{ft23} \left(- f_{Hz} + f_{t2}\right) + 1\right) + z_{l}^{FL_{2}}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Fdev | :math:`f_{dev}` | Algeb | :math:`f_{n} - f_{Hz}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | DB_y | :math:`y_{DB}` | Algeb | :math:`D_{dn} \left(DB_{db zl} \left(- f_{dbd} + f_{dev}\right) + DB_{db zu} f_{dev}\right)` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Fvl | :math:`F_{vl}` | Algeb | :math:`K_{vt01} z_{i}^{VL_{1}} \left(V - V_{t0}\right) + z_{u}^{VL_{1}}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Fvh | :math:`F_{vh}` | Algeb | :math:`z_{i}^{VL_{2}} \left(K_{vt23} \left(- V + V_{t2}\right) + 1\right) + z_{l}^{VL_{2}}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | vp | :math:`V_{p}` | Algeb | :math:`V z_{i}^{VLo} + 0.01 z_{l}^{VLo}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Pext | :math:`P_{ext}` | Algeb | :math:`P_{ext0} u` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Pref | :math:`P_{ref}` | Algeb | :math:`P_{ref0} u` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Psum | :math:`P_{tot}` | Algeb | :math:`u \left(P_{ext} + P_{ref} + y_{DB}\right)` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Qdrp | :math:`Q_{drp}` | Algeb | :math:`dq/dv u z_{i}^{VQ_{2}} \left(- V_{comp} + v_{1}\right) + q_{mn} z_{u}^{VQ_{2}} + q_{mx} u z_{l}^{VQ_{1}} + u z_{i}^{VQ_{1}} \left(dq/dv \left(- V_{comp} + V_{qu}\right) + q_{mx}\right)` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Qref | :math:`Q_{ref}` | Algeb | :math:`Q_{ref0} u` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Qsum | :math:`Q_{tot}` | Algeb | :math:`u \left(Q_{ref0} + dq/dv u z_{i}^{VQ_{2}} \left(- V_{comp} + v_{1}\right) + q_{mn} z_{u}^{VQ_{2}} + q_{mx} u z_{l}^{VQ_{1}} + u z_{i}^{VQ_{1}} \left(dq/dv \left(- V_{comp} + V_{qu}\right) + q_{mx}\right)\right)` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipul | :math:`I_{p,ul}` | Algeb | :math:`\frac{P_{tot} z_{i}^{PHL} + p_{mn} z_{l}^{PHL} + p_{mx} z_{u}^{PHL}}{V_{p}}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqul | :math:`I_{q,ul}` | Algeb | :math:`\frac{Q_{tot}}{V_{p}}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipmax | :math:`I_{pmax}` | Algeb | :math:`\left(1 - z_{l}^{SOClim}\right) \left(I_{alim} SWPQ_{s1} + \sqrt{I_{pmax0}^2} SWPQ_{s0}\right)` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqmax | :math:`I_{qmax}` | Algeb | :math:`I_{alim} SWPQ_{s0} + \sqrt{I_{qmax0}^2} SWPQ_{s1}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipcmd_x | :math:`x_{I^{pcmd}}` | Algeb | :math:`I_{p,ul}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipcmd_y | :math:`y_{I^{pcmd}}` | Algeb | :math:`I_{pmax} Ipcmd_{lim zu} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) + Ipcmd_{lim zi} x_{I^{pcmd}} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right)` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqcmd_x | :math:`x_{I^{qcmd}}` | Algeb | :math:`I_{q,ul}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqcmd_y | :math:`y_{I^{qcmd}}` | Algeb | :math:`- I_{qmax} Iqcmd_{lim zl} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) + I_{qmax} Iqcmd_{lim zu} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) + Iqcmd_{lim zi} x_{I^{qcmd}} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right)` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipmin | :math:`Ipmin` | Algeb | :math:`\left(z_{u}^{SOClim} - 1\right) \left(I_{alim} SWPQ_{s1} + \sqrt{I_{pmax0}^2} SWPQ_{s0}\right)` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | a | :math:`\theta` | ExtAlgeb | | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | v | :math:`V` | ExtAlgeb | | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | f | :math:`f` | ExtAlgeb | | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Differential Equations ----------------------------- +----------+-------------------+------------+---------------------------------------------------------------------------------------------------------------------------------------------+----------------+ | Name | Symbol | Type | RHS of Equation "T x' = f(x, y)" | T (LHS) | +==========+===================+============+=============================================================================================================================================+================+ | Ipout_y | :math:`y_{Ipout}` | State | :math:`1.0 y_{I^{pcmd}} - y_{Ipout}` | :math:`T_{ip}` | +----------+-------------------+------------+---------------------------------------------------------------------------------------------------------------------------------------------+----------------+ | Iqout_y | :math:`y_{Iqout}` | State | :math:`1.0 y_{I^{qcmd}} - y_{Iqout}` | :math:`T_{iq}` | +----------+-------------------+------------+---------------------------------------------------------------------------------------------------------------------------------------------+----------------+ | pIG_y | :math:`y_{pIG}` | State | :math:`\frac{S_{b,sys} \left(- \mathrm{H}_{C} V y_{Ipout} z_{1}^{LTN} - \frac{V y_{Ipout} z_{0}^{LTN}}{\mathrm{H}_{D}}\right)}{3600 E_{n}}` | :math:`T_f` | +----------+-------------------+------------+---------------------------------------------------------------------------------------------------------------------------------------------+----------------+ | SOC | :math:`SOC` | AliasState | :math:`0` | | +----------+-------------------+------------+---------------------------------------------------------------------------------------------------------------------------------------------+----------------+ Algebraic Equations ----------------------------- +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Name | Symbol | Type | RHS of Equation "0 = g(x, y)" | +==========+======================+==========+=======================================================================================================================================================================================================================================================================================================+ | fHz | :math:`f_{Hz}` | Algeb | :math:`f f_{n} - f_{Hz}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ffl | :math:`F_{fl}` | Algeb | :math:`- F_{fl} + K_{ft01} z_{i}^{FL_{1}} \left(f_{Hz} - f_{t0}\right) + z_{u}^{FL_{1}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ffh | :math:`F_{fh}` | Algeb | :math:`- F_{fh} + z_{i}^{FL_{2}} \left(K_{ft23} \left(- f_{Hz} + f_{t2}\right) + 1\right) + z_{l}^{FL_{2}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Fdev | :math:`f_{dev}` | Algeb | :math:`f_{n} - f_{Hz} - f_{dev}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | DB_y | :math:`y_{DB}` | Algeb | :math:`D_{dn} \left(DB_{db zl} \left(- f_{dbd} + f_{dev}\right) + DB_{db zu} f_{dev}\right) - y_{DB}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Fvl | :math:`F_{vl}` | Algeb | :math:`- F_{vl} + K_{vt01} z_{i}^{VL_{1}} \left(V - V_{t0}\right) + z_{u}^{VL_{1}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Fvh | :math:`F_{vh}` | Algeb | :math:`- F_{vh} + z_{i}^{VL_{2}} \left(K_{vt23} \left(- V + V_{t2}\right) + 1\right) + z_{l}^{VL_{2}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | vp | :math:`V_{p}` | Algeb | :math:`V z_{i}^{VLo} - V_{p} + 0.01 z_{l}^{VLo}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Pext | :math:`P_{ext}` | Algeb | :math:`P_{ext0} u - P_{ext}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Pref | :math:`P_{ref}` | Algeb | :math:`P_{ref0} u - P_{ref}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Psum | :math:`P_{tot}` | Algeb | :math:`- P_{tot} + u \left(P_{ext} + P_{ref} + y_{DB}\right)` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Qdrp | :math:`Q_{drp}` | Algeb | :math:`- Q_{drp} + dq/dv u z_{i}^{VQ_{2}} \left(- V_{comp} + v_{1}\right) + q_{mn} z_{u}^{VQ_{2}} + q_{mx} u z_{l}^{VQ_{1}} + u z_{i}^{VQ_{1}} \left(dq/dv \left(- V_{comp} + V_{qu}\right) + q_{mx}\right)` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Qref | :math:`Q_{ref}` | Algeb | :math:`Q_{ref0} u - Q_{ref}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Qsum | :math:`Q_{tot}` | Algeb | :math:`- Q_{tot} + u \left(Q_{drp} + Q_{ref}\right)` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipul | :math:`I_{p,ul}` | Algeb | :math:`- I_{p,ul} + \frac{P_{tot} z_{i}^{PHL} + p_{mn} z_{l}^{PHL} + p_{mx} z_{u}^{PHL}}{V_{p}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqul | :math:`I_{q,ul}` | Algeb | :math:`- I_{q,ul} + \frac{Q_{tot}}{V_{p}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipmax | :math:`I_{pmax}` | Algeb | :math:`- I_{pmax} + \left(1 - z_{l}^{SOClim}\right) \left(I_{alim} SWPQ_{s1} + \sqrt{I_{pmax}^2} SWPQ_{s0}\right)` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqmax | :math:`I_{qmax}` | Algeb | :math:`I_{alim} SWPQ_{s0} - I_{qmax} + \sqrt{I_{qmax}^2} SWPQ_{s1}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipcmd_x | :math:`x_{I^{pcmd}}` | Algeb | :math:`I_{p,ul} - x_{I^{pcmd}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipcmd_y | :math:`y_{I^{pcmd}}` | Algeb | :math:`I_{pmax} Ipcmd_{lim zu} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) + Ipcmd_{lim zi} x_{I^{pcmd}} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) - y_{I^{pcmd}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqcmd_x | :math:`x_{I^{qcmd}}` | Algeb | :math:`I_{q,ul} - x_{I^{qcmd}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqcmd_y | :math:`y_{I^{qcmd}}` | Algeb | :math:`- I_{qmax} Iqcmd_{lim zl} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) + I_{qmax} Iqcmd_{lim zu} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) + Iqcmd_{lim zi} x_{I^{qcmd}} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) - y_{I^{qcmd}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipmin | :math:`Ipmin` | Algeb | :math:`- Ipmin + \left(z_{u}^{SOClim} - 1\right) \left(I_{alim} SWPQ_{s1} + \sqrt{I_{pmax}^2} SWPQ_{s0}\right)` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | a | :math:`\theta` | ExtAlgeb | :math:`- V u y_{Ipout}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | v | :math:`V` | ExtAlgeb | :math:`- V u y_{Iqout}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | f | :math:`f` | ExtAlgeb | :math:`0` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Services ---------- +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Name | Symbol | Equation | Type | +===========+=====================+=============================================================================================================================================================================================================+==============+ | pref0 | :math:`P_{ref0}` | :math:`P_{0s} \gamma_{p}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | qref0 | :math:`Q_{ref0}` | :math:`Q_{0s} \gamma_{q}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Kft01 | :math:`K_{ft01}` | :math:`\frac{1}{- f_{t0} + f_{t1}}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Kft23 | :math:`K_{ft23}` | :math:`\frac{1}{- f_{t2} + f_{t3}}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Kvt01 | :math:`K_{vt01}` | :math:`\frac{1}{- V_{t0} + V_{t1}}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Kvt23 | :math:`K_{vt23}` | :math:`\frac{1}{- V_{t2} + V_{t3}}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Pext0 | :math:`P_{ext0}` | :math:`0` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Vcomp | :math:`V_{comp}` | :math:`\left|{V e^{i \theta} + i x_{c} \left(y_{Ipout} + i y_{Iqout}\right)}\right|` | VarService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Vqu | :math:`V_{qu}` | :math:`v_{1} - \frac{Q_{ref0} - q_{mn}}{dq/dv}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Vql | :math:`V_{ql}` | :math:`v_{0} + \frac{- Q_{ref0} + q_{mx}}{dq/dv}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Ipmaxsq | :math:`I_{pmax}^2` | :math:`\operatorname{FixPiecewise}{\left(\left( 0, \ I_{alim}^{2} - \left(y_{I^{qcmd}}\right)^{2} \leq 0\right),\left( I_{alim}^{2} - \left(y_{I^{qcmd}}\right)^{2}, \ \text{True}\right) \right)}` | VarService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Ipmaxsq0 | :math:`I_{pmax0}^2` | :math:`\operatorname{FixPiecewise}{\left(\left( 0, \ I_{alim}^{2} - \frac{Q_{ref0}^{2} u^{2}}{V^{2}} \leq 0\right),\left( I_{alim}^{2} - \frac{Q_{ref0}^{2} u^{2}}{V^{2}}, \ \text{True}\right) \right)}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Iqmaxsq | :math:`I_{qmax}^2` | :math:`\operatorname{FixPiecewise}{\left(\left( 0, \ I_{alim}^{2} - \left(y_{I^{pcmd}}\right)^{2} \leq 0\right),\left( I_{alim}^{2} - \left(y_{I^{pcmd}}\right)^{2}, \ \text{True}\right) \right)}` | VarService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Iqmaxsq0 | :math:`I_{qmax0}^2` | :math:`\operatorname{FixPiecewise}{\left(\left( 0, \ I_{alim}^{2} - \frac{P_{ref0}^{2} u^{2}}{V^{2}} \leq 0\right),\left( I_{alim}^{2} - \frac{P_{ref0}^{2} u^{2}}{V^{2}}, \ \text{True}\right) \right)}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ Discretes ----------- +------------+------------------------+-------------+------------------------------------+ | Name | Symbol | Type | Info | +============+========================+=============+====================================+ | SWPQ | :math:`SW_{PQ}` | Switcher | | +------------+------------------------+-------------+------------------------------------+ | FL1 | :math:`FL1` | Limiter | Under frequency comparer | +------------+------------------------+-------------+------------------------------------+ | FL2 | :math:`FL2` | Limiter | Over frequency comparer | +------------+------------------------+-------------+------------------------------------+ | DB_db | :math:`db_{DB}` | DeadBand | | +------------+------------------------+-------------+------------------------------------+ | VL1 | :math:`VL1` | Limiter | Under voltage comparer | +------------+------------------------+-------------+------------------------------------+ | VL2 | :math:`VL2` | Limiter | Over voltage comparer | +------------+------------------------+-------------+------------------------------------+ | VLo | :math:`VLo` | Limiter | Voltage lower limit (0.01) flag | +------------+------------------------+-------------+------------------------------------+ | PHL | :math:`PHL` | Limiter | limiter for Psum in [pmn, pmx] | +------------+------------------------+-------------+------------------------------------+ | VQ1 | :math:`VQ1` | Limiter | Under voltage comparer for Q droop | +------------+------------------------+-------------+------------------------------------+ | VQ2 | :math:`VQ2` | Limiter | Over voltage comparer for Q droop | +------------+------------------------+-------------+------------------------------------+ | Ipcmd_lim | :math:`lim_{I^{pcmd}}` | HardLimiter | | +------------+------------------------+-------------+------------------------------------+ | Iqcmd_lim | :math:`lim_{I^{qcmd}}` | HardLimiter | | +------------+------------------------+-------------+------------------------------------+ | LTN | :math:`LTN` | LessThan | | +------------+------------------------+-------------+------------------------------------+ | SOClim | :math:`SOClim` | HardLimiter | | +------------+------------------------+-------------+------------------------------------+ Blocks ------- +--------+------------------+-------------+----------------------------------------+ | Name | Symbol | Type | Info | +========+==================+=============+========================================+ | DB | :math:`DB` | DeadBand1 | frequency deviation deadband with gain | +--------+------------------+-------------+----------------------------------------+ | Ipcmd | :math:`I^{pcmd}` | GainLimiter | Ip with limiter and coeff. | +--------+------------------+-------------+----------------------------------------+ | Iqcmd | :math:`I^{qcmd}` | GainLimiter | Iq with limiter and coeff. | +--------+------------------+-------------+----------------------------------------+ | Ipout | :math:`Ipout` | Lag | Output Ip filter | +--------+------------------+-------------+----------------------------------------+ | Iqout | :math:`Iqout` | Lag | Output Iq filter | +--------+------------------+-------------+----------------------------------------+ | pIG | :math:`pIG` | Integrator | State of charge | +--------+------------------+-------------+----------------------------------------+ Config Fields in [EV1] +---------------+-----------------+-------+--------------------------------------------------+-----------------+ | 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) | +---------------+-----------------+-------+--------------------------------------------------+-----------------+ | plim | :math:`P_{lim}` | 1 | enable input power limit check bound by [0, pmx] | (0, 1) | +---------------+-----------------+-------+--------------------------------------------------+-----------------+ .. _EV2: -------------------------------------------------------------------------------- EV2 -------------------------------------------------------------------------------- Electric vehicle model type 2. Derived from EV1, EV2 introduces `pcap` multiplied to `pmx`. `Psum` will be limited to [pmn, pmx * pcap]. The model does not check the signs or values of `pmn`, `pmx`, or `pcap`. The input data is required to satisfy `pmn <= pmx * pcap`. Parameters ---------- +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | Name | Symbol | Description | Default | Unit | Properties | +==========+====================+=========================================================+=========+==============+===============================+ | idx | | unique device idx | | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | u | :math:`u` | connection status | 1 | *bool* | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | name | | device name | | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | bus | | interface bus id | | | mandatory | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | gen | | static generator index | | | mandatory | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | Sn | :math:`S_n` | device MVA rating | 100 | *MVA* | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | fn | :math:`f_n` | nominal frequency | 60 | *Hz* | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | busf | | Optional BusFreq measurement device idx | | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | xc | :math:`x_c` | coupling reactance | 0 | *p.u.* | z | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | pqflag | | P/Q priority for I limit; 0-Q priority, 1-P priority | | *bool* | mandatory | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | igreg | | Remote bus idx for droop response, None for local | | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | qmx | :math:`q_{mx}` | Max. reactive power command | 0.330 | *pu* | power | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | qmn | :math:`q_{mn}` | Min. reactive power command | -0.330 | *pu* | power | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | pmx | :math:`p_{mx}` | maximum power limit | 9999 | *pu* | power | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | v0 | :math:`v_0` | Lower limit of deadband for Vdroop response | 0.800 | *pu* | non_zero | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | v1 | :math:`v_1` | Upper limit of deadband for Vdroop response | 1.100 | *pu* | non_zero | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | dqdv | :math:`dq/dv` | Q-V droop characteristics (negative) | -1 | | non_zero,power | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | fdbd | :math:`f_{dbd}` | frequency deviation deadband | -0.017 | *Hz* | non_positive | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | ddn | :math:`D_{dn}` | Gain after f deadband | 1 | *pu (MW)/Hz* | non_negative,power | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | ialim | :math:`I_{alim}` | Apparent power limit | 1.300 | | non_zero,non_negative,current | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | vt0 | :math:`V_{t0}` | Voltage tripping response curve point 0 | 0.880 | *p.u.* | non_zero,non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | vt1 | :math:`V_{t1}` | Voltage tripping response curve point 1 | 0.900 | *p.u.* | non_zero,non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | vt2 | :math:`V_{t2}` | Voltage tripping response curve point 2 | 1.100 | *p.u.* | non_zero,non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | vt3 | :math:`V_{t3}` | Voltage tripping response curve point 3 | 1.200 | *p.u.* | non_zero,non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | vrflag | :math:`z_{VR}` | V-trip is latching (0) or self-resetting (0-1) | 0 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | ft0 | :math:`f_{t0}` | Frequency tripping response curve point 0 | 59.500 | *Hz* | non_zero,non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | ft1 | :math:`f_{t1}` | Frequency tripping response curve point 1 | 59.700 | *Hz* | non_zero,non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | ft2 | :math:`f_{t2}` | Frequency tripping response curve point 2 | 60.300 | *Hz* | non_zero,non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | ft3 | :math:`f_{t3}` | Frequency tripping response curve point 3 | 60.500 | *Hz* | non_zero,non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | frflag | :math:`z_{FR}` | f-trip is latching (0) or self-resetting (0-1) | 0 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | tip | :math:`T_{ip}` | Inverter active current lag time constant | 0.020 | *s* | non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | tiq | :math:`T_{iq}` | Inverter reactive current lag time constant | 0.020 | *s* | non_negative | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | gammap | :math:`\gamma_p` | Ratio of PVD1.pref0 w.r.t to that of static PV | 1 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | gammaq | :math:`\gamma_q` | Ratio of PVD1.qref0 w.r.t to that of static PV | 1 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | recflag | :math:`z_{rec}` | Enable flag for voltage and frequency recovery limiters | 1 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | Tf | :math:`T_f` | Integrator constant for SOC model | 1 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | SOCmin | :math:`SOC_{min}` | Minimum required value for SOC in limiter | 0 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | SOCmax | :math:`SOC_{max}` | Maximum allowed value for SOC in limiter | 1 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | SOCinit | :math:`SOC_{init}` | Initial state of charge | 0.500 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | En | :math:`E_n` | Rated energy capacity | 100 | *MWh* | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | EtaC | :math:`Eta_C` | Efficiency during charging | 1 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | EtaD | :math:`Eta_D` | Efficiency during discharging | 1 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | pmn | :math:`p_{mn}` | minimum power limit | -999 | *pu* | power | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ | pcap | :math:`p_{cap}` | power ratio multiplied to pmx in [-1, 1] | 0 | | | +----------+--------------------+---------------------------------------------------------+---------+--------------+-------------------------------+ Variables --------- +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Name | Symbol | Type | Description | Unit | Properties | +==========+======================+============+==================================================+========+============+ | Ipout_y | :math:`y_{Ipout}` | State | State in lag transfer function | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Iqout_y | :math:`y_{Iqout}` | State | State in lag transfer function | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | pIG_y | :math:`y_{pIG}` | State | Integrator output | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | SOC | :math:`SOC` | AliasState | Alias for state of charge | | | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | fHz | :math:`f_{Hz}` | Algeb | frequency in Hz | *Hz* | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Ffl | :math:`F_{fl}` | Algeb | Coeff. for under frequency | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Ffh | :math:`F_{fh}` | Algeb | Coeff. for over frequency | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Fdev | :math:`f_{dev}` | Algeb | Frequency deviation | *Hz* | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | DB_y | :math:`y_{DB}` | Algeb | Deadband type 1 output | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Fvl | :math:`F_{vl}` | Algeb | Coeff. for under voltage | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Fvh | :math:`F_{vh}` | Algeb | Coeff. for over voltage | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | vp | :math:`V_{p}` | Algeb | Sensed positive voltage | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Pext | :math:`P_{ext}` | Algeb | External power signal (for AGC) | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Pref | :math:`P_{ref}` | Algeb | Reference power signal (for scheduling setpoint) | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Psum | :math:`P_{tot}` | Algeb | Sum of P signals | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Qdrp | :math:`Q_{drp}` | Algeb | External power signal (for AGC) | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Qref | :math:`Q_{ref}` | Algeb | Reference power signal (for scheduling setpoint) | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Qsum | :math:`Q_{tot}` | Algeb | Sum of Q signals | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Ipul | :math:`I_{p,ul}` | Algeb | Ipcmd before Ip hard limit | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Iqul | :math:`I_{q,ul}` | Algeb | Iqcmd before Iq hard limit | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Ipmax | :math:`I_{pmax}` | Algeb | Upper limit of Ip | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Iqmax | :math:`I_{qmax}` | Algeb | Upper limit of Iq | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Ipcmd_x | :math:`x_{I^{pcmd}}` | Algeb | Value before limiter | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Ipcmd_y | :math:`y_{I^{pcmd}}` | Algeb | Output after limiter and post gain | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Iqcmd_x | :math:`x_{I^{qcmd}}` | Algeb | Value before limiter | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Iqcmd_y | :math:`y_{I^{qcmd}}` | Algeb | Output after limiter and post gain | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | Ipmin | :math:`Ipmin` | Algeb | Minimum value of Ip | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | PHLup | :math:`PHL_{upper}` | Algeb | PHL upper limit | | v_str | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | a | :math:`\theta` | ExtAlgeb | bus (or igreg) phase angle | *rad.* | | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | v | :math:`V` | ExtAlgeb | bus (or igreg) terminal voltage | *p.u.* | | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ | f | :math:`f` | ExtAlgeb | Bus frequency | *p.u.* | | +----------+----------------------+------------+--------------------------------------------------+--------+------------+ Initialization Equations ------------------------ +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Name | Symbol | Type | Initial Value | +==========+======================+============+========================================================================================================================================================================================================================================================================================+ | Ipout_y | :math:`y_{Ipout}` | State | :math:`1.0 y_{I^{pcmd}}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqout_y | :math:`y_{Iqout}` | State | :math:`1.0 y_{I^{qcmd}}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | pIG_y | :math:`y_{pIG}` | State | :math:`SOC_{init}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | SOC | :math:`SOC` | AliasState | | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | fHz | :math:`f_{Hz}` | Algeb | :math:`f f_{n}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ffl | :math:`F_{fl}` | Algeb | :math:`K_{ft01} z_{i}^{FL_{1}} \left(f_{Hz} - f_{t0}\right) + z_{u}^{FL_{1}}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ffh | :math:`F_{fh}` | Algeb | :math:`z_{i}^{FL_{2}} \left(K_{ft23} \left(- f_{Hz} + f_{t2}\right) + 1\right) + z_{l}^{FL_{2}}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Fdev | :math:`f_{dev}` | Algeb | :math:`f_{n} - f_{Hz}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | DB_y | :math:`y_{DB}` | Algeb | :math:`D_{dn} \left(DB_{db zl} \left(- f_{dbd} + f_{dev}\right) + DB_{db zu} f_{dev}\right)` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Fvl | :math:`F_{vl}` | Algeb | :math:`K_{vt01} z_{i}^{VL_{1}} \left(V - V_{t0}\right) + z_{u}^{VL_{1}}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Fvh | :math:`F_{vh}` | Algeb | :math:`z_{i}^{VL_{2}} \left(K_{vt23} \left(- V + V_{t2}\right) + 1\right) + z_{l}^{VL_{2}}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | vp | :math:`V_{p}` | Algeb | :math:`V z_{i}^{VLo} + 0.01 z_{l}^{VLo}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Pext | :math:`P_{ext}` | Algeb | :math:`P_{ext0} u` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Pref | :math:`P_{ref}` | Algeb | :math:`P_{ref0} u` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Psum | :math:`P_{tot}` | Algeb | :math:`u \left(P_{ext} + P_{ref} + y_{DB}\right)` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Qdrp | :math:`Q_{drp}` | Algeb | :math:`dq/dv u z_{i}^{VQ_{2}} \left(- V_{comp} + v_{1}\right) + q_{mn} z_{u}^{VQ_{2}} + q_{mx} u z_{l}^{VQ_{1}} + u z_{i}^{VQ_{1}} \left(dq/dv \left(- V_{comp} + V_{qu}\right) + q_{mx}\right)` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Qref | :math:`Q_{ref}` | Algeb | :math:`Q_{ref0} u` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Qsum | :math:`Q_{tot}` | Algeb | :math:`u \left(Q_{ref0} + dq/dv u z_{i}^{VQ_{2}} \left(- V_{comp} + v_{1}\right) + q_{mn} z_{u}^{VQ_{2}} + q_{mx} u z_{l}^{VQ_{1}} + u z_{i}^{VQ_{1}} \left(dq/dv \left(- V_{comp} + V_{qu}\right) + q_{mx}\right)\right)` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipul | :math:`I_{p,ul}` | Algeb | :math:`\frac{PHL_{upper} z_{u}^{PHL_{2}} + P_{tot} z_{i}^{PHL_{2}} + p_{mn} z_{l}^{PHL_{2}}}{V_{p}}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqul | :math:`I_{q,ul}` | Algeb | :math:`\frac{Q_{tot}}{V_{p}}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipmax | :math:`I_{pmax}` | Algeb | :math:`\left(1 - z_{l}^{SOClim}\right) \left(I_{alim} SWPQ_{s1} + \sqrt{I_{pmax0}^2} SWPQ_{s0}\right)` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqmax | :math:`I_{qmax}` | Algeb | :math:`I_{alim} SWPQ_{s0} + \sqrt{I_{qmax0}^2} SWPQ_{s1}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipcmd_x | :math:`x_{I^{pcmd}}` | Algeb | :math:`I_{p,ul}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipcmd_y | :math:`y_{I^{pcmd}}` | Algeb | :math:`I_{pmax} Ipcmd_{lim zu} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) + Ipcmd_{lim zi} x_{I^{pcmd}} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right)` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqcmd_x | :math:`x_{I^{qcmd}}` | Algeb | :math:`I_{q,ul}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqcmd_y | :math:`y_{I^{qcmd}}` | Algeb | :math:`- I_{qmax} Iqcmd_{lim zl} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) + I_{qmax} Iqcmd_{lim zu} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) + Iqcmd_{lim zi} x_{I^{qcmd}} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right)` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipmin | :math:`Ipmin` | Algeb | :math:`\left(z_{u}^{SOClim} - 1\right) \left(I_{alim} SWPQ_{s1} + \sqrt{I_{pmax0}^2} SWPQ_{s0}\right)` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | PHLup | :math:`PHL_{upper}` | Algeb | :math:`p_{cap} p_{mx}` | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | a | :math:`\theta` | ExtAlgeb | | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | v | :math:`V` | ExtAlgeb | | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | f | :math:`f` | ExtAlgeb | | +----------+----------------------+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Differential Equations ----------------------------- +----------+-------------------+------------+---------------------------------------------------------------------------------------------------------------------------------------------+----------------+ | Name | Symbol | Type | RHS of Equation "T x' = f(x, y)" | T (LHS) | +==========+===================+============+=============================================================================================================================================+================+ | Ipout_y | :math:`y_{Ipout}` | State | :math:`1.0 y_{I^{pcmd}} - y_{Ipout}` | :math:`T_{ip}` | +----------+-------------------+------------+---------------------------------------------------------------------------------------------------------------------------------------------+----------------+ | Iqout_y | :math:`y_{Iqout}` | State | :math:`1.0 y_{I^{qcmd}} - y_{Iqout}` | :math:`T_{iq}` | +----------+-------------------+------------+---------------------------------------------------------------------------------------------------------------------------------------------+----------------+ | pIG_y | :math:`y_{pIG}` | State | :math:`\frac{S_{b,sys} \left(- \mathrm{H}_{C} V y_{Ipout} z_{1}^{LTN} - \frac{V y_{Ipout} z_{0}^{LTN}}{\mathrm{H}_{D}}\right)}{3600 E_{n}}` | :math:`T_f` | +----------+-------------------+------------+---------------------------------------------------------------------------------------------------------------------------------------------+----------------+ | SOC | :math:`SOC` | AliasState | :math:`0` | | +----------+-------------------+------------+---------------------------------------------------------------------------------------------------------------------------------------------+----------------+ Algebraic Equations ----------------------------- +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Name | Symbol | Type | RHS of Equation "0 = g(x, y)" | +==========+======================+==========+=======================================================================================================================================================================================================================================================================================================+ | fHz | :math:`f_{Hz}` | Algeb | :math:`f f_{n} - f_{Hz}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ffl | :math:`F_{fl}` | Algeb | :math:`- F_{fl} + K_{ft01} z_{i}^{FL_{1}} \left(f_{Hz} - f_{t0}\right) + z_{u}^{FL_{1}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ffh | :math:`F_{fh}` | Algeb | :math:`- F_{fh} + z_{i}^{FL_{2}} \left(K_{ft23} \left(- f_{Hz} + f_{t2}\right) + 1\right) + z_{l}^{FL_{2}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Fdev | :math:`f_{dev}` | Algeb | :math:`f_{n} - f_{Hz} - f_{dev}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | DB_y | :math:`y_{DB}` | Algeb | :math:`D_{dn} \left(DB_{db zl} \left(- f_{dbd} + f_{dev}\right) + DB_{db zu} f_{dev}\right) - y_{DB}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Fvl | :math:`F_{vl}` | Algeb | :math:`- F_{vl} + K_{vt01} z_{i}^{VL_{1}} \left(V - V_{t0}\right) + z_{u}^{VL_{1}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Fvh | :math:`F_{vh}` | Algeb | :math:`- F_{vh} + z_{i}^{VL_{2}} \left(K_{vt23} \left(- V + V_{t2}\right) + 1\right) + z_{l}^{VL_{2}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | vp | :math:`V_{p}` | Algeb | :math:`V z_{i}^{VLo} - V_{p} + 0.01 z_{l}^{VLo}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Pext | :math:`P_{ext}` | Algeb | :math:`P_{ext0} u - P_{ext}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Pref | :math:`P_{ref}` | Algeb | :math:`P_{ref0} u - P_{ref}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Psum | :math:`P_{tot}` | Algeb | :math:`- P_{tot} + u \left(P_{ext} + P_{ref} + y_{DB}\right)` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Qdrp | :math:`Q_{drp}` | Algeb | :math:`- Q_{drp} + dq/dv u z_{i}^{VQ_{2}} \left(- V_{comp} + v_{1}\right) + q_{mn} z_{u}^{VQ_{2}} + q_{mx} u z_{l}^{VQ_{1}} + u z_{i}^{VQ_{1}} \left(dq/dv \left(- V_{comp} + V_{qu}\right) + q_{mx}\right)` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Qref | :math:`Q_{ref}` | Algeb | :math:`Q_{ref0} u - Q_{ref}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Qsum | :math:`Q_{tot}` | Algeb | :math:`- Q_{tot} + u \left(Q_{drp} + Q_{ref}\right)` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipul | :math:`I_{p,ul}` | Algeb | :math:`- I_{p,ul} + \frac{PHL_{upper} z_{u}^{PHL_{2}} + P_{tot} z_{i}^{PHL_{2}} + p_{mn} z_{l}^{PHL_{2}}}{V_{p}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqul | :math:`I_{q,ul}` | Algeb | :math:`- I_{q,ul} + \frac{Q_{tot}}{V_{p}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipmax | :math:`I_{pmax}` | Algeb | :math:`- I_{pmax} + \left(1 - z_{l}^{SOClim}\right) \left(I_{alim} SWPQ_{s1} + \sqrt{I_{pmax}^2} SWPQ_{s0}\right)` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqmax | :math:`I_{qmax}` | Algeb | :math:`I_{alim} SWPQ_{s0} - I_{qmax} + \sqrt{I_{qmax}^2} SWPQ_{s1}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipcmd_x | :math:`x_{I^{pcmd}}` | Algeb | :math:`I_{p,ul} - x_{I^{pcmd}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipcmd_y | :math:`y_{I^{pcmd}}` | Algeb | :math:`I_{pmax} Ipcmd_{lim zu} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) + Ipcmd_{lim zi} x_{I^{pcmd}} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) - y_{I^{pcmd}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqcmd_x | :math:`x_{I^{qcmd}}` | Algeb | :math:`I_{q,ul} - x_{I^{qcmd}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Iqcmd_y | :math:`y_{I^{qcmd}}` | Algeb | :math:`- I_{qmax} Iqcmd_{lim zl} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) + I_{qmax} Iqcmd_{lim zu} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) + Iqcmd_{lim zi} x_{I^{qcmd}} \left(F_{fh} F_{fl} F_{vh} F_{vl} z_{rec} - z_{rec} + 1\right) - y_{I^{qcmd}}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Ipmin | :math:`Ipmin` | Algeb | :math:`- Ipmin + \left(z_{u}^{SOClim} - 1\right) \left(I_{alim} SWPQ_{s1} + \sqrt{I_{pmax}^2} SWPQ_{s0}\right)` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | PHLup | :math:`PHL_{upper}` | Algeb | :math:`- PHL_{upper} + p_{cap} p_{mx}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | a | :math:`\theta` | ExtAlgeb | :math:`- V u y_{Ipout}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | v | :math:`V` | ExtAlgeb | :math:`- V u y_{Iqout}` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | f | :math:`f` | ExtAlgeb | :math:`0` | +----------+----------------------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Services ---------- +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Name | Symbol | Equation | Type | +===========+=====================+=============================================================================================================================================================================================================+==============+ | pref0 | :math:`P_{ref0}` | :math:`P_{0s} \gamma_{p}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | qref0 | :math:`Q_{ref0}` | :math:`Q_{0s} \gamma_{q}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Kft01 | :math:`K_{ft01}` | :math:`\frac{1}{- f_{t0} + f_{t1}}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Kft23 | :math:`K_{ft23}` | :math:`\frac{1}{- f_{t2} + f_{t3}}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Kvt01 | :math:`K_{vt01}` | :math:`\frac{1}{- V_{t0} + V_{t1}}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Kvt23 | :math:`K_{vt23}` | :math:`\frac{1}{- V_{t2} + V_{t3}}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Pext0 | :math:`P_{ext0}` | :math:`0` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Vcomp | :math:`V_{comp}` | :math:`\left|{V e^{i \theta} + i x_{c} \left(y_{Ipout} + i y_{Iqout}\right)}\right|` | VarService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Vqu | :math:`V_{qu}` | :math:`v_{1} - \frac{Q_{ref0} - q_{mn}}{dq/dv}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Vql | :math:`V_{ql}` | :math:`v_{0} + \frac{- Q_{ref0} + q_{mx}}{dq/dv}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Ipmaxsq | :math:`I_{pmax}^2` | :math:`\operatorname{FixPiecewise}{\left(\left( 0, \ I_{alim}^{2} - \left(y_{I^{qcmd}}\right)^{2} \leq 0\right),\left( I_{alim}^{2} - \left(y_{I^{qcmd}}\right)^{2}, \ \text{True}\right) \right)}` | VarService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Ipmaxsq0 | :math:`I_{pmax0}^2` | :math:`\operatorname{FixPiecewise}{\left(\left( 0, \ I_{alim}^{2} - \frac{Q_{ref0}^{2} u^{2}}{V^{2}} \leq 0\right),\left( I_{alim}^{2} - \frac{Q_{ref0}^{2} u^{2}}{V^{2}}, \ \text{True}\right) \right)}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Iqmaxsq | :math:`I_{qmax}^2` | :math:`\operatorname{FixPiecewise}{\left(\left( 0, \ I_{alim}^{2} - \left(y_{I^{pcmd}}\right)^{2} \leq 0\right),\left( I_{alim}^{2} - \left(y_{I^{pcmd}}\right)^{2}, \ \text{True}\right) \right)}` | VarService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ | Iqmaxsq0 | :math:`I_{qmax0}^2` | :math:`\operatorname{FixPiecewise}{\left(\left( 0, \ I_{alim}^{2} - \frac{P_{ref0}^{2} u^{2}}{V^{2}} \leq 0\right),\left( I_{alim}^{2} - \frac{P_{ref0}^{2} u^{2}}{V^{2}}, \ \text{True}\right) \right)}` | ConstService | +-----------+---------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+ Discretes ----------- +------------+------------------------+-------------+---------------------------------------+ | Name | Symbol | Type | Info | +============+========================+=============+=======================================+ | SWPQ | :math:`SW_{PQ}` | Switcher | | +------------+------------------------+-------------+---------------------------------------+ | FL1 | :math:`FL1` | Limiter | Under frequency comparer | +------------+------------------------+-------------+---------------------------------------+ | FL2 | :math:`FL2` | Limiter | Over frequency comparer | +------------+------------------------+-------------+---------------------------------------+ | DB_db | :math:`db_{DB}` | DeadBand | | +------------+------------------------+-------------+---------------------------------------+ | VL1 | :math:`VL1` | Limiter | Under voltage comparer | +------------+------------------------+-------------+---------------------------------------+ | VL2 | :math:`VL2` | Limiter | Over voltage comparer | +------------+------------------------+-------------+---------------------------------------+ | VLo | :math:`VLo` | Limiter | Voltage lower limit (0.01) flag | +------------+------------------------+-------------+---------------------------------------+ | PHL | :math:`PHL` | Limiter | limiter for Psum in [pmn, pmx] | +------------+------------------------+-------------+---------------------------------------+ | VQ1 | :math:`VQ1` | Limiter | Under voltage comparer for Q droop | +------------+------------------------+-------------+---------------------------------------+ | VQ2 | :math:`VQ2` | Limiter | Over voltage comparer for Q droop | +------------+------------------------+-------------+---------------------------------------+ | Ipcmd_lim | :math:`lim_{I^{pcmd}}` | HardLimiter | | +------------+------------------------+-------------+---------------------------------------+ | Iqcmd_lim | :math:`lim_{I^{qcmd}}` | HardLimiter | | +------------+------------------------+-------------+---------------------------------------+ | LTN | :math:`LTN` | LessThan | | +------------+------------------------+-------------+---------------------------------------+ | SOClim | :math:`SOClim` | HardLimiter | | +------------+------------------------+-------------+---------------------------------------+ | PHL2 | :math:`PHL2` | Limiter | limiter for Psum in [pmn, pcap * pmx] | +------------+------------------------+-------------+---------------------------------------+ Blocks ------- +--------+------------------+-------------+----------------------------------------+ | Name | Symbol | Type | Info | +========+==================+=============+========================================+ | DB | :math:`DB` | DeadBand1 | frequency deviation deadband with gain | +--------+------------------+-------------+----------------------------------------+ | Ipcmd | :math:`I^{pcmd}` | GainLimiter | Ip with limiter and coeff. | +--------+------------------+-------------+----------------------------------------+ | Iqcmd | :math:`I^{qcmd}` | GainLimiter | Iq with limiter and coeff. | +--------+------------------+-------------+----------------------------------------+ | Ipout | :math:`Ipout` | Lag | Output Ip filter | +--------+------------------+-------------+----------------------------------------+ | Iqout | :math:`Iqout` | Lag | Output Iq filter | +--------+------------------+-------------+----------------------------------------+ | pIG | :math:`pIG` | Integrator | State of charge | +--------+------------------+-------------+----------------------------------------+ Config Fields in [EV2] +---------------+-----------------+-------+--------------------------------------------------+-----------------+ | 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) | +---------------+-----------------+-------+--------------------------------------------------+-----------------+ | plim | :math:`P_{lim}` | 1 | enable input power limit check bound by [0, pmx] | (0, 1) | +---------------+-----------------+-------+--------------------------------------------------+-----------------+