Skip to content

Machine MVA Bases#286

Merged
pelesh merged 7 commits intodevelopfrom
lukel/mva_base_dev
Oct 29, 2025
Merged

Machine MVA Bases#286
pelesh merged 7 commits intodevelopfrom
lukel/mva_base_dev

Conversation

@lukelowry
Copy link
Collaborator

@lukelowry lukelowry commented Oct 23, 2025

Description

Add support for machine models to have a different MVA base than the system.

Proposed changes

  • Add mva_base parameter to GenClassical and Genrou
  • Remove va_base and freq_base from the general Component class (every model handles this differently, and it could actually be misleading to offer this as an option for models like exciter and governor)
  • Default mva_base is 100 MVA.
  • Updated the respective INPUT_FORMAT specifications

Checklist

  • All tests pass.
  • Code compiles cleanly with flags -Wall -Wpedantic -Wconversion -Wextra.
  • The new code follows GridKit™ style guidelines.
  • The new code is documented.
  • The feature branch is rebased with respect to the target branch.

Further comments

This is a minor fix and does not need to be included as a change feature.

@lukelowry lukelowry requested a review from abirchfield October 23, 2025 19:17
@lukelowry lukelowry marked this pull request as ready for review October 23, 2025 20:43
@lukelowry lukelowry requested a review from pelesh October 23, 2025 20:43
Copy link
Collaborator

@abirchfield abirchfield left a comment

Choose a reason for hiding this comment

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

Looks good. This will be needed for the larger case models.

Copy link
Collaborator

@pelesh pelesh left a comment

Choose a reason for hiding this comment

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

I guess I don't understand the intent of this PR. In my view it would make more sense to have mva_base_system_ and mva_base_local_ parameters and then convert units at the component-system interface.

Magic numbers are an error prone way to go about this.

@abirchfield
Copy link
Collaborator

I guess I don't understand the intent of this PR. In my view it would make more sense to have mva_base_system_ and mva_base_local_ parameters and then convert units at the component-system interface.

Magic numbers are an error prone way to go about this.

The intent of the PR is to implement a feature of generators (different MVA bases from the system base) that will be necessary for medium and large cases.

Yes, I think that ideally we should have a system-wide parameter mva_base_system_ instead of using the literal 100 MVA (even though for all the cases we will consider in this project we will use a 100 MVA system base).

@lukelowry is that a change we can make easily? I guess I'm wondering whether the component has access to system parameters.

@lukelowry
Copy link
Collaborator Author

lukelowry commented Oct 29, 2025

@abirchfield @pelesh

I have added a private variable mva_system_base_ to Genrou and GenClassical to remove use of magic numbers. Ideally, we should pass the system MVA base to these models, but it is unclear how to do so, and this PR blocks our ability to validate the Hawaii case.

To clarify, this PR allows us to correctly implement larger cases (such as Hawaii), as the MVA bases for each generator differ in those cases. However, there is no general procedure to do base conversions, as each model/device may implement bases differently. An MVA base does not make sense for some models. This PR allows us to begin testing the Hawaii (& larger cases) against simulated transients from external tools (Power World)

@pelesh
Copy link
Collaborator

pelesh commented Oct 29, 2025

I have added a private variable mva_system_base_ to Genrou and GenClassical to remove use of magic numbers. Ideally, we should pass the system MVA base to these models, but it is unclear how to do so, and this PR blocks our ability to validate the Hawaii case.

There is system setting for MVA base specified in the JSON input file format. This should be used to set the system MVA. Perhaps the best way to go about it is to have the system MVA as the member variable of the SystemModel and then let each component model read that value from the system model during composition.

@abirchfield
Copy link
Collaborator

I have added a private variable mva_system_base_ to Genrou and GenClassical to remove use of magic numbers. Ideally, we should pass the system MVA base to these models, but it is unclear how to do so, and this PR blocks our ability to validate the Hawaii case.

There is system setting for MVA base specified in the JSON input file format. This should be used to set the system MVA. Perhaps the best way to go about it is to have the system MVA as the member variable of the SystemModel and then let each component model read that value from the system model during composition.

Prior to this PR, the system MVA base and any component MVA bases in the JSON input file are ignored. Effectively we assume the MVA base is 100 MVA everywhere.

The purpose of this PR is to implement component-level MVA bases other than 100 MVA for GenClassical and GENROU, which we need for the next round of models.

I do think a good future task would be to update both the parser and system composer to pass system MVA base into the component model, to allow hypothetical future cases with system MVA base other than 100 MVA. If it is simple we could go ahead and do it, but I think this could be an involved task as it would require changes to the core of the parser and system composer.

For now, would it make sense to move forward with this PR with the current scope and create an issue for system MVA base to be addressed later?

@pelesh
Copy link
Collaborator

pelesh commented Oct 29, 2025

For now, would it make sense to move forward with this PR with the current scope and create an issue for system MVA base to be addressed later?

In that case, I suggest to move mva_system_base_ to the component base class, hardwire it to 100.0 and put a screaming comment that this is just a temporary solution. That would require minimal changes to the code in this branch and would have mva_system_base_ set in only one place (where we can set it up correctly from the input file at a later time).

@lukelowry
Copy link
Collaborator Author

lukelowry commented Oct 29, 2025

Moved to Component class, comment warnings added, #296 created to track the issue, and rebased branch @pelesh

Copy link
Collaborator

@pelesh pelesh left a comment

Choose a reason for hiding this comment

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

Great!

@pelesh pelesh merged commit 87eb020 into develop Oct 29, 2025
6 checks passed
@lukelowry lukelowry deleted the lukel/mva_base_dev branch October 29, 2025 23:57
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.

3 participants