-
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
Support of static var compensator with VoltagePerReactivePowerControl extension #304
Conversation
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Add switch PV to PQ. Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
@annetill Note for that PR: the bus to which the static var compensator is connected is initialized with the nominal voltage. It could be better to start from the targetV value. |
Signed-off-by: Hadrien <hadrien.godard@artelys.com>
…tionTerm Signed-off-by: Hadrien <hadrien.godard@artelys.com>
Signed-off-by: Hadrien <hadrien.godard@artelys.com>
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.
Changes requested. I think that you have to do what is done in method createReactivePowerDistributionEquations
. You will start with exactly the same lines:
LfBus firstControllerBus = controllerBuses.get(0); // indeed in our case it is aslo the controlled bus.
List<EquationTerm> controllerBusReactiveTerms = createReactiveTerms(firstControllerBus, variableSet, creationParameters);
Then you have to get the slope and the BUS_V
term too. Please put of all of that in a dedicated function. In the target vector, you have to use: the ideal targetV
, controllerBus.getLoadTargetQ()
, controllerBus.getGenerationTargetQ()
and try to use DistributionData
to store the slope from the equation system to the target evctor. It will be useful later to support several SVCs with slope connected at the same bus.
@@ -364,6 +366,15 @@ private static void createImpedantBranch(LfBranch branch, LfBus bus1, LfBus bus2 | |||
} | |||
sq1.addTerm(q1); | |||
branch.setQ1(q1); | |||
// Add term slope * Q for svc |
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 introduce an utility method that will be called here and just below? It will make the code more comprehensive.
…f buses with a single SVC with a slope. Signed-off-by: Hadrien <hadrien.godard@artelys.com>
Signed-off-by: Hadrien <hadrien.godard@artelys.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
@Hadrien-Godard I am going to rebase the branch on master. The work is not finished because our controller bus with slope can switch PV to PQ, but I think we have to avoid switching them back from PQ to PV in a first approach. |
I think we can let them switch PV to PQ in the same manner as classic PV buses. |
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Fix check. Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
@@ -61,6 +61,8 @@ private static void createVoltageControls(LfNetwork lfNetwork, List<LfBus> lfBus | |||
List<LfGenerator> voltageControlGenerators = controllerBus.getGenerators().stream().filter(LfGenerator::hasVoltageControl).collect(Collectors.toList()); |
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.
Here we just have the generators linked to a controller bus. But, what happens in the case where we have two controller buses with each one SVC with slope ? We don't support that configuration too.
// we don't support several generators controlling voltage with slope | ||
LOGGER.warn("Non supported: several generators of bus {} control voltage with slope. Slope is therefore deactivated on those generators.", controllerBus); | ||
} | ||
voltageControlGenerators.forEach(g -> g.setSlope(0)); |
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.
Why we don't keep one finally ?
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
|
||
VoltageControl voltageControl = controlledBus.getVoltageControl().orElse(new VoltageControl(controlledBus, controllerTargetV)); | ||
voltageControl.addControllerBus(controllerBus); | ||
voltageControls.forEach(LfNetworkLoaderImpl::checkGeneratorsWithSlope); |
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.
You can not do that if the parameter is not active, it will be a loss in performances.
src/main/java/com/powsybl/openloadflow/network/impl/LfNetworkLoaderImpl.java
Show resolved
Hide resolved
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
@@ -60,6 +63,9 @@ public double getMaxQ(double p) { | |||
if (svc.getRegulationMode() == StaticVarCompensator.RegulationMode.VOLTAGE) { | |||
setVoltageControl(svc.getVoltageSetpoint(), svc.getRegulatingTerminal(), breakers, report); | |||
} | |||
if (svc.getExtension(VoltagePerReactivePowerControl.class) != null) { |
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.
Indeed, as we have the parameter in LfNetworkParameters
, why we don't use it here? If it is false, can we set the slope to zero?
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
LfBus controllerBus = controllerBuses.iterator().next(); | ||
if (!controllerBus.isVoltageControllerEnabled()) { | ||
// we only support one controlling static var compensator without any other controlling generators | ||
equationSystem.createEquation(controlledBus.getNum(), EquationType.BUS_V_SLOPE).setActive(false); |
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.
There is no criteria to switch it on?
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Kudos, SonarCloud Quality Gate passed! |
Please check if the PR fulfills these requirements (please use
'[x]'
to check the checkboxes, or submit the PR and then click the checkboxes)Does this PR already have an issue describing the problem ? If so, link to this issue using
'#XXX'
and skip the restYes, issue #97
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
If a unique static var compensator with non-zero slope is connected to a bus, regulating voltage locally, the slope attribute is taken into account. I have to increase the unit testing because the more complexe thing in that PR is to deal with all the configurations of generators connected to that bus: with or without slope, regulating voltage or reactive power.
What is the current behavior? (You can also link to an open issue here)
The slope is ignored.
What is the new behavior (if this is a feature change)?
If a unique static var compensator with non-zero slope is connected to a bus, regulating voltage locally, the slope attribute is taken into account.
Does this PR introduce a breaking change or deprecate an API? If yes, check the following:
Other information:
(if any of the questions/checkboxes don't apply, please delete them entirely)