Conversation
Signed-off-by: Denis Bonnand <denis.bonnand@supergrid-institute.com>
0f96108 to
b6155c2
Compare
…2 to keep the convention of positiveness of flow when injecting into DC node Creation of an equation term for Pdc contributing to AC Active power injection because Pdc must be per-unitized when used on the AC part Pac = Pdc / SB Signed-off-by: JB-H <65605897+jb-h@users.noreply.github.com>
Signed-off-by: Denis Bonnand <denis.bonnand@supergrid-institute.com>
Signed-off-by: Denis Bonnand <denis.bonnand@supergrid-institute.com>
Signed-off-by: Denis Bonnand <denis.bonnand@supergrid-institute.com>
Signed-off-by: Denis Bonnand <denis.bonnand@supergrid-institute.com>
Signed-off-by: Denis Bonnand <denis.bonnand@supergrid-institute.com>
Signed-off-by: Denis Bonnand <denis.bonnand@supergrid-institute.com>
Signed-off-by: Denis Bonnand <denis.bonnand@supergrid-institute.com>
Signed-off-by: Denis Bonnand <denis.bonnand@supergrid-institute.com>
Signed-off-by: Denis Bonnand <denis.bonnand@supergrid-institute.com>
Signed-off-by: Denis Bonnand <denis.bonnand@supergrid-institute.com>
Signed-off-by: Denis Bonnand <denis.bonnand@supergrid-institute.com>
Signed-off-by: Denis Bonnand <denis.bonnand@supergrid-institute.com>
Signed-off-by: Denis Bonnand <denis.bonnand@supergrid-institute.com>
Signed-off-by: Denis Bonnand <denis.bonnand@supergrid-institute.com>
Signed-off-by: Denis Bonnand <denis.bonnand@supergrid-institute.com>
Signed-off-by: Denis Bonnand <denis.bonnand@supergrid-institute.com>
Signed-off-by: Denis Bonnand <denis.bonnand@supergrid-institute.com>
Signed-off-by: Denis Bonnand <denis.bonnand@supergrid-institute.com>
Signed-off-by: Denis Bonnand <denis.bonnand@supergrid-institute.com>
…working) Signed-off-by: Denis Bonnand <denis.bonnand@supergrid-institute.com>
Signed-off-by: Denis Bonnand <denis.bonnand@supergrid-institute.com>
Signed-off-by: Denis Bonnand <denis.bonnand@supergrid-institute.com>
Signed-off-by: Denis Bonnand <denis.bonnand@supergrid-institute.com>
Signed-off-by: Denis Bonnand <denis.bonnand@supergrid-institute.com>
Signed-off-by: Denis Bonnand <denis.bonnand@supergrid-institute.com>
There was a problem hiding this comment.
Since AcEquationSystemCreator is already a big class, I would suggest creating a class AcEquationSystemForAcDcNetworkCreator that inherits from it , that implements all the additional equations specific to DC network.
There was a problem hiding this comment.
In this case would other classes such as AcVectorizedEquationSystemCreator and AsymmetricalAcEquationSystemCreator inherit from AcEquationSystemForAcDcNetworkCreator ?
If they don't, then they cannot benefit from the DC detailed model which seems unfortunate to me. But if they do inherit from it, I am not sure of getting the point of creating an AcEquationSystemForAcDcNetworkCreator except for seprating the code to limit the size of AcEquationSystemCreator
There was a problem hiding this comment.
Indeed you are right, we can leave it as it is (or if separating the code is needed, all the static methods createDcNodeEquation and createDcLineEquations could be separated in another class called by AcEquationSystemCreator but after some thoughts it is clear as it is)
There was a problem hiding this comment.
Hello @2nisb and @bperr , thank you very much for your contribution. This is a great first step for AcDcNetwork load flow implementation !
I tried some first reviews, I still need time to get deeper into it. But as first remarks, for this current version, some issues may have to be resolved :
- Scope of the AcDc load flow: There are some modes that are not supported yet with this, and we will have to avoid confusion by making sure the users are using the right parameters, for example, DC load flow is not supported yet (so DC initialization should not be used), Multi slack cannot work, some solvers such as Fast Decoupled cannot resolve it. Maybe exception could be thrown for all these cases.
- Component management: The connected/synchronous components management has to be adjusted with this new kind of loadflow (some log messages may be confusing since we are still calling the network "{CC0 SC0}" even if there are multiple synchronous components in it, this has to be clarified)
- Initialization: Using the VoltageInitializer to initialize the DC network equations may be misleading. Maybe it could be separated in another initializer. Moreover, it seems that active power and reactive power of the converters are initialized from the P and Q that are in the AC terminal, this depends on state variables of the network and would have to be used only for previous value initializer. The behavior of initialization seems still unclear for me.
- Slack bus selection: I may be missing something but I don't understant the choice of having a converter as a slack bus. Can you clarify it ? (and also in the documentation)
I made some first remarks that can be discussed on the code.
Here are next steps that I have in mind, that are maybe out of the scope of this PR, but that we will have to adress later :
- This has been implemented for AC load flow, but DC load flow has to be implemented (I am not sure how the DC initialization works now)
- Still there are some DC components that are not supported such as DC switch, or LCC converters
- Security analysis and Sensitivity analysis will have to be addressed
@jeandemanged may have another view on this so we can discuss about it
Signed-off-by: b.perreyon <baptiste.perreyon@supergrid-institute.com>
Signed-off-by: b.perreyon <baptiste.perreyon@supergrid-institute.com>
Signed-off-by: b.perreyon <baptiste.perreyon@supergrid-institute.com>
…dflow Signed-off-by: b.perreyon <baptiste.perreyon@supergrid-institute.com>
|
Hello, I'll clarify the slack bus selection issue and the component management during this week hopefully. |
|
Hello, I looked more deeply into the management of slack buses in Open Load Flow, and I think a few points need to be clarified. The idea of selecting the slack bus through the converters makes sense if an outer loop allowing their Further investigation of this outer loop revealed that, in the case of a network with two AC islands, the To be clear, the equations within a single Newton–Raphson iteration behave correctly; the issue only arises when balancing the active power at the slack bus when the Our proposal is as follows: In this PR:
In a future PR:
Are you aligned with this approach? Do you have any suggestions on how to address this topic? |
Signed-off-by: b.perreyon <baptiste.perreyon@supergrid-institute.com>
Signed-off-by: b.perreyon <baptiste.perreyon@supergrid-institute.com>
|
Hello @bperr Thank you for your answers and corrections ! The idea of having a load flow working first for a single AC component seems to me as a nice and clean first step indeed. I am aligned with you point of view, and we could then make it more generic with multiple islands (having in mind that the distributed slack outerloop will have to handle multiple components).
Nevertheless, this still looks unclear for me. I think there are two concepts to dissociate for slack active power distribution :
Unless very specific issues of Newton Raphson convergence, the slack bus can be anywhere on the network (and there is nothing related to the targetP on the generators that are in this specific bus), so I am still unsure why we would want to have a slack bus at the largest converter place (we could clarify that for a next PR then 😃 ) |
Signed-off-by: b.perreyon <baptiste.perreyon@supergrid-institute.com>
|
Hello @SylvestreSakti |
| private void createMultipleSlackBusesEquations(EquationSystem<AcVariableType, AcEquationType> equationSystem) { | ||
| List<LfBus> slackBuses = network.getSlackBuses(); | ||
| if (slackBuses.size() > 1) { | ||
| if (network instanceof LfAcDcNetwork acDcNetwork && slackBuses.size() > acDcNetwork.getAcSubNetworks().size()) { |
There was a problem hiding this comment.
If the scope of this PR is limited to one AC component, the multiple slacks may be supported ?
There was a problem hiding this comment.
Indeed, with one AC component, multiple slack is supported !
Move DC nominal voltage check to LfNetworkLoaderImpl Signed-off-by: b.perreyon <baptiste.perreyon@supergrid-institute.com>
Signed-off-by: b.perreyon <baptiste.perreyon@supergrid-institute.com>
|
Hi, |
jeandemanged
left a comment
There was a problem hiding this comment.
Hello @bperr @2nisb cc @SylvestreSakti ,
Apologies for late feedback, here my first comments about documentation/functional part.
docs/loadflow/loadflow.md
Outdated
| However, it is currently restricted to embedded DC networks, meaning that the global network should only contain one AC | ||
| network. |
There was a problem hiding this comment.
terms/definitions to be clarified:
- "network" vs. "island/component"
- "embedded": my understanding is that it means all AC Terminals of DC converters of a given DC island/component must be in the same AC island/component, correct ?
- "should only contain one AC network": would 2 AC islands, each with their own "embedded" DC island work ?, e.g.:
- ConnectedComponent 0 with synchronous component 0 and DC component 0
- ConnectedComponent 1 with synchronous component 1 and DC component 1
There was a problem hiding this comment.
I reformulated the documentation to be clearer. Let me know if this seems correct now
To my understanding
- A network object represents set of connected component
- A connected component is a collection of AC and DC island/component that are connected through AC/DC converters.
- An island/component is a set of buses of the same type (meaning either all AC or all DC) connected through equipments like lines, transformers,etc...
So to answer your last points:
- yes a DC island is embedded when it is connected to only one AC island. It is an "internal" connection, meaning it does not connect two different AC island.
- I reformulated this point in the documentation, in a single Connected component, there should be only one AC island (and no restriction on the number of DC island). Therefore, as you suggested a network with two connected component with each one AC island and some embeded DC islands can be processed by this load flow
docs/loadflow/loadflow.md
Outdated
|
|
||
| ## AC DC flows computing | ||
|
|
||
| AC DC lows computing in OpenLoadFLow is similar to AC flows computing, but with AC and DC equations in the same system. |
There was a problem hiding this comment.
typo
| AC DC lows computing in OpenLoadFLow is similar to AC flows computing, but with AC and DC equations in the same system. | |
| AC DC flows computing in OpenLoadFLow is similar to AC flows computing, but with AC and DC equations in the same system. |
docs/loadflow/loadflow.md
Outdated
|
|
||
| ### DC node | ||
|
|
||
| At least one DC node must be connected to the ground in each DC network, its potential is therefore set to 0. |
There was a problem hiding this comment.
See https://powsybl.readthedocs.io/projects/powsybl-core/en/stable/grid_model/network_subnetwork.html#ac-dc-converter about symmetrical/asymmetrical scheme
absence of DC Ground should be possible to model symmetrical
When the ControlMode of the converter is set to V_DC, the converter controls DC voltage at its DC Terminals. TargetVdc is the desired target DC voltage, and is the voltage difference between DC Node 1 and DC Node 2. TargetVdc may be either positive or negative. Negative value may be used to model reverse polarity operation in case of LCCs. No explicit attribute specifies whether the DC is a symmetrical or asymmetrical scheme. The scheme symmetrical or asymmetrical is derived implicitly by either the presence or absence of a DC Ground connected to the DC system:
If a DC Ground is connected, the configuration is asymmetrical, and the converter imposes the target voltage difference between the converter DC Node 1 and the DC Node 2 to be equal to TargetVdc
If no DC Ground is present, the configuration is symmetrical, in this case the converter provides internally an implicit DC Ground and imposes:
+TargetVdc / 2 at the converter DC Node 1
-TargetVdc / 2 at the converter DC Node 2
There was a problem hiding this comment.
For the moment DC ground are required in OLF so symmetrical configuration is not supported. I updated the docs to specify it.
As mentionned, a workaround is to add a DC ground and connect it to the two DC terminal of the converters with a very high resistance. This is implemented in a test for example purpose, but it is not a clean way to handle symetrical configuration. This will be addressed in a future PR
| ### Voltage source converters | ||
|
|
||
| Let consider a network that is composed of one AC network, and one DC network. | ||
| The voltage source converter is the link between AC and DC networks, it is linked to **one** AC bus at one side, and two |
There was a problem hiding this comment.
one AC bus
AC/DC Converter transfers power between AC and DC grids. Its connectivity is modeled with:
- either one or two AC Terminals,
- exactly two DC Terminals
Need to document that the second optional AC terminal is currently not supported by OLF
There was a problem hiding this comment.
I added a sentence to make it explicit.
I also added an exception if a converter has a second AC terminal
|
|
||
| $\sum_{i} I_i - \frac{V_1 - V_2}{R}= 0$ for dcNode2 | ||
|
|
||
| ### Voltage source converters |
There was a problem hiding this comment.
Need to document that LCCs in detailed model are currently not supported by OLF
There was a problem hiding this comment.
I added a section to specify it.
I also added an exception if there is an LCC in the network
| If the converter is in `P_PCC` control mode, we add an equation to impose $P_{AC}$ : | ||
|
|
||
| $P_{AC}$ = $P_{Ref}$ | ||
|
|
||
| Else the converter is in `V_DC` control mode, and we add an equation to impose the voltage between its two DC nodes : | ||
|
|
||
| $V_{1} - V_{2} = V_{Ref}$ | ||
|
|
||
| Similarly, if the converter controls reactive power, we add an equation to impose $Q_{AC}$ : | ||
|
|
||
| $Q_{AC}$ = $Q_{Ref}$ | ||
|
|
||
| Else the converter controls the AC voltage, and we add an equation to impose $V_{AC}$: | ||
|
|
||
| $V_{AC}= V_{Ref}$ |
There was a problem hiding this comment.
Expectation is that:
- target active power
- target reactive power or target voltage
are at PCC (Point of Common Coupling) Terminal, not converter AC Terminal. If this is not the case, clarify it.
There was a problem hiding this comment.
In the case of VSC with only one AC terminal, is not the PCC the same thing as the converter terminal ?
For VSC converters having a single AC Terminal, it is valid for the PCC Terminal to be the converter terminal itself.
Currently, the AC LfBus controlled by the converter is selected through the converter Terminal1, but it can easilly be changed to the converter PccTerminal
docs/loadflow/loadflow.md
Outdated
|
|
||
| with: | ||
| - $P_{AC}$ the power injected by the converter to the AC side | ||
| - $P_{Loss}>0$ the converter losses depending on AC current. Its computation is detailed in the next subsection. |
docs/loadflow/loadflow.md
Outdated
| If the converter acts as rectifier, AC injects power in DC, thus $P_{DC}>0$ and $P_{AC}<0$, so we have : | ||
|
|
||
| $$ | ||
| |P_{DC}| = -P_{AC} - P_{Loss} | ||
| $$ | ||
| $$ | ||
| |P_{DC}| = |P_{AC}| - P_{Loss} | ||
| $$ | ||
|
|
||
| And if the converter acts as inverter, DC injects power in AC, thus $P_{DC}<0$ and $P_{AC}>0$, so we have : | ||
|
|
||
| $$ | ||
| |P_{DC}| = P_{AC} + P_{Loss} | ||
| $$ | ||
| $$ | ||
| |P_{AC}| = |P_{DC}| - P_{Loss} | ||
| $$ | ||
|
|
||
| In both cases, there is a loss of power when passing through the converter. |
There was a problem hiding this comment.
with commonly agreed load sign convention (+ meaning into converter, - meaning out of converter), and Ploss >= 0 this reduces simply to
Pac + Pdc = Ploss
There was a problem hiding this comment.
Ok, I updated the sign convention in the code and docs
docs/loadflow/loadflow.md
Outdated
|
|
||
| In both cases, there is a loss of power when passing through the converter. | ||
|
|
||
| #### Loss Calculation |
There was a problem hiding this comment.
See previous comment Iac vs. Idc
|
|
||
| The default value is `false`. | ||
|
|
||
| **Note:** With AC-DC network load flow, the following parameters are restricted: |
There was a problem hiding this comment.
Describe what happens when conditions not met (e.g. exception?)
Maybe add other conditions based on models not yet supported:
- network with detailed model LCC converter
- network with detailed model VSC converter with 2 AC Terminals
There was a problem hiding this comment.
Indeed, an exception is thrown for all these cases. I clarified this point in the documentation.
Signed-off-by: b.perreyon <baptiste.perreyon@supergrid-institute.com>
Signed-off-by: b.perreyon <baptiste.perreyon@supergrid-institute.com>
Signed-off-by: b.perreyon <baptiste.perreyon@supergrid-institute.com>
Signed-off-by: b.perreyon <baptiste.perreyon@supergrid-institute.com>
|





Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
No
What kind of change does this PR introduce?
Feature
What is the current behavior?
Open loadflow does not support DC detailed components from iidm
What is the new behavior (if this is a feature change)?
Open loadflow is able to modelize DC components (DcNode, DcLine, VoltageSourceConverter) and run loadflows on AC DC networks, with one unique jacobian matrix for the whole connected network.
Does this PR introduce a breaking change or deprecate an API?
If yes, please check if the following requirements are fulfilled
What changes might users need to make in their application due to this PR? (migration steps)
If you defined your own powsybl openloadflow implementation, you should:
Write your own implementations of
LfAcDcConverter,LfVoltageSourceConverterandLfDcNodeImplement the following methods in your :
VoltageInitializerimplementations:double getReactivePower(LfVoltageSourceConverter converter)double getActivePower(LfAcDcConverter converter)double getMagnitude(LfDcNode dcNode)LfBusimplementations:List<LfVoltageSourceConverter> getConverters()void addConverter(LfVoltageSourceConverter converter)