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

[FEATURE] *Provide the power system mismatch* #259

Open
SanPen opened this issue May 25, 2023 · 5 comments
Open

[FEATURE] *Provide the power system mismatch* #259

SanPen opened this issue May 25, 2023 · 5 comments
Labels
feature New feature or request

Comments

@SanPen
Copy link

SanPen commented May 25, 2023

It would be nice if the results would provide the nodal power mismatch or the norm of this.

This is the stopping criteria for Newton Raphson.

For methods that use voltage iteration similarity as criteria (i.e. Backwards-Forward) provide the power mismatch as well.

@TonyXiang8787 TonyXiang8787 moved this to Q3 2023 in Power Grid Model May 25, 2023
@TonyXiang8787 TonyXiang8787 added the feature New feature or request label Jun 3, 2023
@TonyXiang8787 TonyXiang8787 moved this to Q3 2023 in Power Grid Model Jun 27, 2023
@TonyXiang8787 TonyXiang8787 moved this from Q3 2023 to In Discussion for future planning in Power Grid Model Sep 12, 2023
@TonyXiang8787
Copy link
Member

The power flow results already include the node injection power which is calculated by network parameters. At the same time all appliances have their power values by appliance parameters.

The difference of these two is the power mismatch. I am hesitating to provide additional attributes for the mismatch. The user can easily calculate this by himself. @petersalemink95 what do you think?

@SanPen
Copy link
Author

SanPen commented Sep 30, 2024

Hi,

Maybe not the mismatch vector but the norm max(abs(mismatch)) since this is a useful value to decide if to trust the solution.

@mgovers
Copy link
Member

mgovers commented Sep 30, 2024

a potentially useful consideration here is the following:

  • for development/desktop/hobby project usages:
    • memory is generally not the bottleneck
    • the computational overhead of adding such a feature is negligible
    • adding an attribute like this should therefore be alright
  • for production environments at scale:
    • memory may be a real bottleneck.
    • for row-based data structures (the main data structure used in the PGM):
      • adding such an attribute impacts memory
      • the addition of a parameter like this is therefore discouraged (the main argument used in the above)
    • however, we are currently working on columnar data support ([FEATURE] Add support columnar data buffer to save memory usage #548)
      • this feature is already experimental and will be the main new feature in the release associated with next minor version bump.
      • production environments almost always work with columnar databases
      • because of that, they are likely to use this new feature.
      • in particular, the feature allows omitting attributes from the output that are not needed for the use case.
      • as a result, the argument used before may not affect production environments too much in the future.

@TonyXiang8787
Copy link
Member

TonyXiang8787 commented Sep 30, 2024

@mgovers even with columnar dataset we are not dealing with memory issue. The calculation itself still cost some CPU time. It might not be very much.

But indeed, with columnar dataset we are more permissive to add new attributes. That's why I keep this issue open.

@nitbharambe
Copy link
Member

Detailing the steps for finding mismatch in power after calculation. Correct me if I am wrong:

  1. Calculate power flow
  2. Scale the specified powers of loads/gens in input_data of const_impedance and const_current type by result's voltage.
  3. Aggregate all loads/gens of the input_data to node level by summing them up
  4. Subtract with result's nodal power injection and find maximum among them.

How about we provide a utility function to do this?
Or what if we have this as addition for the PGM data science toolkit?
This problem is a post calculation operation on numpy arrays. Similar might be applicable to bad data detection with chi square test feature request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
Status: No status
Development

No branches or pull requests

4 participants