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

Fix hvdc setpoint #723

Merged
merged 8 commits into from
Feb 3, 2023
Merged

Fix hvdc setpoint #723

merged 8 commits into from
Feb 3, 2023

Conversation

pet-mit
Copy link
Collaborator

@pet-mit pet-mit commented Jan 19, 2023

Please check if the PR fulfills these requirements (please use '[x]' to check the checkboxes, or submit the PR and then click the checkboxes)

  • 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)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Bug fix

What is the current behavior? (You can also link to an open issue here)
When angle-droop control is disabled on an HVDC, its setpoint is set to 0.
This can lead to a sensitivity computation failure if 0 is far from the "equilibrium" flow, which can be computed before disabling angle-droop control.

What is the new behavior (if this is a feature change)?
Now before disabling AC mode, FARAO computes a load-flow in order to compute the value of the angle-droop control.
Then after disabling AC mode, this value is set as HVDC active power set point.
This allows the RAO to go on at the same starting point, and no sensitivity failure shall occur.

@pet-mit pet-mit added bug Something isn't working PR: WIP labels Jan 19, 2023
@pet-mit pet-mit added PR: waiting-for-review This PR is waiting to be reviewed and removed PR: WIP labels Jan 19, 2023
phiedw
phiedw previously requested changes Jan 24, 2023
@@ -486,16 +557,22 @@ Pair<PrePerimeterResult, Map<RangeAction<?>, Double>> shiftRangeActionsUntilFlow
return Pair.of(automatonRangeActionOptimizationSensitivityAnalysisOutput, activatedRangeActionsWithSetpoint);
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should probably replace the condition with "abs(direction) > 1e-6" to make sure we don't observe random problems

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok

Comment on lines +501 to 505
// Disable HvdcAngleDroopActivePowerControl for HVDC lines, fetch their set-point, re-run sensitivity analysis and fetch new negative margins
Pair<PrePerimeterResult, Map<HvdcRangeAction, Double>> result = disableHvdcAngleDroopActivePowerControl(alignedRangeActions, network, preAutoPerimeterSensitivityAnalysis, automatonRangeActionOptimizationSensitivityAnalysisOutput, automatonState);
automatonRangeActionOptimizationSensitivityAnalysisOutput = result.getLeft();
activatedRangeActionsWithSetpoint.putAll(result.getRight());
flowCnecsWithNegativeMargin = getCnecsWithNegativeMarginWithoutExcludedCnecs(flowCnecs, flowCnecsToBeExcluded, automatonRangeActionOptimizationSensitivityAnalysisOutput);
Copy link
Collaborator

Choose a reason for hiding this comment

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

is there a risk that when disabling ac mode, we set a dc setpoint that is out of the range of the hvdc remedial action, all while making all the flow cnecs secure? (and therefore not entering the computeOptimalSetpoint that would put the setpoint back in its range)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added a watchdog in case it happens

Copy link
Collaborator

Choose a reason for hiding this comment

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

could you only run sensi analysis in disableHvdcAngleDroopActivePowerControl if activePowerSetpoints is not empty

* @param network: network with load flow results (to access angle values)
* @return the setpoint computed by the HvdcAngleDroopActivePowerControl
*/
private static double computeHvdcAngleDroopActivePowerControlValue(String hvdcLineId, Network network) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

could you add a comment indicating that P0 and angle difference are always in 1->2 direction ?

Comment on lines +501 to 505
// Disable HvdcAngleDroopActivePowerControl for HVDC lines, fetch their set-point, re-run sensitivity analysis and fetch new negative margins
Pair<PrePerimeterResult, Map<HvdcRangeAction, Double>> result = disableHvdcAngleDroopActivePowerControl(alignedRangeActions, network, preAutoPerimeterSensitivityAnalysis, automatonRangeActionOptimizationSensitivityAnalysisOutput, automatonState);
automatonRangeActionOptimizationSensitivityAnalysisOutput = result.getLeft();
activatedRangeActionsWithSetpoint.putAll(result.getRight());
flowCnecsWithNegativeMargin = getCnecsWithNegativeMarginWithoutExcludedCnecs(flowCnecs, flowCnecsToBeExcluded, automatonRangeActionOptimizationSensitivityAnalysisOutput);
Copy link
Collaborator

Choose a reason for hiding this comment

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

could you only run sensi analysis in disableHvdcAngleDroopActivePowerControl if activePowerSetpoints is not empty

@Godelaine Godelaine merged commit 8b6fa23 into master Feb 3, 2023
@pet-mit pet-mit deleted the fix_hvdc_setpoint branch February 3, 2023 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working PR: waiting-for-review This PR is waiting to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants