-
Notifications
You must be signed in to change notification settings - Fork 7
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
Fix hvdc setpoint #723
Conversation
...main/java/com/farao_community/farao/search_tree_rao/castor/algorithm/AutomatonSimulator.java
Outdated
Show resolved
Hide resolved
...main/java/com/farao_community/farao/search_tree_rao/castor/algorithm/AutomatonSimulator.java
Show resolved
Hide resolved
@@ -486,16 +557,22 @@ Pair<PrePerimeterResult, Map<RangeAction<?>, Double>> shiftRangeActionsUntilFlow | |||
return Pair.of(automatonRangeActionOptimizationSensitivityAnalysisOutput, activatedRangeActionsWithSetpoint); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
// 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); |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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 ?
...main/java/com/farao_community/farao/search_tree_rao/castor/algorithm/AutomatonSimulator.java
Outdated
Show resolved
Hide resolved
// 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); |
There was a problem hiding this comment.
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
Please check if the PR fulfills these requirements (please use
'[x]'
to check the checkboxes, or submit the PR and then click the checkboxes)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.