Skip to content
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

Active Power Control extension: add participationFactor #2402

Merged
merged 8 commits into from
Dec 13, 2022

Conversation

jeandemanged
Copy link
Member

@jeandemanged jeandemanged commented Dec 9, 2022

add participationFactor attribute in Active Power Control extension

Signed-off-by: Damien Jeandemange damien.jeandemange@artelys.com

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

doc/website update for next release to be done

Does this PR already have an issue describing the problem ?
No

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature:

  • add participationFactor attribute to active power control iIDM extension (for use by LoadFlow)
  • add corresponding LoadFlow BalanceType

What is the current behavior?
No support of participationFactor representation, for use by LoadFlow

What is the new behavior (if this is a feature change)?

  • participationFactor attribute can be represented via active power control iIDM extension
  • LoadFlow API BalanceType enum has new option to use participation factors

Does this PR introduce a breaking change or deprecate an API? If yes, check the following:

  • The Breaking Change or Deprecated label has been added
  • The migration guide has been updated in the github wiki (What changes might users need to make in their application due to this PR?)
    Note sure ...
    I made the attribute optional in the XML serialization, so I do not think this qualifies as a breaking change. Please let me know if you prefer that I bump a new version of the active power control extension xsd...

Other information:

  • Please le me know if you prefer a separate extension for this instead of reusing the existing ActivePowerControl extension (which seems a good place imho)

  • Other PRs will follow to:

    • fill in these attributes in CGMES Importer
    • open-loadflow support of these attributes

…ferencePriority attributes

Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
* 0 = don't care (default) 1 = highest priority. 2 is less than 1 and so on.
* @return reference priority
*/
int getReferencePriority();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have an extension SlackTerminal for that (see CGMES import how referencePriority is used to create a SlackTerminal extension)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SlackTerminal could indeed work for this but not in the general case:

  • there can be only one SlackTerminal per VoltageLevel. In the case where there are two generators in on VoltageLevel, gen1 with priority 1, gen2 with priority 2. Say both are connected initially, but then the user disconnects the generator in priority 1, the other generator with priority 2 cannot be picked up.
  • SlackTerminal-s across different VoltageLevel-s do not have have any relative priority. So If I have two VoltageLevel-s, VL1 with gen1 of referencePriority1, VL2 with gen2 of referencePriority2, in this case it is not possible to represent that gen1 has higher priority than gen2 for slack slelection.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem with referencePriority on generators is that it does not cover the general case of slack bus selection but only slack bus on PV buses. Only very old power flow, does not allow general slack bus selection and most of the time best slack bus is not on a PV bus (like when you select most meshed bus). Also we tend to have more and more generators modelling on MT in our cases (so in 15Kv behind a step up transformer) and having a slack of this kind of bus is not robust.

Maybe we should just try to improve/enrich existing SlackTerminal extension in order to meet your needs ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just thinking... an alternative solution could be to enhance the existing SlackTerminal extension to allow 1/ for multiple SlackTerminal extensions to be present in a given VoltageLevel, and 2/ add priority to the extension. But This would cause issues for backward compatibility of existing tools relying on this extension, and 2/ the very same extension is used for slack selection results, and when it comes to slack selection results, priority don't really make sense any more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I de-scoped referencePriority from this PR, have to think about it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not, maybe in order to complete this PR, we can just remove the referencePriority and think about how to improve slack selection part in another issue/PR ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed referencePriority from this PR and entered issue #2412 to track this topic

@@ -36,6 +36,10 @@ public enum VoltageInitMode {
public enum BalanceType {
PROPORTIONAL_TO_GENERATION_P,
PROPORTIONAL_TO_GENERATION_P_MAX,
PROPORTIONAL_TO_GENERATION_REMAINING_MARGIN,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining margin means proportional to pmax - targetP ?

Copy link
Member Author

@jeandemanged jeandemanged Dec 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes exactly (provided that pmax - targetP is positive)

could probably better renamed PROPORTIONAL_TO_GENERATION_RESERVE_MARGIN, or just PROPORTIONAL_TO_GENERATION_RESERVE ... any thought ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PROPORTIONAL_TO_GENERATION_REMAINING_MARGIN seems ok to me

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should you add a comment to describe exactly what does it mean

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added javadoc to the options

@jeandemanged jeandemanged changed the title Active Power Control extension: add shortPF, normalPF, longPF, and referencePriority Active Power Control extension: add shortPF, normalPF, longPF Dec 12, 2022
Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
@jeandemanged jeandemanged force-pushed the active_power_control_extension_enhancements branch from 10b5a29 to a2656cc Compare December 12, 2022 10:02
Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
@jeandemanged jeandemanged changed the title Active Power Control extension: add shortPF, normalPF, longPF Active Power Control extension: add participationFactor Dec 13, 2022
jeandemanged and others added 3 commits December 13, 2022 09:27
Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
Signed-off-by: VEDELAGO MIORA <miora.ralambotiana@rte-france.com>
@miovd miovd requested a review from geofjamg December 13, 2022 15:04
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

94.0% 94.0% Coverage
0.0% 0.0% Duplication

@miovd miovd merged commit de2d9ad into main Dec 13, 2022
@miovd miovd deleted the active_power_control_extension_enhancements branch December 13, 2022 16:15
HugoKulesza pushed a commit that referenced this pull request Dec 16, 2022
Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
Co-authored-by: VEDELAGO MIORA <miora.ralambotiana@rte-france.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants