Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fictive load on isolated bus keeps hvdc isolated #1120

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

vidaldid-rte
Copy link
Collaborator

@vidaldid-rte vidaldid-rte commented Nov 14, 2024

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)

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

What kind of change does this PR introduce?
In #965 a simple criteria was added to detect an HVDC disconnection on one side :
A station is isolated if its merged bus is not connected to any other bus neither to a load or a group.

This criteria was meant to detect quickly contingencies that disconnect a line, while allowing simple models where one side is merely simplified as a group or a load.
But in real networks it happens that a fictive load is added to a station.

This fix considers that if an HVDC's stations contains only fictive loads it is still considered isolated.

NOTE that this criteria for automatic HVDC disconnection in a contingncy is not documented at this time. There is currently no good place to document how contingenices are propagated, when the propagation is not obvious.

What is the current behavior?
If a contingency isolates a bus that is connected to a fictive load and an HVDC station, the HVDC is considered working.

What is the new behavior (if this is a feature change)?
If a contingency isolates a bus that is connected to a fictive load and an HVDC station, the HVDC is is stopped.

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

  • Yes
  • No

If yes, please check if the following requirements are fulfilled

  • The Breaking Change or Deprecated label has been added
  • The migration steps are described in the following section

What changes might users need to make in their application due to this PR? (migration steps)

Other information:

@vidaldid-rte vidaldid-rte changed the title [WIP] fictive load on isolated bus keeps hvdc isolated fictive load on isolated bus keeps hvdc isolated Nov 15, 2024
@@ -412,6 +412,13 @@ public double getLoadTargetP() {
.sum();
}

@Override
public double getNonFictitiousLoadTargetP() {
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure there is no performance impact to compute this on the fly ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The laternative I see would be

  • to compute incrementally this value for all buses in each event modifying the loads.
    Seems complex and gain is not obvious
  • to cache it at bus creation, ignoring deconnection events, actions etc..
    Might cause bugs

Here it is computed;
at each restore, for each HVDC station
at contingency propagation for each HVDC
and you pay an iteration price if the bus has several loads.

This being said I'll run some mesures of this cost on a large network.

Copy link
Collaborator Author

@vidaldid-rte vidaldid-rte Nov 19, 2024

Choose a reason for hiding this comment

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

It has ZERO performance impact the way it is used today for this new usage.
The method was never called in a sensitivity analysis of a large network with 100 contingencies.
The reason is that restoreInitialTopology that will trigger the call for each HVDC link is called in very rare and targeted occasions - when some switches are moved. So I suggest to keep it simple stupid at this time.

Copy link
Member

Choose a reason for hiding this comment

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

Indeed it seems to be only called at Lf Network loading so only one time.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

And only if an HVDC's station bus is disabled....

private static boolean isIsolated(Terminal terminal, LfNetworkParameters parameters) {
Bus bus = parameters.isBreakers() ? terminal.getBusBreakerView().getBus() : terminal.getBusView().getBus();
private static boolean isIsolated(Terminal terminal) {
Bus bus = terminal.getBusView().getBus();
Copy link
Member

Choose a reason for hiding this comment

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

I would rather agree on this change, but has it been motivated by something failing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No. Just the fact that when I wrote it first I didn't fully understand the difference betwwen BusView and BusBreakerVew

Copy link
Member

Choose a reason for hiding this comment

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

So maybe we should revert this change and think about it in another one.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh la la... So it can breaks something in a topology I have seen where HVDC disconnection matters. I'll show you next time we meet.

Copy link
Member

Choose a reason for hiding this comment

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

So in that case, you just need to add a unit test that shows the issue.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done. That was a bit trickier that I thought - and the bug is more seldom that I though because:

  • the breaker mode is activated in very rare occasions
  • the criteria is only used for an HVDC part that is not in the LfNetwork
    But the bug existed.

Copy link

sonarcloud bot commented Nov 22, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants