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

PF outputs on diagrams #47

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

max-privato
Copy link
Contributor

This PR allows terminal active and reactive power and voltage (all p.u.) to be shown on diagrams.
This is especially useful for PowerFlow analysis since allows to have on the diagram the full picture of what it's happening. Retrieving manually all these data would require much more time.

This feature has been added to

  • Electrical.Branches.TransformerFixedRatio
  • Electrical.Branches.LineConstantImpedance
    In case this PR is accepted, maybe I could extend it to other components, with a new PR.

This feature is kept disabled by default.
It was enabled just on the examples:

  • Tutorial.GridOperation.Static.PowerFlow
  • Tutorial.IslandOperation.PowerFlow.
    This PR has been checked successfully with Dymola. WIth OpenModelica it does not work yet, but the support of the DynamicSelect technology, used in this PR, is being added to OM as well.

@adriguir
Copy link
Member

Thank you for this contribution too.
Again, it seems a very valuable feature in my opinion.

But also again ;), a few remarks/comments for discussions:

  1. Would it make sense for you to have a global parameter instead of local ones (like a global showPF parameter)? In my opinion, that would but a second opinion is always welcome but perhaps on large networks, it will be far too much. In case yes, I was wondering if this is dooable: I think so.
  2. Regarding the values to plot, I was also hesitating between p.u. or not p.u.. Maybe being able to show both will make sense.
  3. Finally, should the number of digits be a parameter too?

@casella any opinion on this?

@max-privato
Copy link
Contributor Author

Thank you for this contribution too. Again, it seems a very valuable feature in my opinion.

But also again ;), a few remarks/comments for discussions:

  1. Would it make sense for you to have a global parameter instead of local ones (like a global showPF parameter)? In my opinion, that would but a second opinion is always welcome but perhaps on large networks, it will be far too much. In case yes, I was wondering if this is dooable: I think so.
  2. Regarding the values to plot, I was also hesitating between p.u. or not p.u.. Maybe being able to show both will make sense.
  3. Finally, should the number of digits be a parameter too?

@casella any opinion on this?

I now realise that the solution I enclosed in the PR, although optimal for what I was doing when I conceived it, is not the best one for the general public, and I should probably withdraw it.

I first add some comments on your points:

1: global/local: good point, in case the idea is accepted it would be good to have both; having just local is a minimal starting point

2: this is one most important point. Now I think it would be better to have powers in MW and voltages in kV. In fact, the values now shown are those given by PowerGrids, and therefore are each in pu of their respective component base. In a general diagram, they should preferably be in one base. Since PowerGrids is not designed to consider a unique pu base for the whole system, this one reference for PF numbers must necessarily be the S.I.

3: I chose 3 digits because I think IS the best compromise between precision and space occupation. If one needs larger precision, they can directly look at the numerical values, as they do now. A variable number of digits could easily overcome parts of diagrams. However, obviously making this precision customizable is a plus that doesn't harm. I propose 3 as the default number of digits

There are other reasons for which my intention is to close this PR and possibly open a different one, with enhancements:

a) the sign of powers. How the signs are "well done" since they follow the general convention of MSL: positive when entering the component to which a terminal belongs. But later I've seen the way OpenIpsl does: the numbers are always positive, but below them small arrows with the actual directions are shown. This is more immediate to understand and occupy a reasonably small space: @casella, @adriguir, what do you think?

b) voltages. I know that we can connect components to each other without interposing buses; however, the use of buses is somewhat the PowerGrids standard. Starting from this, we could add voltages to buses and drop them from terminals of lines and transformers. Again, this is the solution adopted by OpenIpsl, and I like it. BTW this allows the voltage angles to be displayed as well.

My bottom line is that for PF it is really mandatory to have a graphical display of numbers. Otherwise looking at the from the numerical output is a nightmare: typically I printed the diagram and put by hand the numbers on paper... just before realising that I wanted a different case to be simulated, and therefore had to start everything again!.

As the solution for PowerGrids, I propose to:

  • use MW/kV
  • use voltages (and their angles) only on busses and not on line and transformer terminals
  • possibly use arrows and absolute values for powers, in stead of powers with sign.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants