-
Notifications
You must be signed in to change notification settings - Fork 8
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
Substation automation system #811
Conversation
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
# Conflicts: # src/main/java/com/powsybl/openloadflow/OpenLoadFlowParameters.java # src/test/resources/debug-parameters.json
# Conflicts: # src/main/java/com/powsybl/openloadflow/OpenLoadFlowParameters.java # src/main/java/com/powsybl/openloadflow/OpenLoadFlowProvider.java # src/main/java/com/powsybl/openloadflow/network/LfNetworkParameters.java # src/main/java/com/powsybl/openloadflow/network/impl/AbstractLfBranch.java # src/main/java/com/powsybl/openloadflow/network/impl/Networks.java # src/test/java/com/powsybl/openloadflow/OpenLoadFlowProviderTest.java # src/test/resources/debug-parameters.json
# Conflicts: # src/main/java/com/powsybl/openloadflow/OpenLoadFlowParameters.java # src/main/java/com/powsybl/openloadflow/ac/AcloadFlowEngine.java # src/main/java/com/powsybl/openloadflow/network/LfNetworkParameters.java # src/test/java/com/powsybl/openloadflow/OpenLoadFlowParametersTest.java # src/test/java/com/powsybl/openloadflow/OpenLoadFlowProviderTest.java # src/test/resources/debug-parameters.json
SonarCloud Quality Gate failed. 0 Bugs 89.3% Coverage Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
@@ -84,6 +84,10 @@ public List<AcOuterLoop> configure(LoadFlowParameters parameters, OpenLoadFlowPa | |||
if (parameters.isShuntCompensatorVoltageControlOn()) { | |||
outerLoops.add(createShuntVoltageControlOuterLoop(parametersExt)); | |||
} | |||
// automation functions |
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.
The sequence of outer loops becomes to be a bit hard to follow : why this order and why not another one? And for example, what is the behavior when you have a tap changer with voltage control in incremental mode and automatons? What is the sequence? And phase shifters?
LOGGER.debug("Line '{}' is overloaded ({} A > {} A), {} switch '{}'", | ||
branch.getId(), i1 * ib, threshold * ib, system.isSwitchOpen() ? "open" : "close", | ||
system.getSwitchToOperate().getId()); | ||
system.getSwitchToOperate().setDisabled(system.isSwitchOpen()); |
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.
When you disabled a switch, I think you have to make a small connectivity analysis to be sure that nothing else is disabled. Same remark when it is enabled. See LfAction for that.
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.
Fixed
|
||
OverloadManagementSystemAdder<T> withThreshold(double threshold); | ||
|
||
OverloadManagementSystemAdder<T> withSwitchIdToOperate(String switchId); |
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 must think about a switch or a branch side I think.
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.
But we should before correctly handle line disconnected at only one side
# Conflicts: # src/main/java/com/powsybl/openloadflow/DefaultAcOuterLoopConfig.java # src/main/java/com/powsybl/openloadflow/OpenLoadFlowParameters.java # src/main/java/com/powsybl/openloadflow/network/LfNetwork.java # src/main/java/com/powsybl/openloadflow/network/LfNetworkParameters.java # src/main/java/com/powsybl/openloadflow/network/impl/LfNetworkLoaderImpl.java # src/main/java/com/powsybl/openloadflow/network/impl/Networks.java # src/test/java/com/powsybl/openloadflow/OpenLoadFlowParametersTest.java # src/test/java/com/powsybl/openloadflow/OpenLoadFlowProviderTest.java # src/test/resources/debug-parameters.json
# Conflicts: # src/main/java/com/powsybl/openloadflow/OpenLoadFlowParameters.java # src/main/java/com/powsybl/openloadflow/network/LfNetworkParameters.java # src/test/java/com/powsybl/openloadflow/OpenLoadFlowParametersTest.java # src/test/java/com/powsybl/openloadflow/OpenLoadFlowProviderTest.java # src/test/resources/debug-parameters.json
} | ||
|
||
@Override | ||
public String getSwitchIdToOperate() { |
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.
This kind of automation system could use a switch between bus bar sections as remedial action. But most of the time, it is a switch from a line extremity. In that case, I think it is better to model it as a terminal ref (or equipment + side) for performance issue. I think it is the same idea for protection schemes.
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.
Sure, but this is something that will be in addition to switch operation and that cannot be implemented right now in OLF because we don't know open a branch at only one side during the simulation
|
||
void setEnabled(boolean enabled); | ||
|
||
String getLineIdToMonitor(); |
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.
Line or Branch ?
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.
monitoredBranch
?
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.
From my knowledge, this kind of system are only used on lines
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.
MonitoredLine?
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
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.
Can you add that you look at side 1?
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 be able to configure it. This is a first and simple version.
src/main/java/com/powsybl/openloadflow/network/impl/extensions/OverloadManagementSystem.java
Show resolved
Hide resolved
@@ -156,7 +160,9 @@ public LfNetworkParameters(LfNetworkParameters other) { | |||
this.secondaryVoltageControl = other.secondaryVoltageControl; | |||
this.cacheEnabled = other.cacheEnabled; | |||
this.asymmetrical = other.asymmetrical; | |||
this.linePerUnitMode = other.linePerUnitMode; |
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.
:-)
SubstationAutomationSystems systems = substation.getExtension(SubstationAutomationSystems.class); | ||
if (systems != null) { | ||
for (OverloadManagementSystem system : systems.getOverloadManagementSystems()) { | ||
addSwitchesOperatedByAutomationSystem(network, topoConfig, system); |
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 usually say addSwitchesToOperateBy...
to be coherent why the rest of the code.
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.
But this is an hypothetical use of the switch. This is not necessarily to operate.
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.
As in remedial actions, it is hypothetical.
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.
As you wish
src/main/java/com/powsybl/openloadflow/ac/outerloop/AutomationSystemOuterLoop.java
Show resolved
Hide resolved
# Conflicts: # src/main/java/com/powsybl/openloadflow/OpenLoadFlowParameters.java # src/test/java/com/powsybl/openloadflow/OpenLoadFlowParametersTest.java # src/test/java/com/powsybl/openloadflow/OpenLoadFlowProviderTest.java # src/test/resources/debug-parameters.json
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
@@ -271,7 +273,8 @@ private static <E extends Enum<E>> List<Object> getEnumPossibleValues(Class<E> e | |||
new Parameter(MAX_VOLTAGE_CHANGE_STATE_VECTOR_SCALING_MAX_DPHI_PARAM_NAME, ParameterType.DOUBLE, "Max voltage angle change for the max voltage change state vector scaling", MaxVoltageChangeStateVectorScaling.DEFAULT_MAX_DPHI), | |||
new Parameter(LINE_PER_UNIT_MODE_PARAM_NAME, ParameterType.STRING, "Line per unit mode", LinePerUnitMode.IMPEDANCE.name(), getEnumPossibleValues(LinePerUnitMode.class)), | |||
new Parameter(USE_LOAD_MODEL_PARAM_NAME, ParameterType.BOOLEAN, "Use load model (with voltage dependency) for simulation", LfNetworkParameters.USE_LOAD_MODE_DEFAULT_VALUE), | |||
new Parameter(DC_APPROXIMATION_TYPE_PARAM_NAME, ParameterType.STRING, "DC approximation type", DcEquationSystemCreationParameters.DC_APPROXIMATION_TYPE_DEFAULT_VALUE.name(), getEnumPossibleValues(DcApproximationType.class)) | |||
new Parameter(DC_APPROXIMATION_TYPE_PARAM_NAME, ParameterType.STRING, "DC approximation type", DcEquationSystemCreationParameters.DC_APPROXIMATION_TYPE_DEFAULT_VALUE.name(), getEnumPossibleValues(DcApproximationType.class)), | |||
new Parameter(SIMULATE_AUTOMATION_SYSTEMS_PARAM_NAME, ParameterType.BOOLEAN, "Automatons simulation", LfNetworkParameters.SIMULATE_AUTOMATION_SYSTEMS_DEFAULT_VALUE) |
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.
Automatons simulation? For coherence, automation systems simulation maybe.
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.
Fixed
# Conflicts: # src/test/java/com/powsybl/openloadflow/OpenLoadFlowParametersTest.java # src/test/java/com/powsybl/openloadflow/OpenLoadFlowProviderTest.java
Kudos, SonarCloud Quality Gate passed! |
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
No
What kind of change does this PR introduce?
Feature
What is the new behavior (if this is a feature change)?
We can simulate overload management systems.
Does this PR introduce a breaking change or deprecate an API?
Other information: