Skip to content

REGCA Implementation#415

Open
lukelowry wants to merge 16 commits into
developfrom
lukel/regca-impl
Open

REGCA Implementation#415
lukelowry wants to merge 16 commits into
developfrom
lukel/regca-impl

Conversation

@lukelowry

@lukelowry lukelowry commented May 26, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds the REGCA renewable generator/converter model to PhasorDynamics, including system-model JSON parsing, signal wiring for optional current-command inputs, monitor support, and Enzyme/dependency-tracking Jacobian coverage.

Proposed changes

  • Add Converter/REGCA model, data type, CMake
  • Wire Regca into ComponentLibrary, SystemModelData, SystemModel, and JSON parsing.
  • Add REGCA unit tests for construction, validation, initialization, residuals, bus injection, JSON/system assembly, and Jac consistency

Checklist

  • All tests pass.
  • Code compiles cleanly with flags -Wall -Wpedantic -Wconversion -Wextra.
  • The new code follows GridKit™ style guidelines.
  • There are unit tests for the new code.
  • The new code is documented.
  • The feature branch is rebased with respect to the target branch.
  • I have updated CHANGELOG.md to reflect the changes in this PR.

Further comments

Won't add this to any examples until I have REECA since they go together in all cases we have in PowerWorld

@pelesh
pelesh self-requested a review May 27, 2026 13:29

@pelesh pelesh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Blocking this PR until Jacobian implementation in PhasorDynamics is refactored to eliminate deprecated Matrix_COO object.

@lukelowry
lukelowry force-pushed the lukel/regca-impl branch 2 times, most recently from b81d2a6 to 78d4d41 Compare May 28, 2026 19:46
@lukelowry lukelowry added this to the WECC Completion milestone Jun 1, 2026
@lukelowry
lukelowry force-pushed the lukel/regca-impl branch 6 times, most recently from 03b329f to f4d4e70 Compare June 6, 2026 04:15
@lukelowry
lukelowry force-pushed the lukel/regca-impl branch 4 times, most recently from ada69bc to 89aac1e Compare June 10, 2026 19:52
@lukelowry lukelowry mentioned this pull request Jun 23, 2026
7 tasks
@lukelowry
lukelowry force-pushed the lukel/regca-impl branch 4 times, most recently from 29e4c35 to 9b5681f Compare June 26, 2026 00:27
@lukelowry

Copy link
Copy Markdown
Collaborator Author

This has been rebased and cleaned for consistancy

@lukelowry
lukelowry force-pushed the lukel/regca-impl branch 2 times, most recently from 77f83d1 to f2b5872 Compare June 26, 2026 13:18
@lukelowry
lukelowry force-pushed the lukel/regca-impl branch 4 times, most recently from 098b762 to 900594d Compare July 17, 2026 21:58
@lukelowry
lukelowry force-pushed the lukel/regca-impl branch 2 times, most recently from 1497e8d to b4afc84 Compare July 22, 2026 14:59

@nkoukpaizan nkoukpaizan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think the implementation needs some cleanup, particularly the verification of parameters and related branching. More specific comments below.

Comment thread GridKit/Model/PhasorDynamics/Converter/REGCA/README.md
Comment thread tests/UnitTests/PhasorDynamics/ConverterRegcaTests.hpp Outdated
Comment thread tests/UnitTests/PhasorDynamics/ConverterRegcaTests.hpp Outdated
Comment thread tests/UnitTests/PhasorDynamics/ConverterRegcaTests.hpp Outdated
Comment thread tests/UnitTests/PhasorDynamics/ConverterRegcaTests.hpp Outdated
Comment thread tests/UnitTests/PhasorDynamics/ConverterRegcaTests.hpp Outdated
Comment thread GridKit/CommonMath.hpp
Comment thread GridKit/Model/PhasorDynamics/Converter/REGCA/RegcaImpl.hpp
Comment thread GridKit/Model/PhasorDynamics/Converter/REGCA/RegcaImpl.hpp Outdated
Comment thread GridKit/Model/PhasorDynamics/Converter/REGCA/RegcaImpl.hpp Outdated
@lukelowry

Copy link
Copy Markdown
Collaborator Author

@nkoukpaizan Thank you so much for the detailed review!! I will address all concerns, and once I am done, I will make sure the other models are consistent with this one since it's the first new model in a while.

Very very appreciated. do not hold back on critiques I want all the new models consistent

@lukelowry

Copy link
Copy Markdown
Collaborator Author

@nkoukpaizan okay I spent a while cleaning this up so I can align the others with this style. the tests are much better.

I think we need some more Testing helpers/fixtures because this model and REECB are so large that changing the code is very burdensome

@lukelowry
lukelowry requested a review from nkoukpaizan July 27, 2026 06:01
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