|
1 | | -### Rules / Config Threshold |
| 1 | +## Rules / loadflow validation rules review (this file just for review purpose, do not merge ) |
2 | 2 |
|
3 | | -#### ShuntCompensator |
| 3 | +### ShuntCompensator validation |
4 | 4 |
|
5 | | -- doc: https://powsybl.readthedocs.io/projects/powsybl-core/en/stable/grid_model/network_subnetwork.html#shunt-compensator |
| 5 | +#### Doc |
| 6 | +- core grid model: https://powsybl.readthedocs.io/projects/powsybl-core/en/stable/grid_model/network_subnetwork.html#shunt-compensator |
| 7 | +- core tool loadflow-validation: https://powsybl.readthedocs.io/projects/powsybl-core/en/stable/user/itools/loadflow-validation.html#shunts |
| 8 | +#### Notes (draft) |
| 9 | +1. Rule1: **|p| < e** |
| 10 | + - if connected, p must be undefined |
| 11 | +2. Rule2: **| q + #sections * B * v^2 | < e** |
| 12 | + - if connected, q must match expectedQ (within threshold), ( **expectedQ = #sections * B * v^2** ==> **| q + expectedQ | < e** ) |
| 13 | + - if LinearModel then #sections = bPerSection else #sections = B |
| 14 | + - **bPerSection**: the susceptance per section in S |
| 15 | + - **currentSectionCount** = B (The susceptance of the shunt compensator in its current state) |
| 16 | +3. Rule3: if the shunt is disconnected, q should be undefined or 0 |
| 17 | +#### Summary and actions |
6 | 18 |
|
7 | | -* Rule1: if disconnected, q must be NaN or 0 |
8 | | -* Rule2: if connected, p must be NaN |
9 | | -* Rule3: if connected, q must match expectedQ (within threshold) |
| 19 | +| | Documentation | Code (ShuntCompensatorsValidation) | Description | Suggestions (TODO) | |
| 20 | +|:-----------|:---------------------------------:|------------------------------------------------------------------------------------------------------------------:|----------------------------------------------------------------------------------------------:|---------------------------------:| |
| 21 | +| Condition1 | \|P\| < ε | if(!Double.isNaN(p)) return false | if shunt compensator is connected, p must be undefined | - [ ] Add to condition: `p != 0` | |
| 22 | +| Condition2 | \| q + #sections * B * v^2 \| < ε | if (ValidationUtils.areNaN(config, q, expectedQ) \| Math.abs(q - expectedQ) > config.getThreshold()) return false | if connected, q must match expectedQ (within threshold) <br/> expectedQ = #sections * B * v^2 | - | |
| 23 | +| Condition3 | - | if (!connected && !Double.isNaN(q) && q != 0) return false | if the shunt is disconnected, q should be undefined or 0 | - [ ] `add this rule in the doc` | |
10 | 24 |
|
11 | | -#### Generator TODO |
12 | | - |
13 | | -- doc: https://powsybl.readthedocs.io/projects/powsybl-core/en/stable/grid_model/network_subnetwork.html#generator |
| 25 | +### Generator validation TODO |
14 | 26 |
|
| 27 | +#### Doc |
| 28 | +- core grid model: https://powsybl.readthedocs.io/projects/powsybl-core/en/stable/grid_model/network_subnetwork.html#generator |
| 29 | +- core tool loadflow-validation:: https://powsybl.readthedocs.io/projects/powsybl-core/en/stable/user/itools/loadflow-validation.html#generators |
| 30 | +#### Notes (Draft) |
15 | 31 | * Rule1: Active power (p) must match setpoint (expectedP) (within threshold) |
16 | 32 | * Rule2: if voltageRegulatorOn="false" then reactive power (Q) should match to setpoint (targetQ) (within threshold) |
17 | 33 | * Rule3: if voltageRegulatorOn="true" |
|
20 | 36 | * Rule3.3: If V < targetV - threshold, generator (Qgen) must be at max reactive limit |
21 | 37 | * Rule3.4: If |V-targetV| <= threshold, generator (Qgen) must be within [minQ, maxQ] |
22 | 38 |
|
23 | | -[//]: # (TODO) |
| 39 | +##### Actions TODO |
0 commit comments