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

[WIP] Hvdc and disconnect #957

Closed
wants to merge 8 commits into from
Closed

[WIP] Hvdc and disconnect #957

wants to merge 8 commits into from

Conversation

vidaldid-rte
Copy link
Contributor

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?

What kind of change does this PR introduce?

What is the current behavior?

What is the new behavior (if this is a feature change)?

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:

@@ -338,6 +338,42 @@ public static Network createTwoCcLinkedByAHvdc() {
return network;
}

/**
Copy link
Member

Choose a reason for hiding this comment

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

Try to update scheme with switch "s2".

Network network = HvdcNetworkFactory.createHvdcLinkedByTwoLinesWithGeneratorAndLoad(hvdcType);

// Detect current in l12
network.getLine("l12").newCurrentLimits2()
Copy link
Member

Choose a reason for hiding this comment

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

It could be relevant to put this in the factory, no? For further usages.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure. This is a hack I used to get the network results in fact. This it not related to any sensible limit wa could have.
In OLF I realized you can cheat and have a direct access to the network result.
I wrote the test is if I was restricted to what exists in the powsybl security API

Collections.emptyList(),
// We want to see all violations here.
new SecurityAnalysisParameters()
.setIncreasedViolationsParameters(new SecurityAnalysisParameters.IncreasedViolationsParameters(-1000,
Copy link
Member

Choose a reason for hiding this comment

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

Violations parameters change something here? Default values are not sufficient?

@@ -125,4 +133,38 @@ public void updateState() {
((LfVscConverterStationImpl) converterStation1).getStation().getTerminal().setP(p1.eval() * PerUnit.SB);
((LfVscConverterStationImpl) converterStation2).getStation().getTerminal().setP(p2.eval() * PerUnit.SB);
}

@Override
public boolean isInjectingActiveFlow() {
Copy link
Member

Choose a reason for hiding this comment

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

The method name if not the good one. It is just a way to say the AC emulation is effective (because it means that the hvdc line is not disabled).

@@ -711,6 +711,10 @@ public void setDisabled(boolean disabled) {
if (controllerShunt != null) {
controllerShunt.setDisabled(disabled);
}
// For VSC HVDC this changes the targetP on the other side
Copy link
Member

Choose a reason for hiding this comment

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

Can we imagine a short cut here created at network loading for performance?


boolean canTransferActivePower();

static double getActualTargetP(HvdcConverterStation<?> station) {
Copy link
Member

Choose a reason for hiding this comment

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

The fix is working for LCC converter station when the initial configuration in iidm matches the criteria. We see that the whole fiw for LCCs is more costly. But I don't understand why you seem to use this criteria at VSC converter station creation in LfNetwork, because for me you have to store the non zero target P in case of remedial action.

Copy link
Member

Choose a reason for hiding this comment

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

Note: we have probably a bug in AbstractLfGenerator with:
image
I think it is not valid for VSC converter station (but maybe minP is negative).

@@ -14,4 +16,6 @@ public interface LfVscConverterStation extends LfGenerator {
double getLossFactor();

void setHvdc(LfHvdc hvdc);
Copy link
Member

Choose a reason for hiding this comment

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

Just a detail but: here getting an hvdc could return null and getting the other bus is an optional. Maybe we have to choose one or the other for both.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no getter for the HVDC at this time.

However (in the current implementation - after your review) the lfHVDC is always resent unless not present in the IDM.
But even hen present the can be an LfBus only at one end... if the other side is in a different syncrhonized network.

) {
return false;
}
if (!bus.getLoads().isEmpty()) {

Choose a reason for hiding this comment

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

Why is this condifion required?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

First the condition needs to be checked in the LfNetwork because the topology can change when applying contingencies or operator strategies.
Specifically on loads, it is a translation of the criteria applies at IIM level - we consider the network degenrated if the bus contains only one element, the HDVC station.
In particular we do not want to consider a degenerated network a network that would have one load onthe other side, for example representing a country.
This is the criteria implemented in this PR as discussed internally. But there are other ways to define a degenerated network. This one is simple and should cover basic contingency analysis. But can fail in more complex cases.

vidaldid-rte and others added 8 commits January 19, 2024 16:20
Signed-off-by: VIDAL Didier (Externe) <didier.vidal_externe@rte-france.com>
Signed-off-by: VIDAL Didier (Externe) <didier.vidal_externe@rte-france.com>
…tor strategies

Signed-off-by: VIDAL Didier (Externe) <didier.vidal_externe@rte-france.com>
Signed-off-by: VIDAL Didier (Externe) <didier.vidal_externe@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: VIDAL Didier (Externe) <didier.vidal_externe@rte-france.com>
…situation N

Signed-off-by: VIDAL Didier (Externe) <didier.vidal_externe@rte-france.com>
Signed-off-by: VIDAL Didier (Externe) <didier.vidal_externe@rte-france.com>
Signed-off-by: VIDAL Didier (Externe) <didier.vidal_externe@rte-france.com>
@annetill
Copy link
Member

annetill commented Feb 1, 2024

Partially solved by #961 and #965. Lccs after contingency missing.

@annetill annetill closed this Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants