Modeling the generator constraints¶
Preliminary notations¶
A generator possesses mechanical characteristics that constrain the way it can be operated. Among these characteristics are:
the minimum operating power (or \(P_{\min}(t)\)), which is the lowest power value the generator can reach when operated at timestamp t;
the maximum operating power (or \(P_{\max}(g,t)\)), which is the highest power value the generator can reach at timestamp t;
The generator then operates in two distinct states depending on its current power, based on the aforementioned characteristics:
it is OFF whenever its power is null (specifically, below Off-power deadband, see Parameters)
it is ON whenever its power is greater or equal than \(P_{\min}\) (and lower or equal than \(P_{\max}\)).

Hypotheses¶
To simplify the problem, we will consider that the orders to switch a generator ON or OFF are given at the beginning of the timestamps, and not some time in between two timestamps.
Parameters and input data¶
Sets¶
Name |
Symbol |
Details |
|---|---|---|
Constrained generators set |
\(\Gamma\) |
Set of generators with constraints defined |
Timestamps |
\(\mathcal{T}\) |
Set of all timestamps on which the optimization is performed. |
Generator states |
\(\Omega_{generator}\) |
Set of all possible states a generator can be in: \(\lbrace \textcolor{green}{\text{ON}}, \textcolor{red}{\text{OFF}} \rbrace\) |
Parameters¶
Name |
Symbol |
Details |
|---|---|---|
Off-power deadband |
\(\epsilon_{P}^{\text{OFF}}\) |
Power deadband used to define the OFF state and account for rounding issues. This value must be positive. |
On-power threshold |
\(\epsilon_{P}^{\text{ON}}\) |
Power threshold used to define the ON state and account for rounding issues. This value must be positive. |
Time gap |
\(\Delta_{\tau}\) |
Time gap between two consecutive timestamps. It is assumed constant for all pairs of consecutive timestamps. It is computed based on \(\mathcal{T}\) |
In the following we define as grid state a network situation for a given instant after a given contingency or the basecase.
Constant input data¶
Name |
Symbol |
Details |
|---|---|---|
Lead Time |
\(LEAD(g)\) |
Time elapsed between the start-up order and the moment the generator power reaches \(P_{\min}\). |
Lag Time |
\(LAG(g)\) |
Time elapsed between the shut-down order and the moment the generator power reaches 0. |
Upward power gradient constraint |
\(\nabla^{+}(g)\) |
Maximum upward power variation between two consecutive timestamps for generator \(g\). This value must be positive. |
Downward power gradient constraint |
\(\nabla^{-}(g)\) |
Maximum downward power variation between two consecutive timestamps for generator \(g\). This value must be negative. |
ShutDown allowed |
\(isShutDownAllowed\) |
Indicates if generator \(g\) can be shutdown. This value is a boolean. |
StartUp allowed |
\(isStartUpAllowed\) |
Indicates if generator \(g\) can be started up. This value is a boolean. |
Min-off Time |
\(minOffTime(g)\) |
Minimum time a generator \(g\) must stay off before being switched on again, once it has been shut down. |
Min-on Time |
\(minOnTime(g)\) |
Minimum time a generator \(g\) must stay on before being switched off, once it has been started up. |
Time-dependant input data¶
Name |
Symbol |
Details |
|---|---|---|
PMin |
\(P_{\min}(g, t)\) |
Minimum operating power of generator \(g\) at timestamp \(t\). This value must be positive. |
PMax |
\(P_{\max}(g)\) |
Maximum operating power of generator \(g\). This value must be positive. |
Optimization variables¶
Defined optimization variables¶
Name |
Symbol |
Details |
Type |
Index |
Unit |
Lower bound |
Upper bound |
|---|---|---|---|---|---|---|---|
Generator power |
\(P(g,s,t)\) |
the power of generator \(g\) at grid state \(s\) of timestamp \(t\) |
Real value |
one per generator defined in \(\Gamma\), per grid state and per timestamp of \(\mathcal{T}\) |
MW |
0 |
\(P_{\max}\) |
Generator state |
\(\delta_{\omega}^{gen}(g,s,t)\) |
whether generator \(g\)’s state is \(\omega\) at grid state \(s\) of timestamp \(t\) or not |
Binary |
one per generator defined in \(\Gamma\), per generator state \(\omega \in \Omega_{generator}\), per grid state and per timestamp of \(\mathcal{T}\) |
No unit |
0 |
1 |
Generator state transition |
\(T_{\omega \to \omega'}(g,s,t)\) |
whether generator \(g\)’s state has transitioned from \(\omega\) at timestamp \(t\) to \(\omega'\) at timestamp \(t + \Delta_{\tau}\), at grid state \(s\) or not |
Binary |
one per generator defined in \(\Gamma\), per generator state \(\omega \in \Omega_{generator}\), per generator state \(\omega' \in \Omega_{generator}\) per grid state and per timestamp of \(\mathcal{T}\) |
No unit |
0 |
1 |
Used optimization variables¶
Name |
Symbol |
Defined in |
|---|---|---|
Range action set-point |
\(A(r,s,t)\) |
Constraints¶
C1 - Only one state¶
At each timestamp and for each grid state, each generator can only be in one of the two states between ON and OFF. Mathematically, this is written as:
State transition constraints¶
To ensure a continuity in the cycle of generator states, a chaining needs to be set up thanks to linear constraints linking the state variables of two consecutive timestamps to the transition variables. State transtion variables are defined on all timestamps except last timestamp, set that we’ll refer to as \(\mathcal{T_{N-1}}\). Thus, \(\forall g \in \Gamma, \forall t \in \mathcal{T_{N-1}}, \forall s\):
C2 - State-From constraints¶
The timestamp’s state must be the starting state of the transition that occurred during the timestamp, no matter the final state. Thus, \(\forall g \in \Gamma, \forall t \in \mathcal{T_{N-1}}, \forall s\):
C3 - State-To constraints¶
The next timestamp must be the final state of the transition that occurred during the timestamp, no matter the state of origin. Thus, \(\forall g \in \Gamma, \forall t \in \mathcal{T_{N-1}}, \forall s\):
C4 - On or Off State¶
By definition, the generator is ON if its power is greater than \(P_{\min}\) and OFF if its power is null. To account for issues that can stem from number rounding, we define a minimal power variation deadband \(\epsilon_{P}^{\text{OFF}}\) such that if the power of the generator is lower that \(\epsilon_{P}^{\text{OFF}}\), the generator is considered OFF.
\(P_{\min}(g, t)\) value has been post-treated: to account for issues that can stem from number rounding and to ensure a distinct definition of ON and OFF states, we define an ON power threshold \(\epsilon_{P}^{\text{ON}}\) such that if the generator’s defined Pmin is lower that \(\epsilon_{P}^{\text{ON}}\), Pmin will be redefined as \(\epsilon_{P}^{\text{ON}}\).
C5 - Starting up constraints (Lead time)¶
When the generator is turned on, it has a warm-up time called lead time during which the power remains null before it steps up to \(P_{\min}\).
C5 bis - Staying on constraints (Min-on time)¶
Once it is turned on, the generator must remain on for a minimum duration called “min-on time” if defined.
C6 - Shutting down constraints (Lag time and Min-off time)¶
This constraint incorporates all the necessary conditions to account for a generator being shut down.
Lag Time: When the generator is shut off, there is a cool-down period called lag time. During this time, the generator’s power decreases to 0 from its minimum power (power is considered null in our model!), and it cannot be turned back on during this interval.
Minimum Off-Time: After the generator is fully shut down, it must remain off for a minimum duration called “min-off time.”
Lead Time: Before the generator can restart, it must satisfy the warm up time called the “lead time”.
The following equation sums lag time, lead time and min-off time (if they exist) to take into account the fact that between a shut-down and a startup, the generator needs to stay OFF at least lag time + min-off time + lead time.
C7 - Power variation constraints¶
The power variation and the state transitions are strongly entangled and constrain one another. Depending on the state transition, the power variation \(P(g,s,t + \Delta_{\tau} ) - P(g,s,t)\) is bounded differently.
OFF to OFF transition¶
OFF to ON transition¶
ON to ON transition¶
ON to OFF transition¶
C8 - Shut down prohibited¶
If \(isShutDownAllowed\) is false,
For the first timestamp, if the generator has its power greater than \(P_{\min}\), we activate the ON state. Otherwise, the optimization problem will most likely avoid being constrained by shut down prohibition by shutting down first timestamp.
C9 - Start up prohibited¶
If \(isStartUpAllowed\) is false,
For the first timestamp, if the generator has its power lower than \(P_{\min}\), we activate the OFF state. Otherwise, the optimization problem will most likely avoid being constrained by start up prohibition by starting up first timestamp.
C10 - Injection to generator power constraint¶
The power of the generator can be linked to the set-point of the injection range action \(r\) it is involved in:
where \(k(g,r)\) is the injection key of \(g\) in \(r\).