Skip to content

Hvdc AC emulation limits outer loop#1319

Open
SylvestreSakti wants to merge 21 commits intomainfrom
hvdc_ac_emulation_outerloop
Open

Hvdc AC emulation limits outer loop#1319
SylvestreSakti wants to merge 21 commits intomainfrom
hvdc_ac_emulation_outerloop

Conversation

@SylvestreSakti
Copy link
Member

@SylvestreSakti SylvestreSakti commented Dec 17, 2025

This code is largely inspired from #1048 and rebased to the current version (especially including handling of frozen HVDC Ac emulation state)

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • A PR or issue has been opened in all impacted repositories (if any)

Does this PR already have an issue describing the problem?
No

What kind of change does this PR introduce?
Change of the model to simulate HVDC AC Emulation limits

What is the current behavior?
Hvdc Ac Emulation state is handled directly in the Jacobian Matrix (depending on the state, the Equation term switches between linear mode, saturated mode or frozen mode with the corresponding derivatives). This lead in very rare cases to divergence due to zero derivative when being in saturated mode.

What is the new behavior (if this is a feature change)?
The Jacobian Matrix handles only the linear mode of AC Emulation. An outer loop checks if the AC Emulation overpasses limits and switches to fixed set point (by setting target P of VSC converters in the TargetVector).

Does this PR introduce a breaking change or deprecate an API?

  • Yes
  • No

Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
@SylvestreSakti SylvestreSakti changed the title Hvdc ac emulation limits outerloop Hvdc AC emulation limits outer loop Dec 17, 2025
…s after freezing)

Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
@SylvestreSakti SylvestreSakti marked this pull request as ready for review December 23, 2025 16:15
Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>

protected AbstractHvdcAcEmulationFlowEquationTerm(LfHvdc hvdc, LfBus bus1, LfBus bus2, VariableSet<AcVariableType> variableSet) {
super(hvdc);
ph1Var = variableSet.getVariable(bus1.getNum(), AcVariableType.BUS_PHI);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removal of P boundaries in the equations may theoretically lead to another source of divergence:
If the NR solution around the HVDC links has a large angle, this may generate a flow over
transmissible PMAX and cause the NR to diverge while the situation would be OK in reality.
How can we check whether this risk is real or not for realistic networks ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SylvestreSakti for this, I suggest that we just remember the risk (maybe with a comment) and if this really causes divergence we modify the curve above the linear part so that it keeps a non null derivative but is bounded

}

protected static Optional<DcOuterLoop> createDcHvdcAcEmulationLimitsOuterLoop(LoadFlowParameters parameters) {
if (parameters.isHvdcAcEmulation()) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks like a breaking change
If AC emulation is on, saturation is taken into account, and it was not before.

In addition, how does it work with woodbury-based algorithms (sensi and security analyss)
- They assume the system is linear. If we take saturation into account, it is not.
- If they do not run the outerloops, then the N case is different from the loadflow.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is indeed a functional breaking change. To explicit this, we can (as discussed) add a parameter to activate or not the use of saturation for DC mode (triggering a warning when we want to use that in Woodbury engine since it breaks the linearity of the problem).

Another idea would be to detect saturation in post process in Woodbury sensi and security analysis, to launch a second analysis with saturated mode. To be discussed.

Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants