# Plant Controller Model: REPC_C

AutoCorrection Properties

Following checks and corrections are applied during Validation and AutoCorrection.

- The following parameter pairs should have a maximum value that is positive and a minimum value that is negative:

Femax/Femin, Emax/Emin, and frmax/frmin

If both values are positive, then we will assume the minimum value should have had a negative sign.

If both values are negative, then we will assume the maximum value should have had a positive sign.

If the Max < 0 AND Min > 0, then we will assume the numbers have been entered backwards and we will swap the values. - The following parameter pairs should have a maximum value that is greater or equal to than the minimum value:

Qvmax/Qvmin, Pmax/Pmin, vrefmax/vrefmin, Qrefmax/Qrefmin, dprefmax/dprefmin, qvrmax/qvrmin, dprmax/dprmin, pfmax/pfmin, Prmax/Prmin, PImax/PImin

If the Max < Min then the values will be swapped by the Auto Correction. - dbd1 and fdbd1 represent low side deadbands which should always be negative. We will assume a parameter equal to the negative of the absolute value entered.
- dbd2 and fdbd2 represent high side deadbands which should always be positive. We will assume a parameter equal to the positive of the absolute value entered.
- For Tfltr, Tp, Tlag, Tc, and Tfrq

If 0.0 < X < 0.5*Mult*TimeStep then X = 0, ElseIf 0.5*Mult*TimeStep < x < Mult*TimeStep then X = Mult*TimeStep

Mult represents the user-specified value **Minimum time constant size as multiple of time step** option on the Validation page of the Transient Stability Dialog

TimeStep represents the integration time step being used as described on TimeStep

Model Equations and/or Block Diagrams

**Parameters:**

MeasFlag | MeasFlag: 0 indicate that positive flow for MeasBranch is leaving MeasBus going out to the line. 1 indicate that positive flow for MeasBranch is arriving at MeasBus coming in from the line. |

MeasQFlag | MeasQFlag: 0 indicate that positive flow for MeasQBranch2 is leaving MeasQBus2 going out to the line. 1 indicate that positive flow for MeasQBranch2 is arriving at MeasQBus2 coming in from the line. |

Pefd_Flag | Pefd_Flag: Enable (1) or disable (0) electrical power feedback |

Ffwrd_Flag | Ffwrd_Flag: Feedforward flaf (1) include feedforward and (0) disable |

RefFlag | RefFlag: Reference Flag: 0 = reactive power control; 1 = voltage control; 2 = constant power factor |

VcompFlag | VcompFlag: Selection of droop (0) or line drop compensation (1) |

Freqflag | Freqflag: Flag to turn on (1) or off (0) the active power control loop within the plant controller |

Tfltr | Tfltr: Voltage or reactive power measurement filter time constant |

Kp | Kp: Proportional gain |

Ki | Ki: Integral gain |

Tft | Tft: Lead time constant |

Tfv | Tfv: Lag time constant |

Vfrz | Vfrz: Voltage below which plant control integrator state is frozen |

Rc | Rc: Line drop compensation resistance |

Xc | Xc: Current compensation constant (to emulate droop or line drop compensation) |

Kc | Kc: Gain on reactive current compensation |

emax | emax: Maximum error limit |

emin | emin: Minimum error limit |

dbd | dbd: Deadband in control |

Qvmax | Qvmax: Maximum Q control output |

Qvmin | Qvmin: Minimum Q control output |

Kpg | Kpg: Proportional gain for power control |

Kig | Kig: Integral gain for power control |

Tp | Tp: Lag time constant on Pgen measurement |

fdbd1 | fdbd1: Deadband downside |

fdbd2 | fdbd2: Deadband upside |

femax | femax: Maximum error limit |

femin | femin: Minimum error limit |

Pmax | Pmax: Maximum Power |

Pmin | Pmin: Minimum Power |

Tlag | Tlag: Lag time constant on Pref feedback |

Ddn | Ddn: Downside droop |

Dup | Dup: Upside droop |

MVABase | MVABase: Model MVA base |

Vrefmax | Vrefmax: Maximum voltage reference, pu |

Vrefmin | Vrefmin: Minimum voltage reference, pu |

Qrefmax | Qrefmax: Maximum Q-reference, pu |

Qrefmin | Qrefmin: Minimum Q-reference, pu |

dqrefmax | dqrefmax: Maximum rate if increase of Q-reference, pu/s |

dqrefmin | dqrefmin: Maximum rate if decrease of Q-reference, pu/s |

qvrmax | qvrmax: Maximum rate if increase of Qext (Vext), pu/s |

qvrmin | qvrmin: Maximum rate if decrease of Qext (Vext), pu/s |

dprmax | dprmax: Maximum rate if increase of Plant Pref, pu/s |

dprmin | dprmin: Maximum rate if decrease of Plant Pref, pu/s |

pfmax | pfmax: For positive Mvar, the minimum power factor setpoint allowed |

pfmin | pfmin: For negative Mvar, the minimum power factor setpoint allowed |

Prmax | Prmax: Maximum rate if increase of Pref, pu/s |

Prmin | Prmin: Maximum rate if decrease of Pref, pu/s |

PImax | PImax: Maximum output of the active power PI controller, pu |

PImin | PImin: Minimum output of the active power PI controller, pu |

Tc | Tc: Reactive-current compensation time-constant, sec |

Qdn1 | Qdn1: First stage of capacitor (reactor) switching out (in), pu |

Qdn2 | Qdn2: Second stage of capacitor (reactor) switching out (in), pu |

Qup1 | Qup1: First stage of capacitor (reactor) switching in (out), pu |

Qup2 | Qup2: Second stage of capacitor (reactor) switching in (out), pu |

Tdelay1 | Tdelay1: Time delay after which if Q < Qdn1 (or Q > Qup1) a capacitor (reactor) is switched, sec |

Tdelay2 | Tdelay2: Time delay after which if Q < Qdn2 (or Q > Qup2) a capacitor (reactor) is switched, sec |

Tmssbrk | Tmssbrk: Time it takes to switch in (out) a mechanically switched shunt, sec |

TOUT | TOUT: Time for discharging of a capacitor that has just beed switched out; the same capacitor cannot be switched back in until Tout (sec) has elapsed |

Tfrz | Tfrz: A time delay during which the states are kept frozeen even after the filtered voltage recovers above Vfrz. This can be used to ensure the plant controller does not iteract with the inverter LVRT |

Tfrq | Tfrq: Frequency time constant, sec |

dfmax | dfmax: Maximum frequency error, pu |

dfmin | dfmin: Minimum frequency error, pu |

MSSFlag | MSSFlag: 0 means shunt switching is disabled; <> 0 means shunt switching is enabled. |

QVFlag | QVFlag: 0 means Q/V control is a fixed output; <> 0 means QV control is enabled. |

Vfreq | Vfreq: Voltage in pu below which measured frequency is set to 1 pu. |

frmax | frmax: Maximum rate limit on measured frequency, pu/s |

frmin | frmin: Minimum rate limit on measured frequency, pu/s |