Skip to content

Commit e72d1ad

Browse files
Merge branch 'main' into hvdc_ac_emulation_outerloop
Signed-off-by: Sylvestre Prabakaran <sylvestre.prabakaran@rte-france.com>
2 parents baf5a92 + a6f9a1c commit e72d1ad

118 files changed

Lines changed: 6882 additions & 768 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/loadflow/loadflow.md

Lines changed: 133 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Grid modeling
44

55
Open Load Flow computes power flows from IIDM grid model in bus/view topology. From the view, a very simple network, composed
6-
of only buses and branches is created. In the graph vision, we rely on a $\Pi$ model for branches (lines, transformers, dangling lines, etc.):
6+
of only buses and branches is created. In the graph vision, we rely on a $\Pi$ model for branches (lines, transformers, boundary lines, etc.):
77

88
- $R$ and $X$ are respectively the real part (resistance) and the imaginary part (reactance) of the complex impedance ;
99
- $G_1$ and $G_2$ are the real parts (conductance) on respectively side 1 and side 2 of the branch ;
@@ -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

@@ -265,9 +274,9 @@ In such cases the involved areas are not considered in the Area Interchange Cont
265274

266275
In iIDM each area defines the boundary points to be considered in the interchange. iIDM supports two ways of modeling area boundaries:
267276
- either via an equipment terminal,
268-
- or via a DanglingLine boundary.
277+
- or via a BoundaryLine boundary.
269278

270-
In the DanglingLine case, the flow at the boundary side is considered as it should be, for both unpaired DanglingLines and DanglingLines paired in a TieLine.
279+
In the BoundaryLine case, the flow at the boundary side is considered as it should be, for both unpaired BoundaryLines and BoundaryLines paired in a TieLine.
271280

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

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

docs/sensitivity/getting_started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ Here is a table to summarize supported use cases:
4747
## Input function types
4848

4949
### Branch sensitivity functions :
50-
BRANCH_ACTIVE_POWER_#, BRANCH_REACTIVE_POWER_# or BRANCH_CURRENT_# are associated to branch objects (lines, transformers, dangling lines, tie lines). The # index corresponding to the side of the studied branch.
50+
BRANCH_ACTIVE_POWER_#, BRANCH_REACTIVE_POWER_# or BRANCH_CURRENT_# are associated to branch objects (lines, transformers, boundary lines, tie lines). The # index corresponding to the side of the studied branch.
5151
- If it is a line, a tie line, or a two windings transformer : The side is 1 or 2.
5252
- If it is a three windings transformer : The side is 1, 2 or 3 corresponding to the studied leg of the transformer.
53-
- If it is a dangling line : The side is 1 (network side) or 2 (boundary side). Note that if the dangling line is paired, only side 1 (network side) can be specified, and the sensitivity function is computed at the corresponding tie line side.
53+
- If it is a boundary line : The side is 1 (network side) or 2 (boundary side). Note that if the boundary line is paired, only side 1 (network side) can be specified, and the sensitivity function is computed at the corresponding tie line side.
5454

5555
### Bus sensitivity functions :
5656
BUS_VOLTAGE or BUS_REACTIVE_POWER are associated to the bus of the given network element.

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.1.1</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)