IBR-FaultScreen
Fault-scenario screening for grids with inverter-based resources (solar, wind, battery storage).
IBR-FaultScreen simulates many three-phase fault scenarios, labels each one RISKY or OK by failure mode (rotor-angle instability, slow voltage recovery, IBR ride-through exposure under NERC PRC-029, frequency), and trains a classifier that ranks new scenarios so engineers know which contingencies to study in detail first. Every RISKY result shown to a user is verified by simulation. An equal-area view shows why the synchronous machines stay in step, or do not.
5,000 simulated faults on the IEEE 39-bus system: press Play and the share of RISKY faults grows from 16% with no IBRs to 52% with four. Open the interactive demo.
Screening only. It prioritizes detailed studies; it does not replace an interconnection study. RMS positive-sequence simulation (ANDES), generic WECC IBR models, balanced faults.
Version 0.3.1. Author: Shaibu Ibrahim, P.E. License: GPL-3.0-or-later.
Try it
- Build your own grid, in your browser, nothing to install: pick which generators become IBRs, where the fault is and how fast it clears, and see the result at once. All 37,120 combinations were simulated in advance. Every case has its own link to share, for example IBRs on generators 8 and 9, fault at bus 16, 6 cycles.
- Quiz: guess first: RISKY or OK? Ten real cases, scored against you and the screening model.
- Interactive dashboard: the 5,000-scenario dataset with filters, a zoomable network map, failure modes, ride-through exposure by band and bus, the machine-learning (ML) screening model, trajectories you can replay, and the equal-area view. Works on a phone. The printable report has the same results as one document.
- Run real simulations in Google Colab, free, nothing to install: example faults, the interactive report, your own fault bus, clearing time and IBRs with sliders, two-scenario comparison, a clearing-time sweep and a critical clearing time. Needs a Google account.
- On your computer:
pip install ibr-faultscreen, thenibr-faultscreen example. It runs five scenarios in about a minute and opens the same kind of report (and writes a dashboard).
Each scenario plays out when selected: here post-fault overvoltage at IBR buses, rotor-angle instability, and a bolted fault the solver could not settle (shown honestly).
Build your own grid: every fault bus is colored by its simulated result for the IBRs and clearing time you pick; tap a bus for the reason and the screening model's view.
Equal-area view
For each scenario the synchronous machines are reduced to one equivalent machine (the group
that swings ahead against the rest, built from the simulated trajectories) and the energy it
gains while the fault is on (orange) is compared with the energy it gives back after clearing
(blue). If they balance, the swing stops; if not, the machines lose step. On the textbook
single-machine case it matches the hand calculation within 1% (docs/verification.md §3). IBRs
have no rotor, so they are not machines in this view: they change it through the network, by
removing the inertia of the machines they replace and by the current they inject. It covers
rotor-angle stability only. ibr-faultscreen cct shows it just below and just above the
critical clearing time.
What it found on the IEEE 39-bus test system
From the 5,000-scenario demo dataset (generic IBR parameters, illustrative limits; the data
card and model card are in the demo). The
dataset is archived on Zenodo: doi.org/10.5281/zenodo.23290449.
Version 0.2.0 regenerated it after fixing how unsolvable bolted faults are detected (see
CHANGELOG.md); the numbers below are from the corrected dataset, published as version 2.0 of
the same Zenodo record (the DOI above always opens the latest version) together with the
37,120-scenario explorer dataset.
- Risk grows with IBR share. 16% of faults were RISKY with no IBRs, 31% with one, 52% with four.
- Ride-through exposure came from overvoltage, not undervoltage. 898 scenarios had PRC-029 exposure (689 bolted runs plus 209 confirmed through the milder fault), all but two from overvoltage: the IBR high-side voltage stayed above 1.1 pu after the fault cleared, or went briefly above 1.2 pu. This depends strongly on the generic IBR parameters.
- The learned model ranks better than a simple rule (clearing time and lowest SCR), tested only on fault buses it never saw: AUC 0.86 vs. 0.78, average precision 0.67 vs. 0.52.
| Share of RISKY scenarios caught (recall) | Gradient boosting sends to simulation | Simple rule sends to simulation |
|---|---|---|
| 90% | 52% | 56% |
| 95% | 60% | 62% |
| 99% | 74% | 82% |
The gain over the rule is largest when almost nothing may be missed. screen also always
simulates fault buses where the solver often fails; with that, it caught 96% of RISKY and 93% of
unsolvable scenarios while simulating 68% of all scenarios. On the 37,120 explorer cases
(base load, scored by models trained without the fault bus; the solver-hard bus list comes from
the whole training dataset) the same policy caught 97.5% of RISKY and 95% of unknown-outcome
cases while simulating 72%. These numbers are for one test system with
generic models: retrain on your own network before relying on them.
How it works
flowchart LR
A[Case: IEEE 39-bus<br/>or PSS/E .raw + .dyr] --> B[Scenarios<br/>IBRs, load, fault, clearing time]
B --> C[ANDES simulation]
C --> D[Labels<br/>angle, voltage recovery,<br/>PRC-029 ride-through, frequency]
B --> E[Pre-fault features<br/>SCR, distance, inertia]
D --> F[(Labeled dataset)]
E --> F
F --> G[Classifier<br/>evaluated on unseen fault locations]
G --> H[Screen new scenarios]
H --> I[Re-simulate predicted RISKY<br/>and borderline]
I --> J[HTML report<br/>and dashboard]
Install
Python 3.11 or newer.
pip install ibr-faultscreen
From source:
git clone https://github.com/ishaibu/ibr-faultscreen
cd ibr-faultscreen
python -m venv .venv
.venv\Scripts\activate # Windows (macOS/Linux: source .venv/bin/activate)
pip install -e ".[dev]"
Quick start
ibr-faultscreen example
Runs five scenarios on the IEEE 39-bus case (about a minute; the very first run takes
longer while ANDES prepares its models) and opens an HTML report. Results go to
example_output/, with dashboard.html next to the report (ibr-faultscreen example --dashboard opens both). Every output folder ignores itself in Git.
Dashboard
simulate, screen and example write dashboard.html next to the report, and
ibr-faultscreen dashboard results.csv builds one from any results, dataset or screening file.
It is one HTML file that works offline: views for the overview, network map, scenarios,
failure modes, ride-through, trajectories, the equal-area view and the machine-learning (ML)
screening model; filters by number of IBRs,
clearing time, outcome and failure mode; a zoomable map with details for any bus; search, sort
and CSV download; print to PDF; dark mode; laid out for phones. It shows the results exactly as
the report does and calculates nothing new: the filters only choose which scenarios are counted.
Commands
| Command | What it does |
|---|---|
ibr-faultscreen check CASE |
Is a case ready? Lists unsupported PSS/E dynamic models, generators that can become IBRs, power flow status |
ibr-faultscreen simulate SCENARIOS.yaml |
Runs your scenarios; writes results, figures, a report and a dashboard |
ibr-faultscreen cct --bus 16 |
Critical clearing time at one or more buses, with the equal-area view just below and above it |
ibr-faultscreen dataset --n 5000 |
Generates a labeled dataset in parallel (resumable, with a data card); --scenarios LIST.csv runs your own list instead |
ibr-faultscreen train dataset.csv |
Evaluates rule, logistic and gradient-boosting models on unseen fault locations; trains one |
ibr-faultscreen screen --model model.joblib |
Ranks new scenarios and verifies the risky ones by simulation |
ibr-faultscreen report results.csv |
Builds the HTML report from any results file |
ibr-faultscreen dashboard results.csv |
Builds the interactive dashboard from any results, dataset or screening file |
Add --help to any command for its options. A scenario file looks like this:
- scenario_id: my_case_1
load_scale: 1.0
ibrs: [{gen: 2, kind: solar}, {gen: 6, kind: bess}]
fault: {bus: 16, clear_time: 0.10} # seconds; bolted by default
From Python:
from ibr_faultscreen.criteria import default_criteria
from ibr_faultscreen.label import label
from ibr_faultscreen.scenario import FaultSpec, IBRSpec, Scenario
from ibr_faultscreen.simulate import simulate
scenario = Scenario("my_case", ibrs=(IBRSpec(2), IBRSpec(6, kind="bess")),
fault=FaultSpec(16, clear_time=0.10))
result = simulate(scenario) # ANDES time-domain run
verdict = label(result, default_criteria()) # PRC-029 ride-through and other checks
print(result.status, "RISKY" if verdict.risky else "OK", verdict.reasons)
Your own model: ibr-faultscreen check mycase.raw (the .dyr file with the same name is
picked up automatically, or pass --dyr), then use case: mycase.raw in the scenario file.
Criteria
Screening limits live in a YAML file. The built-in file
(src/ibr_faultscreen/data/criteria_prc029.yaml) holds the NERC PRC-029 voltage and
frequency ride-through tables (Table 2, "All Other IBR", which covers PV and BESS; and
Table 3), transcribed from the NERC PDF and checked row by row. PRC-029-2 (filed with FERC in
August 2026) has the same Tables 2 and 3 as PRC-029-1; confirm the version in force for your
study. The file's angle, voltage-recovery and frequency limits are illustrative: replace
them with your transmission provider's criteria (--criteria myfile.yaml). See
examples/criteria_example.yaml for the format.
Ride-through time is counted per band by default. PRC-029 Attachment 1 note 7 ("add the
duration within each band") can also be read so that time in a deeper band counts toward the
shallower ones too; --rt-counting nested (or ride_through_counting: nested in the file)
uses that more conservative reading. Every results file has an rt_ratio_max column: the
largest share of an allowed ride-through time used by any IBR. Above 1 is exposure; 0.8 to 1 is
a near miss worth a look.
IBR models
Each IBR uses the WECC generic models REGCA1 + REECA1 + REPCA1 in ANDES. Parameter
profiles live in src/ibr_faultscreen/data/ibr_profiles.yaml:
andes_example (ANDES's example case) and wecc_mvwg_2019 (the illustrative values
in the WECC MVWG Solar PV Plant Modeling and Validation Guideline, 2019). Neither
represents a specific plant. Choose one per IBR in a scenario file
({gen: 2, profile: wecc_mvwg_2019}) or for a whole dataset (--ibr-profile).
Weak grids. REGC_A (REGCA1 here) is a current-source model. WECC lists it as approved but not suitable where the short-circuit ratio (SCR) at the point of interconnection is about 2 to 3 or less; its voltage-source successor REGC_B suits weak grids better (WECC model summary). ANDES 2.0.0 does not include REGC_B. In the demo dataset many scenarios are in that range (of the 4,011 with an IBR, 68% have a lowest SCR below 3 by the tool's conservative estimate), so treat weak-grid results with extra care.
Honest handling of solver failures
ANDES cannot solve some bolted faults close to large units, and sometimes "solves" them with
buses stuck at 0 V after clearing (non-physical). IBR-FaultScreen detects both, reruns the case
at milder faults, and labels it RISKY (confirmed) when the milder fault is already RISKY or
RISKY (unresolved) when it is not, so it never reports a guess as a result. Unresolved
scenarios are left out of model training, and screen always simulates scenarios at fault
buses where the solver often fails. See "Unsolvable bolted faults" in docs/design-spec.md.
Validation
The validation tests in docs/design-spec.md §14 run on every push (GitHub Actions),
including a single-machine critical clearing time checked against the equal-area criterion,
determinism of the dataset, evaluation on unseen fault locations, and "no RISKY verdict from a
prediction alone". Hand checks are recorded in docs/verification.md. Abbreviations are
explained in docs/glossary.md.
Documents
docs/design-spec.md: scope, decisions, methods, tests, limitationsdocs/verification.md: independent hand checksdocs/glossary.md: abbreviations and termsCHANGELOG.md: what changed in each versionexamples/colab_quickstart.ipynb: run in the browser with Google Colabexamples/walkthrough.ipynb: step-by-step notebooktools/build_demo.py: rebuilds the interactive demo from a datasettools/explorer_scenarios.py,tools/explorer_data.py: the scenario list and the data behind the explorer and quiz
Contributing
Questions, bug reports and ideas are welcome: open an
issue (templates help you include what is
needed). Please never attach confidential network models; an anonymized description or the
IEEE 39-bus case is enough. See CONTRIBUTING.md.
How to cite
If you use IBR-FaultScreen, please cite the software, and the dataset if you use it:
Ibrahim, S. (2026). IBR-FaultScreen: fault-scenario screening for grids with inverter-based resources (Version 0.2.0) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.23290219
Ibrahim, S. (2026). IBR-FaultScreen fault-screening datasets: 5,000 sampled and 37,120 exhaustive fault scenarios on the IEEE 39-bus system with inverter-based resources (Version 2.0) [Data set]. Zenodo. https://doi.org/10.5281/zenodo.23290449
These DOIs always point to the latest version; each version also has its own DOI on its
Zenodo page. GitHub's "Cite this repository" button (from CITATION.cff) gives APA and
BibTeX.
Metadata
Release files for ibr-faultscreen 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ibr_faultscreen-0.3.1.tar.gz | 166.5 kB | With provenance | Details for ibr_faultscreen-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ibr_faultscreen-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for ibr_faultscreen-0.3.1-py3-none-any.whl |
Total release size: 310.1 kB
Release files / ibr_faultscreen-0.3.1.tar.gz
| Download URL | ibr_faultscreen-0.3.1.tar.gz |
|---|---|
| Size | 166.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
61c898f4c66c0ef50694fd49bdc54002e830d5df7c1d888afb2e6453c072cca8
|
|
BLAKE2b-256 checksum How to use checksums |
e18709a84487a5590a1dac364e2bcc55a182c322ac10749c8836aa0e090b4507
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logRelease files / ibr_faultscreen-0.3.1-py3-none-any.whl
| Download URL | ibr_faultscreen-0.3.1-py3-none-any.whl |
|---|---|
| Size | 143.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66f9a08ab13168ae2aecd29e732935ce003dbcfb99f3d574cf3d5d6d6f378e85
|
|
BLAKE2b-256 checksum How to use checksums |
c917e15effe2eeda0ef2d9029613ba9709beac3878ba54b954189f31429f1903
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logSecurity for ibr-faultscreen 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for ibr_faultscreen-0.3.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.