Skip to content

Commit 399e56c

Browse files
Merge branch 'sensi_operator_strategy' into ndi-limit_reduction_group_selection_not_implemented
2 parents c2cdf5e + 94a3334 commit 399e56c

88 files changed

Lines changed: 6742 additions & 333 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/advanced_programming/contingency_active_power_loss.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ To add another plugin, you will need to code (in Java) an implementation of the
1414
interface and make this implementation available to the Java ServiceLoader (e.g. using Google's AutoService):
1515
- the `getName()` method should provide the plugin name - which can then be used in the `contingencyActivePowerLossDistribution` security analysis parameter
1616
- the `run(...)` method will be called by the security analysis engine for each contingency and should provide the logic.
17-
This method has access to:
17+
This method must return the amount of distributed active power (in per-unit) and has access to:
1818
- the network
1919
- the contingency in open-loadflow representation, including among others information about disconnected network elements, and how much active power has been lost.
2020
- the contingency definition

docs/loadflow/loadflow.md

Lines changed: 134 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ equal to zero and $1$. In case of a branch with voltage or phase control, the $\
2121

2222
Open Load Flow also supports networks with HVDC lines (High Voltage Direct Current lines). An HVDC line is connected to the rest of the AC network through HVDC converter stations, that can be either LCC (Line-Commutated Converter) or VSC (Voltage-Source Converter).
2323

24+
### DC detailed model
25+
26+
Additionally, Open Load Flow supports AC-DC load flow formulation with detailed model of DC elements.
27+
However, it is currently restricted to embedded DC components, meaning that all converters of a given DC component must be connected to the same synchronous component.
28+
In other words, a DC component cannot be used to connect two different synchronous components. Consequently, a single connected component should only contain one synchronous component.
29+
However, the number of DC components within a connected component is not restricted.
30+
Yet, it is possible to run a load flow on a network with several synchronous components (with their own embedded DC components) as long
31+
as they do not belong to the same connected component.
32+
2433
(ac-flow-computing)=
2534
## AC flows computing
2635

@@ -289,6 +298,10 @@ It is computed like this:
289298
$Factor = sign(Slack Bus Mismatch) * Area Total Mismatch + areaInterchangePMaxMismatch $
290299
Then factors are normalized to have sum of factors equal to 1.
291300

301+
The distribution is iterative (inside the same outer loop iteration).
302+
Each area distributes its share, if some areas cannot fully distribute it, they are excluded from this distribution and the remaining slack is distributed among other areas at next iteration.
303+
The distribution iterates until all the mismatch has been distributed and fails if all areas cannot distribute anymore but some mismatch remains.
304+
292305
### Zero impedance boundary branches
293306
The following applies when the [`lowImpedanceBranchMode`](parameters.md) is set to `REPLACE_BY_ZERO_IMPEDANCE_LINE`.
294307
Currently, computations involving zero-impedance branches used as boundary branches are not supported.
@@ -329,4 +342,124 @@ Users should notice that default parameters are optimized for the Newton-Raphson
329342
When the Fast-Decoupled algorithm is used, we recommend these values for some convergence parameters:
330343
- [`maxNewtonRaphsonIterations`](parameters.md): 75,
331344
- [`lineSearchStateVectorScalingMaxIteration`](parameters.md): 4,
332-
- [`lineSearchStateVectorScalingStepFold`](parameters.md): `3/2 = 1.5`.
345+
- [`lineSearchStateVectorScalingStepFold`](parameters.md): `3/2 = 1.5`.
346+
347+
## AC DC flows computing
348+
349+
AC DC flows computing in OpenLoadFLow is similar to AC flows computing, but with AC and DC equations in the same system.
350+
The unknowns are voltage magnitude and phase angle for each AC bus, voltage for each DC bus, and active/reactive
351+
power for each voltage source converter.
352+
Concerning AC side, the equations are the same as in AC flows computing, concerning DC side, the equations induced by DC
353+
components are the followings:
354+
355+
### DC bus
356+
357+
At least one DC bus must be connected to the ground in each DC network, its potential is therefore set to 0.
358+
Therefore, symmetrical configuration are currently not supported.
359+
For the others DC buses, each one introduces an equation of current balance: $\sum_{i} I_i = 0$ where $I_i$ are the currents going out of the DC bus.
360+
These terms are introduced by the DC components connected to the DC bus.
361+
362+
### DC Line
363+
364+
Each DC line adds one term in both of its two connected DC buses current balance:
365+
366+
$\sum_{i} I_i + \frac{V_1 - V_2}{R}= 0$ for dcBus1
367+
368+
$\sum_{i} I_i - \frac{V_1 - V_2}{R}= 0$ for dcBus2
369+
370+
371+
### Line Commutated Converter
372+
373+
Line commutated converters are not supported yet by Open Load Flow.
374+
375+
### Voltage source converters
376+
377+
Let consider a network that is composed of one AC network, and one DC network.
378+
The voltage source converter is the link between AC and DC networks, it is linked to **one** AC bus at one side, and two
379+
DC buses at the other side.
380+
Please note that converters with a second optional AC terminal are not supported by Open Load Flow.
381+
382+
The converter can control either the power received by the AC network (`P_PCC` control mode)
383+
or the voltage between its two DC buses (`V_DC` control mode).
384+
At least one of the voltage source converters of the DC network must be in `V_DC` mode. Otherwise, an exception will be thrown.
385+
386+
In addition to the control modes `P_PCC` and `V_DC`, the voltage source converter can be set in two modes :
387+
- Reactive power control mode, in which it imposes the reactive power received from AC to DC, which is 0 by default.
388+
In this case, the AC voltage is not fixed.
389+
- Voltage regulator control mode, in which it imposes the voltage at its AC Bus. In this case the reactive power is not
390+
fixed.
391+
392+
**Warning:** At the moment, the active and reactive power control and the AC voltage control are enforced at the converter AC terminal, not at its PCC terminal.
393+
394+
We note $P_{AC}$ the power flow injected by AC network into the converter.
395+
So $P_{AC}>0$ if the power flows from AC to DC and $P_{AC}<0$ otherwise.
396+
397+
If the converter is in `P_PCC` control mode, we add an equation to impose $P_{AC}$ :
398+
399+
$P_{AC}$ = $P_{Ref}$
400+
401+
Else the converter is in `V_DC` control mode, and we add an equation to impose the voltage between its two DC buses :
402+
403+
$V_{1} - V_{2} = V_{Ref}$
404+
405+
Similarly, if the converter controls reactive power, we add an equation to impose $Q_{AC}$ :
406+
407+
$Q_{AC}$ = $Q_{Ref}$
408+
409+
Else the converter controls the AC voltage, and we add an equation to impose $V_{AC}$:
410+
411+
$V_{AC}= V_{Ref}$
412+
413+
On the AC bus, the active and reactive power injected into the converter is added to its power balance.
414+
On the DC side, we introduce the variable $I_{Conv}$ which is the current flowing in the converter from dcBus1 to dcBus2.
415+
It is added to the current balances of dcBus1 and dcBus2
416+
417+
$\sum_{i} I_i + I_{Conv} = 0$ for dcBus1
418+
419+
$\sum_{i} I_i - I_{Conv}= 0$ for dcBus2
420+
421+
#### Power Equations
422+
423+
The last equation of converters ensures the conservation of power between AC and DC.
424+
425+
$$P_{DC} + P_{AC} = P_{Loss}$$
426+
427+
with:
428+
- $P_{AC}$ the power injected by the AC network into the converter
429+
- $P_{Loss}>=0$ the converter losses depending on AC current. Its computation is detailed below.
430+
- $P_{DC} = I_{Conv}*(V_1-V_2)$ the power injected by the DC network into the converter.
431+
432+
If the converter acts as rectifier, AC injects power in DC, thus $P_{DC}<0$ and $P_{AC}>0$, so we have :
433+
434+
$$
435+
-|P_{DC}| + P_{AC} = P_{Loss}
436+
$$
437+
$$
438+
|P_{DC}| = |P_{AC}| - P_{Loss}
439+
$$
440+
441+
And if the converter acts as inverter, DC injects power in AC, thus $P_{DC}>0$ and $P_{AC}<0$, so we have :
442+
443+
$$
444+
P_{DC} - |P_{AC}| = P_{Loss}
445+
$$
446+
$$
447+
|P_{AC}| = |P_{DC}| - P_{Loss}
448+
$$
449+
450+
In both cases, there is a loss of power when passing through the converter.
451+
452+
453+
$P_{Loss}$ is defined as :
454+
$
455+
P_{Loss} = IdleLoss + SwitchingLoss * |I_{Conv}| + ResistiveLoss * I_{Conv}^{2}
456+
$
457+
458+
459+
Idle loss, switching loss and resistive loss are loss factors that depend on the converter.
460+
461+
Using the previous equation of power conservation between AC and DC, we have
462+
$$
463+
I_{Conv}*(V_1-V_2) + P_{AC} = IdleLoss + SwitchingLoss*|I_{Conv}| + ResistiveLoss*I_{Conv}^{2}
464+
$$
465+

docs/loadflow/parameters.md

Lines changed: 47 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -378,16 +378,22 @@ and 100 kV for **minNominalVoltageRealisticVoltageCheck**.
378378
The default value is 0 kV.
379379

380380
**reactiveRangeCheckMode**
381-
Open Load Flow discards voltage control for generators with a too small reactive power range, because in practice a too
382-
small reactive power ranger means limited to zero voltage control capability.
381+
Open Load Flow discards voltage control for network elements with a too small reactive power range, because in practice a too
382+
small reactive power ranger means limited to zero voltage control capability. The involved network element types are:
383+
- Generators
384+
- Batteries
385+
- Voltage Source Converters
386+
- The optional generation part of a Boundary Line
387+
- Static VAR compensators
383388

384389
For a given active power output, the reactive power range is defined as $MaxQ - MinQ$ (always a positive value).
385-
The *maximum* and *minimum* reactive range of a generator is:
386-
- for generators without reactive limits: infinity
387-
- for generators with reactive limits defined by a pair of [min/max values](inv:powsyblcore:*:*:#min-max-reactive-limits), both minimum and maximum reactive range are equal to $MaxQ - MinQ$
388-
- for generators with reactive limits defined by a [reactive capability curve](inv:powsyblcore:*:*:#reactive-capability-curve), the minimum (resp. maximum) reactive range is obtained by finding the curve point having the minimum (resp. maximum) $MaxQ - MinQ$.
390+
The *maximum* and *minimum* reactive range of a network element is:
391+
- for network elements without reactive limits: infinity
392+
- for network elements with reactive limits defined by a pair of [min/max values](inv:powsyblcore:*:*:#min-max-reactive-limits), both minimum and maximum reactive range are equal to $MaxQ - MinQ$
393+
- for network elements with reactive limits defined by a [reactive capability curve](inv:powsyblcore:*:*:#reactive-capability-curve), the minimum (resp. maximum) reactive range is obtained by finding the curve point having the minimum (resp. maximum) $MaxQ - MinQ$.
394+
- In the case of Static VAR compensators, the reactive power range is derived from maximum and minimum susceptance assuming nominal voltage: $(B_{\text{max}} - B_{\text{min}}) \cdot \text{nominalV}^2$
389395

390-
The `reactiveRangeCheckMode` parameter defines how generator reactive power range is to be tested. If the test does not pass,
396+
The `reactiveRangeCheckMode` parameter defines how network elements reactive power range is to be tested. If the test does not pass,
391397
meaning the reactive power range is too small, then the voltage control is disabled:
392398
- `MIN_MAX` mode tests if the minimum reactive range is not `0 MVAr` and if the maximum reactive range is above `1 MVAr`.
393399
- `MAX` mode tests if the maximum reactive range is above `1 MVAr`.
@@ -451,15 +457,15 @@ Above this voltage level, voltage targets that are, in pu, outside 'minPlausible
451457
The default value is `20 kV`. It must be greater or equal to `0 kV`.
452458

453459
**reactivePowerDispatchMode**
454-
This parameter defines how reactive power is split among generators with controls (voltage or reactive power).
455-
It tries to divide reactive power among generators in the order described below.
460+
This parameter defines how reactive power is split among network elements with controls (voltage or reactive power).
461+
It tries to divide reactive power among network elements in the order described below.
456462
`reactivePowerDispatchMode` can be one of:
457463
- `Q_EQUAL_PROPORTION`
458-
1. If all concerned generators have pre-defined reactive keys via the [Coordinated Reactive Control extension](inv:powsyblcore:*:*:#coordinated-reactive-control-extension), then it splits `Q` proportional to reactive keys
459-
2. If they don't, but they have plausible reactive limits, split proportionally to the maximum reactive power range
464+
1. If all concerned network elements are generators having pre-defined reactive keys via the [Coordinated Reactive Control extension](inv:powsyblcore:*:*:#coordinated-reactive-control-extension), then it splits `Q` proportional to reactive keys
465+
2. If they don't, but they have plausible reactive limits, split proportionally to the maximum reactive power range (see `reactiveRangeCheckMode` parameter for definition)
460466
3. If they don't, split `Q` equally
461467
- `K_EQUAL_PROPORTION`
462-
1. If generators have plausible reactive limits, split `Q` proportionally to `k`, where `k` is defined by
468+
1. If network elements have plausible reactive limits, split `Q` proportionally to `k`, where `k` is defined by
463469
$ k = \frac{2 qToDispatch - qmax1 - qmin1 - qmax2 - qmin2 - ...}{qmax1 - qmin1 + qmax2 - qmin2 + ...} $
464470
2. If they don't, split `Q` equally
465471

@@ -542,12 +548,12 @@ Works only when `referenceBusSelectionMode` is set to `GENERATOR_REFERENCE_PRIOR
542548
When multiple equipment regulate the same bus with different voltage targets,
543549
this parameter enables configuring priority to resolve inconsistencies by aligning the voltage targets.
544550
Priority is determined by equipment type order; the voltage target of the equipment type listed first takes precedence over those listed later.
545-
By default, the order is `["GENERATOR", "TRANSFORMER", "SHUNT"]`.
551+
By default, the order is `["VOLTAGE_SOURCE_CONVERTER", "GENERATOR", "TRANSFORMER", "SHUNT"]`.
546552
Note that `"GENERATOR"` indistinctively includes generators, batteries, static var compensators, and VSC HVDC converters.
547553

548554
If the user specifies only a sub-list of priorities, this sub-list is completed by the
549555
order defined by default. Thus, if the user specifies only `["TRANSFORMER"]`,
550-
it will be completed to `["TRANSFORMER", "GENERATOR", "SHUNT"]`.
556+
it will be completed to `["TRANSFORMER", "VOLTAGE_SOURCE_CONVERTER", "GENERATOR", "SHUNT"]`.
551557

552558
**transformerVoltageControlUseInitialTapPosition**
553559
This parameter is only used if the transformer voltage control is enabled and of mode `AFTER_GENERATOR_VOLTAGE_CONTROL`.
@@ -622,6 +628,33 @@ to fix the network data.
622628

623629
The default value is `false`.
624630

631+
**acDcNetwork**
632+
633+
Defines if the loadflow uses DC detailed equipment and computes an AC DC loadflow
634+
635+
If `true`, the network supports DC detailed equipments, and the loadflow is computed on the whole connected network,
636+
AC and DC sides in the same Jacobian matrix. Currently, the network shall contain only one synchronous component, but the number of
637+
embedded DC components is not restricted.
638+
639+
If `false`, the loadflow is the classic one, without DC detailed components.
640+
641+
The default value is `false`.
642+
643+
**Note:** With AC-DC network load flow, the following parameters are restricted:
644+
- Generic parameters
645+
- `dc`: must be set to false.
646+
- `voltageInitMode` cannot be set to `DC_VALUES`.
647+
- `componentMode` cannot be set to `MAIN_SYNCHRONOUS`.
648+
- Specific parameters
649+
- `voltageInitModeOverride` must be set to `NONE`.
650+
- `acSolverType` must be set to `NEWTON_RAPHSON`.
651+
652+
Moreover, network with the following characteristics are not supported:
653+
- A network containing detailed AC/DC converters with two AC terminals
654+
- A network containing detailed LCC converters
655+
656+
If any of these cases occurs, an exception describing the problem is thrown.
657+
625658
## Configuration file example
626659
See below an extract of a config file that could help:
627660

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<slf4jtoys.version>1.6.3</slf4jtoys.version>
5454
<asciitable.version>0.3.2</asciitable.version>
5555

56-
<powsybl-core.version>7.2.0-SNAPSHOT</powsybl-core.version>
56+
<powsybl-core.version>7.2.0-RC1</powsybl-core.version>
5757

5858
<!-- This is required for later correct replacement of argline -->
5959
<argLine/>

src/main/java/com/powsybl/openloadflow/FullVoltageInitializer.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
*/
88
package com.powsybl.openloadflow;
99

10+
import com.powsybl.commons.PowsyblException;
1011
import com.powsybl.openloadflow.ac.VoltageMagnitudeInitializer;
1112
import com.powsybl.openloadflow.dc.DcValueVoltageInitializer;
1213
import com.powsybl.openloadflow.network.LfBus;
14+
import com.powsybl.openloadflow.network.LfDcBus;
1315
import com.powsybl.openloadflow.network.LfNetwork;
1416
import com.powsybl.openloadflow.network.util.VoltageInitializer;
1517

@@ -47,4 +49,9 @@ public double getMagnitude(LfBus bus) {
4749
public double getAngle(LfBus bus) {
4850
return angleInitializer.getAngle(bus);
4951
}
52+
53+
@Override
54+
public double getMagnitude(LfDcBus dcBus) {
55+
throw new PowsyblException("Full voltage initialization is not yet supported with AcDcNetwork");
56+
}
5057
}

0 commit comments

Comments
 (0)