-
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
Merged
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
89bd79a
Add voltage per reactive power control parameter.
annetill fd73a3b
Add slope in generator attributes.
annetill 52a076d
Add GeneratorWithSlopeVoltageEquationTerm.
annetill d1a5910
Introduce new type of bus for equation.
annetill d796f3f
Merge.
annetill 48dd622
Bug fix.
annetill 9cc0707
Add unit tests.
annetill 5b1c27f
Fix pom.xml.
annetill 63fa182
Add a test with a generator at bus2 not controlling voltage
Hadrien-Godard 911be17
Using already existing Terms instead of GeneratorWithSlopeVoltageEqua…
Hadrien-Godard 3dcaa3f
Slightly modifying some test results
Hadrien-Godard 465b397
Typo
Hadrien-Godard c177f03
Factorization and using of getGenerationTargetQ for initial targets o…
Hadrien-Godard 3ac6154
Remove a custom print for debug
Hadrien-Godard 13560db
Introduce method getGeneratorControllingVoltageWithSlope for LfBus.
annetill ebdfdfb
Clean code.
annetill 74c622b
Merge.
annetill 3ff6abb
Switching PQ to PV not supported.
annetill c9a5bd1
getGeneratorControllingVoltageWithSlope: lambda changes
flo-dup 54591ba
Use distribution data.
annetill 6e1f8ae
Add a test for SVC with slope PV -> PQ and blocked.
annetill 9e17ff7
Merge branch 'master' into svc-slope
annetill 0afe0bf
Fix check.
annetill e016a7a
Remove useless variable.
annetill 7c16fb0
From nullable to Optional
flo-dup cc6cb07
Trying to correct bug without ruining the code clarity
flo-dup ff71ad0
Fix logback.
annetill e4bf470
Merge branch 'master' into svc-slope
annetill 121a673
Disabling slope when loading if non supported case
flo-dup 2b29386
Add setSlope to implementations
flo-dup e8af6f2
Quick fix for bug.
annetill 612ab6c
Merge branch 'master' into svc-slope
annetill d8bfc47
check generators with slope once voltage controls are created
flo-dup a94f812
Checking slope only if voltagePerReactivePowerControl is enabled
flo-dup f4bf98c
Update unit test
flo-dup 92dffda
VoltageControl::isVoltageControlLocal: Correct use and add doc
flo-dup bce9e12
LfBus::getGeneratorsControllingVoltageWithSlope returns a list
flo-dup e3144fc
Simpler LfNetworkLoaderImpl::checkGeneratorsWithSlope
flo-dup 34a660c
Merge.
annetill e7db88d
Add a check to verify that the control is local.
annetill 8800755
Set slope only if voltagePerReactivePowerControl true
flo-dup 27a04d3
Clean code.
annetill 2a2d28a
Remove useless changes.
annetill 70ccc31
Performance: avoid always filtering out generators based on slope
flo-dup 15ae6cc
Small refactor/renaming
flo-dup 39021d8
fix
flo-dup df61d8e
Fix constructor.
annetill 1e6b953
Clean.
annetill File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,18 +40,26 @@ private void updateControlledBus(VoltageControl voltageControl, EquationSystem e | |
LfBus controlledBus = voltageControl.getControlledBus(); | ||
Set<LfBus> controllerBuses = voltageControl.getControllerBuses(); | ||
|
||
// clean reactive power distribution equations | ||
controllerBuses.forEach(b -> equationSystem.removeEquation(b.getNum(), EquationType.ZERO_Q)); | ||
|
||
// controlled bus has a voltage equation only if one of the controller bus has voltage control on | ||
List<LfBus> controllerBusesWithVoltageControlOn = controllerBuses.stream() | ||
.filter(LfBus::isVoltageControllerEnabled) | ||
.collect(Collectors.toList()); | ||
equationSystem.createEquation(controlledBus.getNum(), EquationType.BUS_V).setActive(!controllerBusesWithVoltageControlOn.isEmpty()); | ||
|
||
// create reactive power equations on controller buses that have voltage control on | ||
if (!controllerBusesWithVoltageControlOn.isEmpty()) { | ||
AcEquationSystem.createReactivePowerDistributionEquations(equationSystem, variableSet, creationParameters, controllerBusesWithVoltageControlOn); | ||
LfBus firstControllerBus = controllerBuses.iterator().next(); | ||
if (firstControllerBus.hasGeneratorsWithSlope()) { | ||
// we only support one controlling static var compensator without any other controlling generators | ||
// we don't support controller bus that wants to control back voltage with slope. | ||
if (!firstControllerBus.isVoltageControllerEnabled()) { | ||
equationSystem.createEquation(controlledBus.getNum(), EquationType.BUS_V_SLOPE).setActive(false); | ||
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. There is no criteria to switch it on? |
||
} | ||
} else { | ||
// controlled bus has a voltage equation only if one of the controller bus has voltage control on | ||
List<LfBus> controllerBusesWithVoltageControlOn = controllerBuses.stream() | ||
.filter(LfBus::isVoltageControllerEnabled) | ||
.collect(Collectors.toList()); | ||
// clean reactive power distribution equations | ||
controllerBuses.forEach(b -> equationSystem.removeEquation(b.getNum(), EquationType.ZERO_Q)); | ||
// is there one static var compensator with a non-zero slope | ||
equationSystem.createEquation(controlledBus.getNum(), EquationType.BUS_V).setActive(!controllerBusesWithVoltageControlOn.isEmpty()); | ||
// create reactive power equations on controller buses that have voltage control on | ||
if (!controllerBusesWithVoltageControlOn.isEmpty()) { | ||
AcEquationSystem.createReactivePowerDistributionEquations(equationSystem, variableSet, creationParameters, controllerBusesWithVoltageControlOn); | ||
} | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 can you please validate these new lines. For me, it works because we are sure that the bus checked is a PQ bus that where previously PV. Do you agree?
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 because hasVoltageControllerCapability has been check before calling this method. You should add a comment on this, because this is not obvious and I add to re-read the code several times to be sure.
What was the purpose of this change, why the actual check does not work?