Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@
- Added full support for sparse Jacobians obtained with Enzyme in PhasorDynamics.
- Added `Node` class to the PowerElectronics module to separate nodes from circuit components.
- Refactored Jacobian assembly in `PowerElectronics` module to reuse the CSR pattern.
- Refactored Jacobian assembly in `PhasorDyanmcics` module to reuse the CSR pattern.
- Refactored Jacobian assembly in `PhasorDynamics` module to reuse the CSR pattern.
- Removed `COO_Matrix` class use in `PowerElectronics` module.
- Added phasor dynamics application to generalize examples
- Added LoadZIP model component type.
- Added component model developer checklist to a README file.
- Added IEEEST Stabilizer Model
- Added SEXS-PTI Exciter Model
- Added 200 Bus Synthetic Illinois Case

## v0.1

Expand Down
5 changes: 3 additions & 2 deletions GridKit/Model/PhasorDynamics/Exciter/SEXS-PTI/SexsPtiImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,9 @@ namespace GridKit
ScalarT Ec = std::sqrt(wb[0] * wb[0] + wb[1] * wb[1]);
ScalarT vs = ws[0];

ScalarT func = (-efd + (K_ / Tb_) * (-vr + Ta_ * vtr)) / Te_;
ScalarT efd_ind = Math::indicator(Efdmin_, Efdmax_, efd, func);
ScalarT func = (-efd + (K_ / Tb_) * (-vr + Ta_ * vtr)) / Te_;
ScalarT func_normalized = func / static_cast<RealT>(100.0); // TODO arbitrary conditioning; see IEEET1
ScalarT efd_ind = Math::indicator(Efdmin_, Efdmax_, efd, func_normalized);

f[0] = -vr_dot + (-vr + Ta_ * vtr) / Tb_ - vtr;
f[1] = -efd_dot + efd_ind * func;
Expand Down
2 changes: 2 additions & 0 deletions GridKit/Model/PhasorDynamics/Stabilizer/IEEEST/Ieeest.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ namespace GridKit
RealT a4_{0};

// Precomputed masks and safe inverse coefficients for branch-free degenerate paths.
RealT use_notch_{0};
RealT bypass_notch_{1};
RealT use_4th_order_{0};
RealT use_3rd_order_{0};
RealT use_2nd_order_{0};
Expand Down
9 changes: 6 additions & 3 deletions GridKit/Model/PhasorDynamics/Stabilizer/IEEEST/IeeestImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ namespace GridKit
a4_ = A2_ * A4_;

// Precompute masks and safe inverse coefficients so the residual stays branch-free.
use_notch_ = static_cast<RealT>(a2_ != 0.0 || a3_ != 0.0 || a4_ != 0.0);
bypass_notch_ = 1.0 - use_notch_;

use_4th_order_ = static_cast<RealT>(a4_ != 0.0);
use_3rd_order_ = static_cast<RealT>(a4_ == 0.0 && a3_ != 0.0);
use_2nd_order_ = static_cast<RealT>(a4_ == 0.0 && a3_ == 0.0 && a2_ != 0.0);
Expand Down Expand Up @@ -218,7 +221,7 @@ namespace GridKit
}
}

if (a4_ == 0 && a3_ == 0 && a2_ == 0)
if (a4_ == 0 && a3_ == 0 && a2_ == 0 && a1_ != 0)
{
Log::error() << "Ieeest: a2, a3, and a4 are all zero - no valid notch filter\n";
ret += 1;
Expand Down Expand Up @@ -292,7 +295,7 @@ namespace GridKit
ScalarT u = ws[0];
ScalarT vct = ws[1];

f[0] = -x1_dot + x2;
f[0] = -x1_dot + use_notch_ * x2;
f[1] = -x2_dot + (use_4th_order_ + use_3rd_order_) * x3
+ use_2nd_order_ * (-a0_ * x1 - a1_ * x2 + u) * safe_inv_a2_;
f[2] = -x3_dot + use_4th_order_ * x4
Expand All @@ -303,7 +306,7 @@ namespace GridKit
f[5] = -x6_dot + use_T4_block_ * (v5 - x6) * safe_inv_T4_;
f[6] = -x7_dot + use_T6_block_ * (v6 - x7) * safe_inv_T6_;

f[7] = -v4 + x1 + A5_ * x2 + (use_4th_order_ + use_3rd_order_) * A6_ * x3;
f[7] = -v4 + bypass_notch_ * u + use_notch_ * (x1 + A5_ * x2 + (use_4th_order_ + use_3rd_order_) * A6_ * x3);
f[8] = -v5 + bypass_T2_block_ * v4 + use_T2_block_ * (x5 + T1_ * (v4 - x5) * safe_inv_T2_);
f[9] = -v6 + bypass_T4_block_ * v5 + use_T4_block_ * (x6 + T3_ * (v5 - x6) * safe_inv_T4_);
f[10] = -v7 + bypass_T6_block_ * Ks_ * v6 + use_T6_block_ * Ks_ * T5_ * (v6 - x7) * safe_inv_T6_;
Expand Down
2 changes: 2 additions & 0 deletions examples/PhasorDynamics/Large/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
add_subdirectory(Texas)
add_subdirectory(WECC)
add_subdirectory(Illinois)
6 changes: 6 additions & 0 deletions examples/PhasorDynamics/Large/Illinois/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
gridkit_example_add_file(illinois.json)
gridkit_example_add_file(illinois.solver.json)

add_test(NAME illinois_pdsim
COMMAND PDSim illinois.solver.json
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
46 changes: 46 additions & 0 deletions examples/PhasorDynamics/Large/Illinois/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Synthetic Illinois (ACTIVSg200)

## One-Line Diagram

<div align="center">
<img align="center" src="illinois.png">

Figure 1: Oneline of the ACTIVSg200 Case, from Texas A&M University [Grid Repository](https://electricgrids.engr.tamu.edu/electric-grid-test-cases/activsg200/) (Updated Oneline WIP)
</div>

## Case Description

Geographically located in the state of Illinois, the ACTIVSg200 case is a 200 bus power system test case that is entirely synthetic, built from public information and a statistical analysis of real power systems. It bears no relation to the actual grid in this location, except that generation and load profiles are similar. The dynamics of this case are fully modled in GridKit.

Model | Count
---|---
[Bus](../../../../GridKit/Model/PhasorDynamics/Bus/README.md) | 200
[Branch](../../../../GridKit/Model/PhasorDynamics/Branch/README.md) | 246
[GENROU](../../../../GridKit/Model/PhasorDynamics/SynchronousMachine/GENROUwS/README.md) | 40
[TGOV1](../../../../GridKit/Model/PhasorDynamics/Governor/Tgov1/README.md) | 40
[SEXS-PTI](../../../../GridKit/Model/PhasorDynamics/Exciter/SEXS-PTI/README.md) | 40
[LoadZIP](../../../../GridKit/Model/PhasorDynamics/LoadZIP/README.md) | 164
[SignalNode](../../../../GridKit/Model/PhasorDynamics/SignalNode/) | 120


## Data Notes

The reference case from the `.pwb` file had a missing machien model at `Bus 197 GIBSON CITY 1 2`, so I inserted a `GENROU` machine model. The case will not initialize in steady state without it, and its best not to add a negative impedance load.

## Events

The following event types are provided for this case.

- Bus fault


## Outstanding

### Dynamics

None.

### Statics

- Transformers
- Switched Shunts
Loading
Loading