Skip to content

add icd to ybus build#298

Open
m-bossart wants to merge 9 commits into
mainfrom
mb/icd
Open

add icd to ybus build#298
m-bossart wants to merge 9 commits into
mainfrom
mb/icd

Conversation

@m-bossart

@m-bossart m-bossart commented May 7, 2026

Copy link
Copy Markdown
Contributor

@m-bossart

Copy link
Copy Markdown
Contributor Author

The tolerance seems too high I need to make sure the tests are correct before review

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

Performance Results

Precompile Time

Main This Branch Delta
2.1 s 2.1 s +2.5%

Execution Time

Cells show median (min–max) over 5 samples; delta compares medians.

Test Main This Branch Delta
matpower_ACTIVSg2000_sys-Build Ybus 9.5 (9.3–11.4) ms 9.2 (9.0–17.3) ms -2.8%
matpower_ACTIVSg2000_sys-Build PTDF 75.6 (74.4–78.0) ms 74.1 (73.3–74.7) ms -2.0%
matpower_ACTIVSg2000_sys-Build LODF 140.4 (136.6–141.5) ms 136.0 (135.7–137.5) ms -3.1%
matpower_ACTIVSg2000_sys-Build VirtualMODF 90.4 (88.9–90.8) ms 918.5 (912.1–921.2) ms +916.5%
matpower_ACTIVSg2000_sys-VirtualMODF Query 10 rows 0.6 (0.5–1.4) ms 0.6 (0.5–1.5) ms +1.5%
matpower_ACTIVSg2000_sys-Radial network reduction 0.7 (0.7–0.8) ms 0.7 (0.7–0.9) ms +4.3%
matpower_ACTIVSg2000_sys-Degree two network reduction FAILED FAILED N/A
Base_Eastern_Interconnect_515GW-Build Ybus 524.3 (518.8–527.7) ms 492.9 (486.1–506.5) ms -6.0%
Base_Eastern_Interconnect_515GW-Build VirtualPTDF 767.8 (764.1–769.4) ms 729.8 (723.9–733.3) ms -5.0%
Base_Eastern_Interconnect_515GW-VirtualPTDF Query 10 rows 24.8 (24.2–25.3) ms 24.7 (23.9–24.8) ms -0.5%
Base_Eastern_Interconnect_515GW-Build VirtualMODF 775.3 (772.4–778.6) ms 802.5 (797.5–807.7) ms +3.5%
Base_Eastern_Interconnect_515GW-VirtualMODF Query 10 rows 29.3 (29.0–29.6) ms 30.9 (30.2–32.0) ms +5.4%
Base_Eastern_Interconnect_515GW-Radial network reduction 36.2 (35.8–38.0) ms 37.3 (36.2–38.8) ms +3.1%
Base_Eastern_Interconnect_515GW-Degree two network reduction FAILED FAILED N/A

@m-bossart m-bossart marked this pull request as ready for review May 12, 2026 19:40
@m-bossart m-bossart requested a review from jd-lara May 12, 2026 19:40
@m-bossart

Copy link
Copy Markdown
Contributor Author

@jd-lara the tests are passing locally for me with main of PowerSystemCaseBuilder. This is ready for review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for applying PSS/E Impedance Correction Data (ICD/ICT) when constructing the AC Ybus, and updates the PSS/E regression tests + fixtures to validate the corrected transformer admittances (including off-nominal cases).

Changes:

  • Compute ICD correction factors from PSY.ImpedanceCorrectionData curves and apply them by scaling transformer series impedance during Ybus assembly.
  • Precompute a per-transformer correction map and thread the correction factor through branch iteration into _ybus!/ybus_branch_entries.
  • Update existing PSS/E Ybus comparisons to use Float32-relative tolerances and add two new PSS/E fixture matrices for ICD-enabled/disabled modified 14-bus cases.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/Ybus.jl Adds ICD curve interpolation + correction-factor plumbing into transformer Ybus contributions, plus new tests-facing assembly paths (currently with a broken adj plumbing that needs fixes).
src/YbusACBranches.jl Introduces ICDCorrectionMap and extends branch iteration to supply a per-branch correction factor.
test/test_ybus_psse.jl Tightens numeric comparisons to Float32-relative tolerances and adds new testsets covering off-nominal and nominal ICD cases.
test/test_data/modified_14bus_system_off_nominal_icd_ymatrix.txt New PSS/E Y-matrix fixture for the off-nominal ICD case.
test/test_data/modified_14bus_system_no_icd.txt New PSS/E Y-matrix fixture for the nominal/no-ICD case.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Ybus.jl
Comment thread src/Ybus.jl
Comment thread src/Ybus.jl Outdated
Comment thread src/Ybus.jl
Comment thread src/Ybus.jl
Comment on lines 976 to +980
tb,
ix,
network_reduction_data,
adj,
c1,
Comment thread src/Ybus.jl
@m-bossart

Copy link
Copy Markdown
Contributor Author

@jd-lara this is ready for review. The tests pass locally with PowerSystemCaseBuilder#main which has the new test system but is not yet released.

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.

3 participants