Skip to content

Adding LoadZIP model component type#362

Merged
pelesh merged 14 commits intodevelopfrom
abirchfield/zip_load
Apr 8, 2026
Merged

Adding LoadZIP model component type#362
pelesh merged 14 commits intodevelopfrom
abirchfield/zip_load

Conversation

@abirchfield
Copy link
Copy Markdown
Collaborator

@abirchfield abirchfield commented Apr 6, 2026

Description

Adding new ZIP load model to phasor dynamics, motivated by the parameter estimation effort.

Proposed changes

  • Documentation of LoadZIP model definition
  • Implementation of LoadZIP model
  • Unit tests for LoadZIP model (Note: because model has no differential variables, implementation tests are not necessary. Also, Jacobian tests were not implemented as these are more complex and require an analytical Jacobian, which we do not have.)
  • Three-bus case example validated against PowerWorld.

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

None.

@abirchfield abirchfield marked this pull request as draft April 6, 2026 20:29
@abirchfield abirchfield marked this pull request as ready for review April 6, 2026 20:31
Copy link
Copy Markdown
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 think we need to decide if we are going to stick to the modeling approach we defined in the documentation or go back to more compact implementation as in zip load code.

  • The model as defined in the README file is larger (has additional 2 algebraic variables) but exposes more parallelism.
  • The model as implemented in the C++ code is more compact but requires atomic add to manage system Jacobian assembly.

It would be good to decide what modeling approach to take before merging this PR.

Comment thread GridKit/Model/PhasorDynamics/LoadZIP/LoadZIPImpl.hpp
Comment thread GridKit/Model/PhasorDynamics/LoadZIP/LoadZIPImpl.hpp
Comment thread GridKit/Model/PhasorDynamics/LoadZIP/LoadZIPImpl.hpp
@pelesh pelesh added the question Further information is requested label Apr 6, 2026
@abirchfield
Copy link
Copy Markdown
Collaborator Author

Yes, I think the doc approach with Ir and Ii being variables is good.

So far I have not been successful in implementing it. I get Enzyme issues.

@nkoukpaizan
Copy link
Copy Markdown
Collaborator

Yes, I think the doc approach with Ir and Ii being variables is good.

So far I have not been successful in implementing it. I get Enzyme issues.

What's happening is that in the documented formulation, $\frac{\partial h}{\partial w_b}$ is null. Instead, we'll need $\frac{\partial h}{\partial y}$, $\frac{\partial f}{\partial y}$ and $\frac{\partial f}{\partial w_b}$ terms.

@abirchfield abirchfield marked this pull request as draft April 8, 2026 19:32
@abirchfield abirchfield marked this pull request as draft April 8, 2026 19:32
abirchfield and others added 14 commits April 8, 2026 14:38
* Alternate Jacobian terms for ZIPLoad.

* Jacobian test for LoadZIP.

* Fix phasor_load_zip test call.

* Minor formatting.

* LoadDataZIP --> LoadZIPData in CMakeLists.

* Comment out LoadZIP df/dy for now.

* Apply pre-commmit fixes

* Guard LoadZIPTests.jacobian test with ENABLE_ENZYME.

* Expect failure for LoadZIPTests.

* LoadZIP initialization.

* Fix typo.

* Simplify ifrac expression in LoadZIP.

* Activate df/dy term in LoadZIP with a hack for null df/dy'.

* Apply pre-commmit fixes

* Set correct answer key for LoadZIP test

* Apply pre-commmit fixes

---------

Co-authored-by: nkoukpaizan <nkoukpaizan@users.noreply.github.com>
Co-authored-by: pelesh <peless@ornl.gov>
Co-authored-by: pelesh <pelesh@users.noreply.github.com>
@abirchfield abirchfield force-pushed the abirchfield/zip_load branch from 74e2035 to 44627a4 Compare April 8, 2026 19:39
@abirchfield
Copy link
Copy Markdown
Collaborator Author

Thanks all for your help!

@abirchfield abirchfield marked this pull request as ready for review April 8, 2026 19:43
@abirchfield abirchfield requested a review from pelesh April 8, 2026 19:43
Copy link
Copy Markdown
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.

All issues fixed, good to merge.

@pelesh pelesh merged commit f817d00 into develop Apr 8, 2026
6 checks passed
@abirchfield abirchfield deleted the abirchfield/zip_load branch April 8, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new model question Further information is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants