-
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
Computing Hvdc line loss in AC emulation #1062
Changes from 13 commits
67346d7
7b60f08
a15c4e7
f6c740b
cf2eb5f
fba1fc4
ba21575
86189c4
a7e9dac
b6707f5
65069d7
90809f6
35bdfbb
860ee50
e9cb339
a2fb18c
74dface
50ecc4d
8c2af3f
423aeeb
b8dc6dd
6fc2c5a
47a137e
e8fd904
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -267,6 +267,20 @@ void testHvdcPowerAcEmulation() { | |
LoadFlow.Runner loadFlowRunner = new LoadFlow.Runner(new OpenLoadFlowProvider(new DenseMatrixFactory())); | ||
LoadFlowResult result = loadFlowRunner.run(network, new LoadFlowParameters()); | ||
assertTrue(result.isFullyConverged()); | ||
// AC Emulation takes into account cable loss | ||
assertActivePowerEquals(198.158, network.getHvdcConverterStation("cs2").getTerminal()); | ||
assertActivePowerEquals(-193.799, network.getHvdcConverterStation("cs3").getTerminal()); | ||
assertActivePowerEquals(-304.359, network.getGenerator("g1").getTerminal()); | ||
assertActivePowerEquals(300.0, network.getLoad("l4").getTerminal()); | ||
} | ||
|
||
@Test | ||
void testHvdcPowerAcEmulationWithoutR() { | ||
Network network = HvdcNetworkFactory.createHvdcLinkedByTwoLinesAndSwitch(); | ||
network.getHvdcLine("hvdc23").setR(0d); //Removing resistance to ignore cable loss | ||
LoadFlow.Runner loadFlowRunner = new LoadFlow.Runner(new OpenLoadFlowProvider(new DenseMatrixFactory())); | ||
LoadFlowResult result = loadFlowRunner.run(network, new LoadFlowParameters()); | ||
assertTrue(result.isFullyConverged()); | ||
assertActivePowerEquals(198.158, network.getHvdcConverterStation("cs2").getTerminal()); | ||
assertActivePowerEquals(-193.822, network.getHvdcConverterStation("cs3").getTerminal()); | ||
assertActivePowerEquals(-304.335, network.getGenerator("g1").getTerminal()); | ||
|
@@ -293,7 +307,16 @@ void testHvdcDirectionChangeAcEmulation() { | |
assertTrue(pcs2 < 0, "Power delivered by cs2"); | ||
assertTrue(Math.abs(pcs1) > Math.abs(pcs2), "Loss at HVDC output"); | ||
|
||
// Test if removing line resistance increases the power transit | ||
network.getHvdcLine("hvdc12").setR(0d); | ||
result = loadFlowRunner.run(network, new LoadFlowParameters()); | ||
assertTrue(result.isFullyConverged()); | ||
double pcs1r0 = network.getVscConverterStation("cs1").getTerminal().getP(); | ||
double pcs2r0 = network.getVscConverterStation("cs2").getTerminal().getP(); | ||
assertTrue(pcs1r0 - pcs2r0 < pcs1 - pcs2); // Check that loss with R=0 is lower than loss with R!=0 | ||
|
||
// Reverse power flow direction | ||
network.getHvdcLine("hvdc12").setR(0.1d); | ||
network.getGenerator("g2").setTargetP(5); | ||
network.getGenerator("g1").setTargetP(0); | ||
result = loadFlowRunner.run(network, new LoadFlowParameters()); | ||
|
@@ -312,6 +335,14 @@ void testHvdcDirectionChangeAcEmulation() { | |
assertTrue(pcs2 > 0, "Power enters at cs2"); | ||
assertTrue(pcs1 < 0, "Power delivered by cs1"); | ||
assertTrue(Math.abs(pcs2) > Math.abs(pcs1), "Loss at HVDC output"); | ||
|
||
// Test if removing line resistance increases the power transit in symetric network | ||
network.getHvdcLine("hvdc12").setR(0d); | ||
result = loadFlowRunner.run(network, new LoadFlowParameters()); | ||
assertTrue(result.isFullyConverged()); | ||
pcs1r0 = network.getVscConverterStation("cs1").getTerminal().getP(); | ||
pcs2r0 = network.getVscConverterStation("cs2").getTerminal().getP(); | ||
assertTrue(pcs2r0 - pcs1r0 < pcs2 - pcs1); // Check that loss with R=0 is lower than loss with R!=0 | ||
} | ||
|
||
@Test | ||
|
@@ -450,6 +481,7 @@ void testAcEmuWithOperationalLimits() { | |
Network network = HvdcNetworkFactory.createHvdcLinkedByTwoLinesAndSwitch(HvdcConverterStation.HvdcType.VSC); | ||
// without limit p=195 | ||
network.getHvdcLine("hvdc23") | ||
.setR(0d) //Removing resistance to ignore cable loss | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As a general comment, if unit tests changed because we improve/fix something, we prefer to fix them than to retry to code the old behavior. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, then the values of the tests have been updated with the new behavior (that have been verified). A new test had been added for the case without R to have an independant test ignoring line loss. |
||
.newExtension(HvdcOperatorActivePowerRangeAdder.class) | ||
.withOprFromCS2toCS1(180) | ||
.withOprFromCS1toCS2(170) | ||
|
@@ -482,6 +514,7 @@ void testAcEmuAndPMax() { | |
Network network = HvdcNetworkFactory.createHvdcLinkedByTwoLinesAndSwitch(HvdcConverterStation.HvdcType.VSC); | ||
// without limit p=195 | ||
network.getHvdcLine("hvdc23") | ||
.setR(0d) //Removing resistance to ignore cable loss | ||
.setMaxP(170); | ||
|
||
LoadFlow.Runner loadFlowRunner = new LoadFlow.Runner(new OpenLoadFlowProvider(new DenseMatrixFactory())); | ||
|
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 try to put more commun code in the abstract?
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.
Some modifications have been done, especially by creating a method getAbsActivePowerWithLosses() that computes the absolute value of the active power taking into account loss of converters (in the correct order depending on the direction of the transit) and the line loss.