Skip to content

BUG: Renewable Controller edge case - #568

Merged
nkoukpaizan merged 4 commits into
developfrom
lukel/RE-fixes-dev
Sep 5, 2026
Merged

BUG: Renewable Controller edge case#568
nkoukpaizan merged 4 commits into
developfrom
lukel/RE-fixes-dev

Conversation

@lukelowry

Copy link
Copy Markdown
Collaborator

Description

Improves the numerical conditioning of the REGCA and REECB algebraic equations and cleans up their documentation and tests.

Proposed changes

  • Replace REGCA's implicit HVRCM constraint with an explicit smooth gain law.
  • Remove REECB's ILMAX continuation variable and compute current-circle capacity directly.
  • Update initialization and documentation to match the revised equations.
  • Replace smoothing-specific answer keys with ideal values and shared smoothing tolerances while retaining Enzyme and dependency-tracking coverage.

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.
  • Changelog changes are N/A; this is a focused cleanup of existing model implementations.

Further Comments

This was contributing to some convergence failures when a particularly low-impedance fault is applied.

@lukelowry

Copy link
Copy Markdown
Collaborator Author

I think there is an inconsistant default tolerance issue that is causing issues across platforms because the only reason I observed this issue is that the CI for #564 is failing, but works on my machine

@nkoukpaizan nkoukpaizan added the bug Something isn't working label Sep 4, 2026

@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.

A few minor comments.

Comment thread tests/UnitTests/PhasorDynamics/ControllerReecbTests.hpp Outdated
Comment thread tests/UnitTests/PhasorDynamics/ConverterRegcaTests.hpp Outdated
Comment thread tests/UnitTests/PhasorDynamics/ControllerReecbTests.hpp Outdated
lukelowry and others added 3 commits September 4, 2026 22:52
Co-authored-by: Nicholson Koukpaizan <72402802+nkoukpaizan@users.noreply.github.com>
@nkoukpaizan
nkoukpaizan merged commit e0b9d7e into develop Sep 5, 2026
6 checks passed
@lukelowry
lukelowry deleted the lukel/RE-fixes-dev branch September 5, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants