-
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
Voltage control of transformer: remote and local #127
Conversation
.setTargetV(34.0); | ||
|
||
LoadFlowResult result = loadFlowRunner.run(network, parameters); | ||
// assertTrue(result.isOk()); FIXME |
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.
@geofjamg it is just a first version of voltage control by transformer and it is not working. At this test, the norm of my cost function is NaN
. Do you have any idea of the problem ?
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 is because the way tap changer voltage target equation is defined in AcEquationSystem.createBranchVoltageTargetEquation.
You should define a new equation type for tap changer target voltage (like BUS_TRANSFO_V)) because if you look at Equation.initTargets for type BUS_V, we look for a generator target voltage and not a tap changer target voltage so result is nan and this nan is added to targets vector before first NR.
} | ||
|
||
@Override | ||
public OuterLoopStatus check(OuterLoopContext context) { |
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 don't known if it is clear for you what has to be done here but here is a raw extract (to translate) of what is done in H2:
Articulation des 3 load flows pour la simulations des regleurs en charges
- Pour rappel:
- -LF1 = gpesTHT PV, grpes HT PV, regleurs fixes
- -LF2 = gpesTHT PV, grpes HT PQ, regleurs variables
- -LF3 = gpesTHT PV, grpes HT PV, regleurs fixes (apres discretisation)
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 am not sure that we have to follow these 3 steps here. I think that I am going to follow simply what we have done for phase tap changer. It will be easy after that to make a more business and complex outerloop. In the EMF specifications, it is just written:
When calculating the steady state solution, a full Newton Raphson power flow algorithm is to be used, using the following settings:
• Q limits shall be respected (also for slack node/swing bus)
• Transformer tap adjustment is set to enabled
• Switched shunt adjustment is set to enabled
Transformer tap and switch shunt control is used during power flow calculation to enable regulating control during contingency analysis (where the solved system state is used for the base case). In case of non-convergence, switched shunt and transformer tap regulation is disabled and power flow calculation is started again.
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.
Even if not specified you need to follow these 3 steps in order to emulate a realistics tap changer and generation co ntrol behaviour.
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.
Do we have a way to have a generic outerloop that can be customized easily to simulate real world ?
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.
Yes just one outerloop and a different behaviour at iteration 0, 1 and 2
|
||
LoadFlowResult result = loadFlowRunner.run(network, parameters); | ||
assertTrue(result.isOk()); | ||
assertVoltageEquals(34.433, bus3); |
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.
@geofjamg I have a small difference but I am not sure to understand why...
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.
Because we round the r1?
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 something missing in the algo, maybe after rounding and fixing ratio it is to generation behind transformers du help reaching the target voltage?
Kudos, SonarCloud Quality Gate passed! 0 Bugs |
@geofjamg I have finished my first version. Can you make a review in order to be technically good ? It could be a good starting point for a functional definition of the transformer voltage control outerloop with our colleagues. |
Signed-off-by: Thomas ADAM <tadam@silicom.fr>
Signed-off-by: Thomas ADAM <tadam@silicom.fr>
Signed-off-by: Thomas ADAM <tadam@silicom.fr>
Signed-off-by: Thomas ADAM <tadam@silicom.fr>
Signed-off-by: Thomas ADAM <tadam@silicom.fr>
Signed-off-by: Thomas ADAM <tadam@silicom.fr>
Signed-off-by: Thomas ADAM <tadam@silicom.fr>
Signed-off-by: Thomas ADAM <tadam@silicom.fr>
Signed-off-by: Thomas ADAM <tadam@silicom.fr>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Thomas ADAM <tadam@silicom.fr>
Signed-off-by: Thomas ADAM <tadam@silicom.fr>
Signed-off-by: Thomas ADAM <tadam@silicom.fr>
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>
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>
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>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
…ybl/powsybl-open-loadflow into transformer-voltage-control
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
@@ -92,7 +92,7 @@ void voltageControlT2wtTest() { | |||
LoadFlowResult result = loadFlowRunner.run(network, parameters); | |||
assertTrue(result.isOk()); | |||
assertVoltageEquals(134.281, bus2); | |||
assertVoltageEquals(34.433, t2wt.getTerminal2().getBusView().getBus()); | |||
assertVoltageEquals(34.433, t2wt.getTerminal2().getBusView().getBus()); //FIXME: should be 34.427 |
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.
@geofjamg here the FIXME: result is strange.
Remove unit case. Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
…ybl/powsybl-open-loadflow into transformer-voltage-control
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>
Remove useless functions for PiModel. 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>
@@ -18,7 +18,8 @@ | |||
BRANCH_I("i", SubjectType.BRANCH), | |||
ZERO_Q("z_q", SubjectType.BUS), | |||
ZERO_V("z_v", SubjectType.BRANCH), | |||
ZERO_PHI("z_\u03C6", SubjectType.BRANCH); | |||
ZERO_PHI("z_\u03C6", SubjectType.BRANCH), | |||
ZERO_RHO1("z_\u03B1", SubjectType.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.
\u03C1 for rho
@@ -13,6 +13,7 @@ | |||
BUS_V("v"), | |||
BUS_PHI("\u03C6"), | |||
BRANCH_ALPHA1("\u03B1" + "1"), | |||
BRANCH_RHO1("rho" + "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.
\u03C1 instead of rho
if (bus.isDiscreteVoltageControlled()) { | ||
equationSystem.createEquation(bus.getNum(), EquationType.BUS_V).addTerm(new BusVoltageEquationTerm(bus, variableSet)); | ||
} | ||
if (bus.isDiscreteVoltageControlled() && bus.getDiscreteVoltageControl().getControllers().size() > 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.
you could insert that if in the if above. Or we could add a isDiscreteVoltageSharedControlled method?
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
private static double getRho1DistributionTarget(LfNetwork network, int num, DistributionData data) { | ||
LfBranch controllerBranch = network.getBranch(num); | ||
LfBranch firstControllerBranch = network.getBranch(data.getFirstControllerElementNum()); | ||
return controllerBranch.getPiModel().getR1() - firstControllerBranch.getPiModel().getR1(); |
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 far as I understand we keep the gap between rhos constant during regulation?
Maybe just add a comment somewhere?
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Kudos, SonarCloud Quality Gate passed! |
Signed-off-by: Anne Tilloy anne.tilloy@rte-france.com
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 rest#106
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
What is the current behavior? (You can also link to an open issue here)
What is the new behavior (if this is a feature change)?
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)