Skip to content

Minimal corrections to Phasor Dynamics models for validation - #538

Merged
pelesh merged 11 commits into
developfrom
lukel/bug-fix-dev
Aug 20, 2026
Merged

Minimal corrections to Phasor Dynamics models for validation#538
pelesh merged 11 commits into
developfrom
lukel/bug-fix-dev

Conversation

@lukelowry

Copy link
Copy Markdown
Collaborator

Description

Validated against PowerWorld. Less than 0.5% relative error on WECC 240 case, ACTIVSg200 case, and ACTIVSg500 case.

Further comments

Other open-source grid modeling frameworks do not even come close to this low a validation error against their validation tools, especially not for cases this large. I don't want perfect to be the enemy of good + we can do cleanup more confidently after merging #461.

@nkoukpaizan

Copy link
Copy Markdown
Collaborator

Is this meant to supersede #525 ?

@lukelowry

Copy link
Copy Markdown
Collaborator Author

Is this meant to supersede #525 ?

Yes, I forgot to mention that

@nkoukpaizan nkoukpaizan changed the title Minimal corrections Minimal corrections to Phasor Dynamics models for validation Aug 13, 2026
@nkoukpaizan nkoukpaizan added this to the Release 0.2 milestone Aug 13, 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 comments. Otherwise looks good!

Comment thread GridKit/Model/PhasorDynamics/Exciter/ESDC1A/Esdc1aImpl.hpp Outdated
Comment thread GridKit/Model/PhasorDynamics/Exciter/ESDC1A/README.md Outdated
Comment thread GridKit/Model/PhasorDynamics/Governor/Tgov1/README.md Outdated
Comment thread GridKit/Model/PhasorDynamics/Exciter/IEEET1/Ieeet1Impl.hpp

@abirchfield abirchfield 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 good compromise that addresses the issues raised in #525 while allowing us to have excellent validation in the short term. Exciting that we are almost ready to complete the 10k case.

@lukelowry

Copy link
Copy Markdown
Collaborator Author

added specification information and warnings everywhere $K_E^{eff}$ and $K_E$ is mentioned. should be ready!

@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 recommend setting Ke_eff_ uniformly in setDerivedParameters and moving the warnings there (instead of in initialize).

Comment thread GridKit/Model/PhasorDynamics/Exciter/ESDC1A/Esdc1aImpl.hpp Outdated
Comment thread GridKit/Model/PhasorDynamics/Exciter/IEEET1/Ieeet1Impl.hpp Outdated
Comment thread GridKit/Model/PhasorDynamics/Exciter/ESDC1A/Esdc1aImpl.hpp Outdated
@lukelowry

Copy link
Copy Markdown
Collaborator Author

@pelesh @nkoukpaizan Let me know if you think this is ready! Good on my end

Comment thread GridKit/Model/PhasorDynamics/Governor/Tgov1/Tgov1Impl.hpp Outdated
@nkoukpaizan

nkoukpaizan commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

@pelesh @nkoukpaizan Let me know if you think this is ready! Good on my end

Fine by me... I can always find something to nitpick, but I'll stop there. I'll let @pelesh have the last word.

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

All major issues we discussed were addressed and all tests pass.

There is a couple of nitpicking issues that would be good to address before we merge.

Comment thread GridKit/Model/PhasorDynamics/Governor/Tgov1/Tgov1Impl.hpp Outdated
Comment thread GridKit/Model/PhasorDynamics/Exciter/IEEET1/Ieeet1Impl.hpp
Comment on lines 149 to 156
auto check = [&](bool condition, const char* message)
{
if (!condition)
{
Log::error() << "Esdc1a: " << message << '\n';
ret += 1;
}
};

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.

this wasn't added in this pull request, but as i have said in #460, this should 1) not increment an error count---this is a bad pattern and 2) should be a common utility function, not something we define in each case it is used. this comment applies to all instances of this closure, not just this one instance

Comment thread GridKit/Model/PhasorDynamics/Governor/Tgov1/Tgov1Impl.hpp
@pelesh
pelesh merged commit 9d6a621 into develop Aug 20, 2026
6 checks passed
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.

5 participants