Skip to content

IEEEST Stabilizer Improvements/Corrections#460

Open
lukelowry wants to merge 4 commits into
developfrom
lukel/ieeest-dev
Open

IEEEST Stabilizer Improvements/Corrections#460
lukelowry wants to merge 4 commits into
developfrom
lukel/ieeest-dev

Conversation

@lukelowry

@lukelowry lukelowry commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Description

Fixes and cleans up the IEEEST stabilizer implementation and documentation.

This updates the older initial implementation style so that reduced-order notch filters and zero denominator time constants are handled consistently

Proposed changes

  • Replace the branchy/safe-inverse notch logic with a fixed DAE form using differential tags.
  • Initialize IEEEST from the attached input signal instead of forcing all states to zero.
  • Document the implemented equations, initialization, derived parameters, and unsupported compatibility parameters.
  • Tests for initialization, residuals, invalid wiring, invalid notch parameters, zero time constants, and Jacobian consistency.

Checklist

  • All tests pass for the focused PhasorDynamics coverage.
  • 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 N/A

Further comments

This is cleanup/correction work for the existing IEEEST model, not a new model

@lukelowry lukelowry marked this pull request as ready for review June 22, 2026 18:43
@lukelowry

Copy link
Copy Markdown
Collaborator Author

@pelesh this fix is also ready to be merged I forgot to make a PR for this one.

@lukelowry lukelowry mentioned this pull request Jun 23, 2026
7 tasks

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

The logic governing changing differential into algebraic equations and vice versa does not seem to be sustainable. This requires more offline discussion.

Comment thread GridKit/Model/PhasorDynamics/Stabilizer/IEEEST/IeeestImpl.hpp Outdated
Comment on lines +326 to +328
f[8] = tag_[4] * (-T2_ * (v5 - x5) + T1_ * (v4 - x5)) + (1 - tag_[4]) * (v4 - v5);
f[9] = tag_[5] * (-T4_ * (v6 - x6) + T3_ * (v5 - x6)) + (1 - tag_[5]) * (v5 - v6);
f[10] = tag_[6] * (-T6_ * v7 + Ks_ * T5_ * (v6 - x7)) + (1 - tag_[6]) * (Ks_ * v6 - v7);

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 am not sure if this is a good idea. We are changing equations based on whether we defined other equations to be differential or algebraic. Furthermore, we rely here on implicit bool-to-integer and integer-to-floating point conversions. This logic needs to be implemented in a different way.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I am not sure how to implement this without introducing template-y solutions. Do we want to move toward something like this where we define the model conditionally?

template <class ScalarT, typename IdxT, Order order, Block t2, Block t4, Block t6>

But there are 31 different permutations, so there would be a lot of duplicate code. I don't know what the general approach should be, so I am open to any suggestions.

Comment on lines +252 to +258
tag_[0] = (a2_ != ZERO<RealT> || a3_ != ZERO<RealT> || a4_ != ZERO<RealT>);
tag_[1] = tag_[0];
tag_[2] = (a3_ != ZERO<RealT> || a4_ != ZERO<RealT>);
tag_[3] = (a4_ != ZERO<RealT>);
tag_[4] = (T2_ != ZERO<RealT>);
tag_[5] = (T4_ != ZERO<RealT>);
tag_[6] = (T6_ != ZERO<RealT>);

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.

The logic implemented this way will break when we add solvers that require DAEs implemented in Hessenberg form.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Opened an issue #463 where hopefully we can discuss the general approach to take since this impacts almost every model

@lukelowry lukelowry force-pushed the lukel/ieeest-dev branch 2 times, most recently from 8bbbad6 to 090289b Compare June 26, 2026 11:02
@lukelowry

Copy link
Copy Markdown
Collaborator Author

I have rebased and adjusted the formulation to align with #463 .

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.

2 participants