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

Extrapolation of getMinQ and getMaxQ for reactive capability curves #3250

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

SylvestreSakti
Copy link
Contributor

@SylvestreSakti SylvestreSakti commented Dec 10, 2024

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)

Does this PR already have an issue describing the problem?

This PR adresses this issue in Open Load Flow : powsybl/powsybl-open-loadflow#1143

What kind of change does this PR introduce?
For accuracy of load flow when generators are outside their active power limits (e.g for starting generators that may have P < Pmin). We want to model the reactive limits getMinQ(p) and getMaxQ(p) in a more accurate way than just getting the reactive power limits of the bound Pmin or Pmax. (See figure given in the linked issue)

What is the current behavior?
When P < Pmin or P > Pmax, reactive limits of P : getMinQ(P) getMaxQ(P) are the values of getMinQ(Pmin) getMaxQ(Pmin) (or Pmax).

What is the new behavior (if this is a feature change)?
We introduce new methods getMinQ(double p, boolean extrapolateReactiveLimitSlope) (and same for getMaxQ(...)) that behaves like existing getMinQ(double p) if the boolean is set to false. If set to true, the reactive limit slope of the PQ diagram is extrapolated outside active power limits (as shown in the figure given in the linked issue).

Does this PR introduce a breaking change or deprecate an API?

  • Yes
  • No

If yes, please check if the following requirements are fulfilled

  • The Breaking Change or Deprecated label has been added
  • The migration steps are described in the following section

What changes might users need to make in their application due to this PR? (migration steps)

ReactiveCapabilityCurve API has been modified, introducing two methods :
getMinQ(double p, boolean extrapolateReactiveLimitSlope)
getMaxQ(double p, boolean extrapolateReactiveLimitSlope)
If extrapolateReactiveLimitSlope = false the behavior is the same as existing getMinQ(p) and getMaxQ(p)

The method must be implemented by custom IIDM implementations.

A new utility method, ReactiveCapabilityCurveUtil.extrapolateReactiveLimitsSlope(...), which computes a point outside [minQ ; maxQ], was added to help you to implement the new API methods.

…apolation of reactive limit slope

Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
…d maxQ when extrapolated

Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
@SylvestreSakti SylvestreSakti added the Breaking Change API is broken label Dec 10, 2024
Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
@vidaldid-rte vidaldid-rte changed the title Extrapolation of getMinQ and getMaxQ for reactive capability curve [WIP] Extrapolation of getMinQ and getMaxQ for reactive capability curve Dec 11, 2024
Copy link
Contributor

@vidaldid-rte vidaldid-rte left a comment

Choose a reason for hiding this comment

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

Approved but marked in WIP until we understand better whether this extrapolation is justified for usual groups.

Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
@SylvestreSakti SylvestreSakti changed the title [WIP] Extrapolation of getMinQ and getMaxQ for reactive capability curve Extrapolation of getMinQ and getMaxQ for reactive capability curve Feb 3, 2025
@vidaldid-rte
Copy link
Contributor

@olperr1
Hello Olivier. I removed the do not merge tag.
In simu team review we confirmed that we need this new optional way of extrapolating a reactive limit diagram so that OLF can (if desired) extrapolate Q diagrams below PMin with this method.
Next release is good but I believe we can wait for the June release if it creates issues.

Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
SylvestreSakti and others added 2 commits February 27, 2025 16:53
Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
@SylvestreSakti
Copy link
Contributor Author

SylvestreSakti commented Feb 27, 2025

Hello @olperr1 thank you for your reviews.
I took them into account, rearranging a little bit the code to now cleanly separate the three cases in ReactiveCapabilityCurve (1- P is defined; 2 - P is evaluated between minP and maxP; 3 - P is evaluated outside minP and maxP). Also removed duplicated code to process minQ or maxQ with the same generic method.

The log warning now shows the owner description, but I removed specific values, so that a repeated log message can be filtered by the logging system

Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
@olperr1 olperr1 changed the title Extrapolation of getMinQ and getMaxQ for reactive capability curve [WIP] Extrapolation of getMinQ and getMaxQ for reactive capability curve Mar 3, 2025
@olperr1 olperr1 changed the title [WIP] Extrapolation of getMinQ and getMaxQ for reactive capability curve Extrapolation of getMinQ and getMaxQ for reactive capability curve Mar 3, 2025
@olperr1 olperr1 changed the title Extrapolation of getMinQ and getMaxQ for reactive capability curve Extrapolation of getMinQ and getMaxQ for reactive capability curves Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Approved
Development

Successfully merging this pull request may close these issues.

3 participants