Metadata-Version: 2.4
Name: scr-screen
Version: 0.6.0
Summary: Short-circuit ratio (SCR/WSCR) screening for inverter-based resource interconnection
Author: Shaibu Ibrahim, P.E.
License-Expression: MIT
Project-URL: Homepage, https://github.com/ishaibu/scr-screen
Project-URL: Documentation, https://github.com/ishaibu/scr-screen#readme
Project-URL: Issues, https://github.com/ishaibu/scr-screen/issues
Project-URL: Changelog, https://github.com/ishaibu/scr-screen/blob/main/CHANGELOG.md
Keywords: power-systems,short-circuit-ratio,grid-interconnection,inverter-based-resources
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandapower>=3.5
Requires-Dist: openpyxl
Requires-Dist: xlsxwriter
Requires-Dist: matpowercaseframes
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Provides-Extra: notebook
Requires-Dist: ipykernel; extra == "notebook"
Dynamic: license-file

# SCR-Screen

[![tests](https://github.com/ishaibu/scr-screen/actions/workflows/tests.yml/badge.svg)](https://github.com/ishaibu/scr-screen/actions/workflows/tests.yml)
[![Python](https://img.shields.io/badge/python-3.10%E2%80%933.13-blue)](https://pypi.org/project/scr-screen/)
[![License: MIT](https://img.shields.io/badge/license-MIT-green)](https://github.com/ishaibu/scr-screen/blob/main/LICENSE)
[![Interactive demo](https://img.shields.io/badge/demo-open%20in%20browser-0a9396)](https://ishaibu.github.io/scr-screen/demo/)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.23130832.svg)](https://doi.org/10.5281/zenodo.23130832)

**Open-source short-circuit ratio (SCR) screening for solar, wind, and battery storage interconnection.**

SCR-Screen helps interconnection, planning, and siting engineers find weak-grid locations **early**, before detailed studies are commissioned. It calculates short-circuit strength from a network model, screens single plants (SCR) and groups of nearby plants (WSCR), and produces a clear, self-contained HTML report.

> **Screening only.** SCR-Screen provides screening-level indicators of system strength. Results do not replace interconnection studies, detailed positive-sequence or EMT analysis, or the requirements of the applicable transmission provider, Independent System Operator (ISO) or Regional Transmission Organization (RTO).

<p align="center">
  <a href="https://ishaibu.github.io/scr-screen/demo/"><img src="https://raw.githubusercontent.com/ishaibu/scr-screen/main/docs/images/network-map.gif" width="760"
  alt="Network map of the IEEE 39-bus system: as the plant size grows from 300 to 1,500 MW, weak buses turn orange and red with heat-map shading, then the N-1 view shows each bus's worst single outage"></a>
</p>
<p align="center"><em>A full IEEE 39-bus scan (assumed data): as the plant size grows from 300 to 1,500 MW,
weak locations light up; the N-1 view contingency then shows each bus's worst single outage, down to an SCR of 0.91.
<a href="https://ishaibu.github.io/scr-screen/demo/">Open the interactive demo</a> and drag the slider yourself.</em></p>

---

## Why use it

The SCR formula is simple. Getting a trustworthy answer is not:

- **Short-circuit MVA must come from the network, calculated consistently.** SCR-Screen computes it from a model, excludes inverter-based resource (IBR) contributions as NERC requires, and states the method used.
- **Nearby plants share grid strength.** Two plants that each pass alone can be weak together. SCR-Screen screens groups with WSCR and shows the difference side by side.
- **Siting needs every location, not one.** The bus scan ranks every bus in a model for a plant of a given size.
- **Method choice changes answers.** SCR-Screen supports both the classical flat-start method (common U.S. planning practice) and IEC 60909, and records which one produced each result.
- **Transparent and reproducible.** Open formulas, documented assumptions, automated tests, and a public [verification record](docs/verification.md).

## Features

| Feature | Details |
|---|---|
| SCR | Single plant at its point of interconnection (POI) |
| WSCR | Groups of plants assumed fully interacting (ERCOT/NERC formulation): in direct mode, and in network scans with `--groups` (live in the report as the plant size changes) |
| SCRIF | SCR with interaction factors: each grouped plant's SCR allowing for how strongly the network couples it to its neighbors (NERC 2017; NREL 2025). Sits between SCR and WSCR |
| CSCR | Composite SCR of a group, with the group's points of interconnection tied together; on the MVA basis it divides by the plants' nominal MVA ratings, as NERC defines it |
| ESCR | Effective SCR: short-circuit MVA minus capacitive shunt compensation at the bus, ÷ plant rating (shown when the network has capacitor banks). This is the classical "Effective SCR"; NERC (2017) notes it is distinct from CIGRE's "Equivalent SCR", which is SCRIF |
| Interaction factors | `scr-screen interactions` lists how strongly buses affect each other and suggests groups for `--groups` |
| N-1 worst case | `scan --n1` removes each line circuit, transformer unit and generator unit in turn and reports each bus's lowest SCR and the outage that causes it |
| Minimum-generation case | `scan --gen-out 30,32` takes the generators at those buses out of service for the whole scan |
| EMT study triage | `scr-screen triage` writes a system strength data sheet for each point of interconnection (SCR and ESCR intact, worst N-1 and minimum generation; WSCR, CSCR, SCRIF; Thévenin R, X, X/R in pu and ohms; fault current) and a priority for an EMT study, based on the situations listed in NERC's 2024 EMT guideline. `scan --emt-triage` adds the priority to every bus, live with the plant-size slider |
| Rating basis | MW (default) or MVA, in direct mode (`run --basis MVA`) and network scans (`scan --basis MVA`), giving NERC's WSCR-MVA and MVA-based CSCR. MW stays the default; MVA is used only when you choose it. Devices with no active power (e.g. STATCOMs: 0 MW plus an MVA rating) count on the MVA basis |
| Plant MVA rating | The nameplate (inverter) MVA rating, as NERC's MVA metrics use. Give it directly, as the inverter count × each inverter's MVA (e.g. 55 × 4.2 MVA = 231 MVA), or, early in a project, **estimate** it from the power factor required at the POI (MVA = MW ÷ power factor, labeled as an estimate) |
| Group sizes | A groups file can give a member its own size (`mw`, `mva` columns), e.g. an existing plant or a STATCOM next to the plant being screened |
| Short-circuit methods | Classical flat-start (1.0 pu) and IEC 60909 (via pandapower) |
| Bus scan | SCR at every bus of a network for a hypothetical plant size |
| Flags | Very weak / weak / no flag, with user-configurable thresholds |
| Network map | Grid drawn from bus coordinates (or an automatic layout), colored by SCR flag, with heat-map shading so weak areas stand out, and an N-1 view. The IEEE 39-bus example uses the commonly published one-line arrangement |
| Plant-size slider | In scan reports and dashboards, drag to any plant size; every SCR, flag, chart and the map update instantly in the browser |
| Max plant size | Largest plant each location can host before a weak flag (SCMVA ÷ weak threshold) |
| Method comparison | Classical vs IEC 60909 for every bus, highlighting where the flag changes |
| Cost screening | Ranks candidate buses by screening-level cost: synchronous condenser to fix weak grid, gen-tie line, POI substation (all costs are your inputs) |
| Your own network | Reads pandapower JSON, Excel (.xlsx), and MATPOWER (.m/.mat); `check` lists anything missing before you scan |
| Group strength | For each group: WSCR, CSCR, SCRIF, N-1 WSCR, the largest group total before a weak flag and the interaction factors between members; member sizes can be changed in the browser |
| Dashboard | `scan --dashboard` writes the scan as a one-screen dashboard: a sidebar of views (overview, map, rankings, charts, groups, N-1, EMT triage, cost, method comparison, assumptions), the weakest locations beside the map, and the details of any bus you click, including its Thévenin impedance and fault current. Same numbers and live inputs as the report; one HTML file that works offline |
| Outputs | Self-contained HTML report and dashboard (work offline), CSV, JSON |
| Interfaces | Command line (`scr-screen`) and Python API |

## Try it without installing

- **[SCR-Screen Lite](https://ishaibu.github.io/scr-screen/lite/)**: browser calculator. Type each plant's short-circuit MVA and MW to get SCR, flags, WSCR, the largest plant before a weak flag, and condenser cost. Runs entirely in your browser.
- **[Interactive demo](https://ishaibu.github.io/scr-screen/demo/)**: a full IEEE 39-bus scan (assumed data, illustrative costs) as a dashboard. Drag the plant-size slider and change the inputs; click any bus for its details; two groups of nearby buses show WSCR, CSCR and SCRIF, the heat map shows weak areas, the N-1 view shows each bus's worst single outage, and the EMT study triage gives each bus a priority. The same scan as a one-page report: [demo report](https://ishaibu.github.io/scr-screen/demo/report/).

## Installation

Requires Python 3.10 or newer.

```bash
python -m venv venv
# Windows:  venv\Scripts\activate      macOS/Linux:  source venv/bin/activate
pip install scr-screen
```

From source (for contributors):

```bash
git clone https://github.com/ishaibu/scr-screen.git
cd scr-screen
pip install -e ".[dev]"
```

## Quick start (command line)

**Try it in one minute** with the bundled IEEE 39-bus example:

```bash
scr-screen example                      # copies example files into ./scr-screen-example
cd scr-screen-example
scr-screen scan ieee39_assumed.json --plant-mw 1500 --report scan.html --open
scr-screen scan ieee39_assumed.json --plant-mw 1500 --dashboard dashboard.html --open
```

The first command writes the one-page report; the second writes the same scan as a [dashboard](#dashboard).

**Direct mode:** you already have short-circuit MVA values (from any study tool).

```bash
scr-screen template plants.csv          # creates an input file with example rows
scr-screen run plants.csv --report report.html --out results.csv
```

**Network mode:** calculate short-circuit MVA from a [pandapower](https://www.pandapower.org/) network saved as JSON, and scan every bus.

```bash
scr-screen scan examples/ieee39_assumed.json --plant-mw 1500 --report scan.html --open
scr-screen scan examples/ieee39_assumed.json --plant-mw 1500 --method iec60909
```

`--open` opens the report in your browser as soon as it is ready.

**What-if inputs:** scan reports have an inputs panel. Change any of these and the whole report (map, charts, tables, cost ranking) recalculates instantly in the browser, with no re-run needed:

- plant size (slider or typed value)
- weak and very-weak SCR thresholds
- with cost screening: target SCR, condenser X''d, transformer Xt, condenser $/MVA, gen-tie $/mile, and each candidate bus's gen-tie distance and POI cost (edited directly in the cost table)

**Reset all** returns to the values the report was created with. Invalid entries (e.g. 0 MW) are flagged and ignored.

**Screen nearby buses together (WSCR):** list buses that would host plants close together in a CSV with columns `bus,group`, and add `--groups`. Each bus in a group gets a plant of `--plant-mw`; the report shows each plant alone and the group's WSCR, and both update with the slider.

```bash
scr-screen scan ieee39_assumed.json --plant-mw 1500 --groups ieee39_groups_example.csv --report groups.html --open
```

WSCR assumes the plants in a group are fully interacting, so group only buses that are electrically close; for buses far apart it is conservative.

**Which buses interact, and N-1:** list candidate buses to see their interaction factors and get suggested groups, then scan with the groups and the worst single outage:

```bash
scr-screen interactions ieee39_assumed.json --buses 4,11,12,13,16,17,26,28,29 --out my_groups.csv
scr-screen scan ieee39_assumed.json --plant-mw 1500 --groups my_groups.csv --n1 --report full.html --open
```

Suggested groups contain only buses where every pair interacts at least `--threshold` (default 0.5, a judgment value, not an industry standard).

**MVA basis, mixed sizes and STATCOMs:** NERC describes WSCR on both the MW and the MVA basis, and defines CSCR with the nominal (nameplate) MVA ratings of the inverter-based resources. MW stays the default. To use MVA, choose the basis and give the plant's MVA rating in ONE of three ways:

```bash
# nameplate MVA known
scr-screen scan ieee39_assumed.json --plant-mw 1500 --plant-mva 1650 --basis MVA --report mva.html
# inverter count x each inverter's nameplate MVA (here 393 x 4.2 = 1,650.6 MVA)
scr-screen scan ieee39_assumed.json --plant-mw 1500 --inverters 393 --inverter-mva 4.2 --basis MVA --report mva.html
# early in a project: ESTIMATE from the power factor required at the POI (1,500 / 0.95 = 1,578.9 MVA)
scr-screen scan ieee39_assumed.json --plant-mw 1500 --power-factor 0.95 --basis MVA --report mva.html
```

The report says which way was used. An estimate from the power factor is labeled as one: inverter nameplate MVA is usually higher (collector and transformer reactive losses, oversizing), which gives lower, more conservative ratios, so use the nameplate when it is known.

A groups file can also give any member its own size with optional `mw` and `mva` (nameplate) columns (both or neither). Members without them use the scan's plant size. A device with no active power, such as a STATCOM, is entered as `mw` 0 with its `mva`; it counts on the MVA basis and is left out (with a note) on the MW basis.

```
bus,group,mw,mva
11,G1,,
13,G1,,
12,G1,0,200
```

**Minimum-generation case:** `--gen-out 30,32` takes the generators at those buses out of service for the whole scan. The weakest short-circuit levels usually occur with fewer units online.

Run `scr-screen --help`, `scr-screen run --help`, `scr-screen scan --help` or `scr-screen triage --help` for all options (`--basis`, `--plant-mva`, `--weak`, `--very-weak`, `--title`, `--open`, `--no-compare`, `--groups`, `--n1`, `--gen-out`, `--no-heatmap`, `--emt-triage`, `--dashboard`, `--ibr-threshold`, `--poi-info`).

## Dashboard

`scan --dashboard FILE.html` writes the scan as a dashboard instead of (or as well as) the one-page report:

```bash
scr-screen scan ieee39_assumed.json --plant-mw 1500 --groups ieee39_groups_example.csv --dashboard dashboard.html --open
```

<p align="center">
  <a href="https://ishaibu.github.io/scr-screen/demo/"><img src="https://raw.githubusercontent.com/ishaibu/scr-screen/main/docs/images/dashboard.png" width="760"
  alt="SCR-Screen dashboard for the IEEE 39-bus example: a sidebar of views, the plant-size and threshold inputs, summary cards, the network map, the weakest locations and the details of the selected bus"></a>
</p>

- **Views**, each with a count of what needs attention: Overview, Network map, Rankings, Charts, Groups, N-1 outages, EMT study triage, Cost screening, Method comparison, Method & assumptions. A view appears only when the scan has that content. On a computer they are in a sidebar; on a tablet or phone they are in a row along the top, with an **All** button that lists every view.
- **Inputs that stay in place:** plant size and the weak and very-weak thresholds; the cost inputs are in the Cost screening view. On a phone the inputs fold into one line (tap **Edit** to change them) and the summary cards become a row you can swipe. Everything recalculates as in the report.
- **Overview:** the network map beside the weakest locations (lowest SCR in any condition shown). Click a bus on the map, in the list, in the chart or in the rankings for its details: SCR intact and under the worst single outage, short-circuit MVA, fault current, largest size before a weak flag, the Thévenin impedance (R + jX in ohms, X/R) intact and N-1, the worst outage, and why it has its EMT priority.
- **Network map** fits the screen; zoom with +, − and Fit, by pinching, or by scrolling (Ctrl + scroll on the Overview), and drag to move. Color it by SCR (intact), N-1 SCR, or EMT study priority. Every flagged bus pulses; the weakest are labeled.
- **Charts:** one chart per bus with the SCR intact (bar), the SCR under the worst single outage (◆) and the largest plant before a weak flag, ordered weakest first or by any of these.
- **Groups:** each member's size can be changed in its box; the panel shows WSCR, CSCR, SCRIF, the group's N-1 WSCR, the largest group total before a weak flag, the worst member's EMT priority and the interaction factors between members (see [Groups](#groups-of-nearby-plants)).
- **Rankings:** search by bus or group, show flagged buses only, and sort by any column; table headings stay in view while you scroll.
- **Print / PDF** prints every view in report order; **Download CSV** saves the results table as shown (current plant size and thresholds).

The dashboard is the report's content rearranged: it uses the report's own calculation script, so the two always show the same numbers. With the classical method, `--dashboard` also turns on `--n1` and `--emt-triage` so that every view is available (results files written with `--out` then include the N-1 and EMT columns). `--report` can be used together with `--dashboard`. One HTML file, no internet access needed.

## Groups of nearby plants

Plants close together share the grid's strength, so screen them together: list them in a groups file (`bus,group`, optionally with each member's `mw` and `mva`) and add `--groups`. For each group the report and dashboard show:

| Metric | What it tells you |
|---|---|
| WSCR | The group's strength, assuming the plants fully interact (conservative): Σ(SCMVAᵢ × Pᵢ) ÷ (ΣPᵢ)² |
| CSCR | With the group's points of interconnection tied together |
| SCRIF | Each member's SCR allowing for how strongly the network couples it to the others |
| N-1 WSCR (with `--n1`) | The lowest WSCR when each single outage is applied to the whole group at once, and the outage that gives it |
| Largest group total before a weak flag | WSCR × total ÷ weak threshold: how far the group's total can grow (members' sizes kept in proportion) before WSCR falls below the weak threshold; intact and N-1 |
| EMT study priority (worst member) | With `--emt-triage` |
| Interaction factors | IFᵢⱼ = \|Zᵢⱼ ÷ Zⱼⱼ\| between members: 1.00 means fully interacting (the WSCR assumption), near 0 independent |

In the report and dashboard you can type a different size for any member; everything recalculates. `scr-screen interactions` suggests groups from the interaction factors.

## EMT study triage

NERC's Reliability Guideline *Recommended Practices for Performing EMT System Studies for Inverter-Based Resources* (December 2024, Chapter 1) lists situations in which EMT studies should be considered, and says that if any one of them applies, EMT studies should be considered. It also notes that a high level of system strength alone should not rule out the need for EMT studies. SCR-Screen checks the situations it can find in a network model and asks you about the rest:

| Situation (NERC 2024, Chapter 1) | How SCR-Screen checks it |
|---|---|
| Low system strength | SCR (and ESCR where capacitor banks exist) intact, under the worst single outage, and in a minimum-generation case (`--gen-out`); WSCR, CSCR and SCRIF for grouped POIs |
| Other IBRs nearby | Existing `sgen` and `storage` elements whose interaction factor with the POI, max(IF_ij, IF_ji), is at least `--ibr-threshold` (default 0.5) |
| Series compensation, FACTS, HVdc nearby | Found in the model (lines with negative series reactance; `svc`, `ssc`, `tcsc`; `vsc`, `dcline`), with the same interaction test; or answered yes |
| Stability Criteria (poor positive-sequence stability results); EMT Studies Following System Events (an event positive-sequence models cannot reproduce); pre-existing oscillation or oscillatory modes; high IBR penetration level; specialized protection schemes such as RAS; distance-relay-protected lines with declining fault current levels; a trend of decreasing system strength; a trend of increasing RoCoF or decreasing inertia | Answered in a `--poi-info` file (yes / no / unknown); unanswered ones are listed as not checked |
| The inverter's minimum SCR | Optional `oem_min_scr` in the `--poi-info` file, compared with the lowest SCR |

```bash
scr-screen triage ieee39_triage_example.json --buses 12,16,28 --plant-mw 500 --poi-info ieee39_poi_info_example.csv --report triage.html --open
scr-screen triage ieee39_assumed.json --buses 11,12,13,16,17 --plant-mw 1500 --groups ieee39_groups_example.csv --gen-out 38,39 --report triage1500.html --open
scr-screen scan ieee39_triage_example.json --plant-mw 500 --emt-triage --report scan_triage.html --open
```

**Priorities** order the work; they are SCR-Screen's judgment, not NERC's (NERC does not rank the situations):

| Priority | When |
|---|---|
| 1: EMT study recommended (high priority) | Any strength metric below the very-weak threshold in any condition; series compensation, FACTS or HVdc nearby; a system event that positive-sequence models cannot reproduce; or the lowest SCR below the OEM minimum SCR |
| 2: EMT study should be considered | Any strength metric below the weak threshold; other IBRs nearby; or any other situation answered yes |
| 3: no screening trigger found | None of the above. This does not rule out an EMT study (NERC, 2024) |

A `--poi-info` file has one row per POI (bus label), or a row `all` for every POI not listed:

```
poi,rms_stability_concerns,unexplained_system_event,pre_existing_oscillation,series_compensation,facts_nearby,hvdc_nearby,high_ibr_penetration,ras,distance_relays_declining_fault_current,decreasing_strength_trend,rocof_inertia_trend,oem_min_scr,notes
all,unknown,no,no,no,no,no,unknown,unknown,unknown,unknown,unknown,,
28,unknown,no,no,no,no,no,unknown,unknown,unknown,unknown,unknown,3.0,assumed OEM minimum SCR
```

The example network `ieee39_triage_example.json` is the IEEE 39-bus case with three **assumed, illustrative** existing IBRs (solar at bus 13, wind at bus 26, battery at bus 4); they are not part of the IEEE test system and, as IBRs, do not change any SCR. HVdc converters, dc lines and STATCOMs in a model are listed for the triage and left out of the short-circuit calculation (converter-interfaced, like other IBRs); a TCSC stops the calculation with a message, since it carries the line. The triage uses the classical method.

## Use your own network

SCR-Screen works on any network, not just the IEEE 39-bus example.

| File type | Extension | Notes |
|---|---|---|
| pandapower JSON | `.json` | Native format |
| pandapower Excel | `.xlsx` | Edit in Excel: one sheet per element type (bus, line, trafo, gen, ext_grid, ...) |
| MATPOWER | `.m`, `.mat` | Converted on load; MATPOWER has no short-circuit data, so add it (below) |

**Short-circuit data needed:**
- Grid sources (`ext_grid`): `s_sc_max_mva` and `rx_max`.
- Synchronous generators (`gen`): `xdss_pu` (X''d on machine base) and `sn_mva`. IEC 60909 also needs `vn_kv`, `rdss_ohm`, and `cos_phi`.
- Transformers (`trafo`) use pandapower's IEC names: `vk_percent` is the short-circuit impedance in percent of rated voltage, the nameplate **%Z** in ANSI terms, and `vkr_percent` is its resistive part, **%R** = load (copper) losses in kW ÷ rating in kVA × 100. The reactance is √(vk² − vkr²), the nameplate **%X**. Both are on the transformer's own rating (`sn_mva`) and rated voltages (`vn_hv_kv`, `vn_lv_kv`).

**Workflow:**

```bash
scr-screen check mynetwork.m                 # lists exactly what is missing
scr-screen convert mynetwork.m mynetwork.xlsx  # open in Excel, fill in the empty short-circuit columns
scr-screen check mynetwork.xlsx              # "Ready for Classical: yes"
scr-screen scan mynetwork.xlsx --plant-mw 300 --report scan.html --open
```

Buses with no path to any source are skipped and listed in the report. PSS/E `.raw` import is planned.

## Interconnection cost screening

For a plant of a given size, SCR-Screen estimates a screening-level cost of connecting at each candidate bus:

- **Target check:** buses below your target SCR are flagged, with the largest plant that meets the target (`SCMVA ÷ target SCR`) and the condenser alternative.
- **Weak-grid mitigation:** synchronous condenser size to reach a target SCR (default: the weak threshold),
  `condenser MVA = max(0, plant MW × target SCR − SCMVA) × (X''d + Xt)`, assuming the condenser is at the POI.
- **Gen-tie line:** distance × your cost per mile.
- **POI substation or switching station:** your cost per bus.

```bash
scr-screen sites-template mynetwork.xlsx sites.csv   # list of buses; fill in distance_mi, poi_cost_usd
scr-screen scan mynetwork.xlsx --plant-mw 1500 --report scan.html --site-costs sites.csv \
    --condenser-cost-per-mva 100000 --gen-tie-cost-per-mile 2000000 --cost-out costs.csv
```

The numbers above and in `examples/ieee39_sites_example.csv` are **illustrative only**. SCR-Screen ships no cost data; enter your own. In the report, every cost input is editable and the ranking updates instantly, so you can see the cheapest bus change as the plant grows or as costs change.

> Cost screening excludes network upgrades (thermal, voltage, stability), which are often the largest interconnection cost and require power flow and interconnection-queue studies. Grid-forming inverters may mitigate weak-grid conditions at lower cost and are not costed.

## Input format (direct mode)

One row per plant. Column order and capitalization do not matter; files saved from Excel as **CSV UTF-8** work.

| Column | Required | Description |
|---|---|---|
| `plant_id` | Yes | Unique label |
| `scmva` | Yes | Three-phase short-circuit MVA at the POI, **without** IBR contribution |
| `rating_mw` | Yes | Plant rating in MW (0 for a device with no active power, such as a STATCOM, with an MVA rating) |
| `rating_mva` | No | Nameplate (inverter) MVA rating; used only with `--basis MVA` |
| `inverters`, `inverter_mva` | No | Instead of `rating_mva`: the number of inverters and each inverter's nameplate MVA (MVA = inverters × inverter_mva) |
| `power_factor` | No | Instead of either: an **estimate**, MVA = MW ÷ power factor (e.g. 0.95 at the POI). `run --power-factor 0.95` applies it to every plant with no MVA rating |
| `group` | No | Plants sharing a group are also screened together with WSCR |
| `poi_name` | No | Display name of the POI |

Numbers must use a dot for decimals and no thousands separators (e.g. `1000`, `485.86`). Values with commas are rejected rather than guessed.

## Python API

```python
from scr_screen.metrics import scr, wscr
from scr_screen.io import read_plants_csv
from scr_screen.screening import screen
from scr_screen.report import write_html_report

scr(500, 100)                          # 5.0
wscr([1000, 600], [200, 100])          # 2.889

plants, poi = read_plants_csv("plants.csv")
result = screen(plants, poi_names=poi)
write_html_report(result, "report.html")
```

Network mode:

```python
import pandapower as pp
from scr_screen.network import scan_buses

net = pp.from_json("network.json")
for row in scan_buses(net, plant_mw=300, method="classical"):
    print(row.bus, row.name, round(row.scr, 2), row.flag)
```

See [`examples/walkthrough.ipynb`](examples/walkthrough.ipynb) for a step-by-step tour.

## Methods

**SCR** = SCMVA ÷ plant rating
**WSCR** = Σ(SCMVAᵢ × Pᵢ) ÷ (ΣPᵢ)², assuming the plants in a group fully interact (conservative)
**SCRIF**ᵢ = SCMVAᵢ ÷ (Pᵢ + Σⱼ IFᵢⱼ × Pⱼ), with interaction factor IFᵢⱼ = ΔVᵢ ÷ ΔVⱼ = |Zᵢⱼ ÷ Zⱼⱼ| from the network impedance matrix
**CSCR** = short-circuit MVA with the group's POIs tied together ÷ ΣP (NERC ties the plants' medium-voltage buses, which are not in a transmission model, and divides by nominal MVA: use `--basis MVA` to match)
**ESCR** = (SCMVA − capacitive shunt Mvar at the bus) ÷ plant rating
**N-1**: each line circuit, transformer unit and synchronous generator unit is removed in turn; outages that would leave buses with no source are skipped and listed
**Group N-1 WSCR** = the lowest WSCR when each of the same single outages is applied to all members of a group at once
**Largest group total before a weak flag** = WSCR × ΣP ÷ weak threshold (the members' sizes kept in proportion; with the N-1 WSCR for the N-1 value)
**Thévenin impedance** at a POI: Z_th = Zᵢᵢ (pu on 100 MVA); in ohms, Z_th × kV² ÷ 100; X/R = X ÷ R; fault current I_sc = SCMVA ÷ (√3 × kV) kA, at 1.0 pu pre-fault voltage with IBRs excluded

P is the plant rating on the chosen basis: MW (default) or MVA.

SCRIF, CSCR and N-1 use the classical method's network impedance matrix.

| Short-circuit method | Pre-fault voltage | Correction factors | Typical use |
|---|---|---|---|
| Classical flat-start (default) | 1.0 pu | None | Common U.S. planning practice |
| IEC 60909 (max case) | c = 1.1 | Generator and transformer impedance correction | IEC practice |

In both methods, inverter-based resources do not contribute to SCMVA.

**Per-unit conversion (classical method):** a transformer's short-circuit impedance and a generator's X″d are given on the equipment's own rating and rated voltage. They are converted to the 100 MVA base and to the bus nominal voltage: z = z_rated × (100 ÷ S_rated) × (V_rated ÷ V_bus)², with the transformer referred to its low-voltage side. When rated and bus voltages are equal, the last factor is 1. Transformers are modeled at their nominal ratio: tap positions and rated ratios that differ from the bus-voltage ratio are not modeled, and the report and `scr-screen check` say how many transformers this affects.

**Default flag bands** (user-configurable): below 2 **very weak**; 2 to below 3 **weak**; 3 or above **no flag**. These follow HVDC planning practice (IEEE Std 1204-1997). There is no universal weak-grid threshold: NERC notes there is "no industry standard for what strong, weak, or very weak system strength means" (2017).

**Thresholds used in practice** (examples from public documents; check the current criteria of your transmission provider):

| Source | Value | Use |
|---|---|---|
| NREL/TP-5D00-94961 (2025) | SCR < 3 weak, > 5 strong | General rule of thumb |
| SPP, ORNL EMT Workshop (Aug 2023) | SCR, WSCR, CSCR below 6.0 | Screening: further study (dynamic and/or EMT) generally required |
| ERCOT Panhandle studies (2016–2019) | WSCR 1.5 | Regional planning and operating threshold, backed by EMT studies |
| IESO (Ontario), LT2 RFP connection guidance | Minimum SCR 5 at the POI | Assumed for stable operation of each IBR |
| AESO (Alberta), IBR connection requirements | Minimum and maximum short-circuit level at the connection point, specified by AESO; EMT results must be stable at that minimum or at SCR 3.0, whichever is lower | Connection requirement and EMT test benchmark |

To screen with a single threshold such as SPP's, set `--weak 6` (buses below 6 are then flagged).

Full details: [design specification](docs/design-spec.md).

## Limitations

- SCR-based metrics assume **grid-following** inverters and do not replace the inverter manufacturer's minimum SCR.
- WSCR assumes the plants in a group are fully interacting; SCRIF uses the network's interaction factors instead. Both are single-frequency, steady-state screens and do not capture control interactions; EMT studies with equipment-specific models remain essential below the screening thresholds (NERC, 2023).
- The heat-map shading is a visual aid: strength is calculated only at buses, not between them.
- The classical method ignores loads, shunts, and line charging, and uses the nominal transformer ratio: tap positions and off-nominal turns ratios are not modeled, which is the usual flat-start assumption and can change the short-circuit MVA by several percent at buses next to such transformers (the report notes how many there are). It does not yet model three-winding transformers or closed bus-bus switches. Unsupported elements stop the calculation with a clear error rather than being ignored.
- Real transmission models are often restricted (e.g. CEII in the U.S.). SCR-Screen ships only public test data; users run it on their own models.
- Cost screening is screening-level only and excludes network upgrades; all costs are user inputs.
- The EMT triage lists situations that call for an EMT study; it does not decide whether one is required, and the transmission provider's requirements govern. It finds only what the model contains, so devices modeled as equivalent impedances, and situations a model cannot show, must be answered in the `--poi-info` file.

## Verification

Every formula is covered by automated tests with hand-calculated expected values, run on each change. Independent engineering checks are recorded in [`docs/verification.md`](docs/verification.md).

## Roadmap

**Released**

- **v0.1.0** (October 2026): SCR and WSCR, classical and IEC 60909 short-circuit methods, bus scan, your own networks, cost screening with synchronous condenser sizing and target check, interactive report, SCR-Screen Lite.
- **v0.2.0** (October 2026): WSCR groups in network scans (`--groups`), live group results in the report.
- **v0.3.0** (November 2026): network-aware screening: interaction factors and SCRIF, CSCR, ESCR, suggested groups (`interactions`), N-1 worst case (`--n1`), heat-map shading and N-1 view on the network map.
- **v0.3.1** (November 2026): MVA basis in network scans (NERC's WSCR-MVA and MVA-based CSCR), STATCOMs and other 0 MW devices, per-member group sizes, generator outages in N-1, minimum-generation case (`--gen-out`), MW/MVA switch in SCR-Screen Lite.
- **v0.4.0** (November 2026): EMT study triage: a system strength data sheet per POI (Thévenin R, X, X/R, intact, N-1 and minimum generation) and a priority based on the situations in NERC's 2024 EMT guideline (`triage`, `scan --emt-triage`).
- **v0.5.0** (November 2026): dashboard (`scan --dashboard`): the scan as a one-screen application with views, bus details and Thévenin data; transformer and generator impedances converted to the bus voltage base; verification V6.
- **v0.6.0** (November 2026): group N-1 WSCR, group hosting capacity, interaction factors and editable member sizes; dashboard map that fits the screen with zoom and pan, one chart with intact and N-1 SCR, phone and tablet layout with an All-views menu; every flagged bus pulses.

**Planned** (priorities may change with user feedback; suggest yours in [Issues](https://github.com/ishaibu/scr-screen/issues))

- **Later:** PSS/E `.raw` import, generator retirement and interconnection-queue build-out scenarios, and SCRIF in SCR-Screen Lite.

## Feedback and contributions

Found a bug, have a question, or use SCR-Screen in your work? Please [open an issue](https://github.com/ishaibu/scr-screen/issues). Feedback from utility, ISO/RTO, developer, and consulting engineers is especially welcome.

## References

1. NERC, *Integrating Inverter-Based Resources into Low Short Circuit Strength Systems*, Reliability Guideline, December 2017.
2. NERC, *Short-Circuit Modeling and System Strength*, White Paper, February 2018.
3. Y. Zhang et al., "Evaluating system strength for large-scale wind plant integration," IEEE PES General Meeting, 2014.
4. IEEE Std 1204-1997, *IEEE Guide for Planning DC Links Terminating at AC Locations Having Low Short-Circuit Capacities*.
5. IEC 60909-0, *Short-circuit currents in three-phase a.c. systems*.
6. P. Sharma et al., *Existing Methods for Grid Strength Assessment and Role of Hydropower in Future Grids*, NREL/TP-5D00-94961, National Renewable Energy Laboratory, November 2025.
7. NERC, *Electromagnetic Transient Modeling for BPS-Connected Inverter-Based Resources: Recommended Model Requirements and Verification Practices*, Reliability Guideline, March 2023.
8. Southwest Power Pool, *Planning Session*, ORNL EMT Workshop, August 2023 (screening thresholds).
9. IESO, *Preliminary Connection Guidance for the Long-Term 2 RFP*.
10. AESO, *Connection Requirements for Inverter-Based Resources*.
11. T. Athay, R. Podmore, S. Virmani, "A Practical Method for the Direct Analysis of Transient Stability," *IEEE Trans. PAS*, vol. PAS-98, no. 2, 1979 (IEEE 39-bus system).
12. NERC, *Reliability Guideline: Recommended Practices for Performing EMT System Studies for Inverter-Based Resources*, December 2024.

## How to cite

If you use SCR-Screen in your work, please cite it:

> Ibrahim, S. (2026). *SCR-Screen: open-source short-circuit ratio screening for inverter-based resource interconnection* [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.23130832

This DOI always points to the latest version. To cite a specific version, use its DOI from the [Zenodo record](https://doi.org/10.5281/zenodo.23130832) (v0.5.0: 10.5281/zenodo.24224661; v0.4.0: 10.5281/zenodo.24044098; v0.3.1: 10.5281/zenodo.24025222; v0.3.0: 10.5281/zenodo.23867280; v0.2.0: 10.5281/zenodo.23441700; v0.1.0: 10.5281/zenodo.23130833). GitHub's **Cite this repository** button (right sidebar) also gives APA and BibTeX formats.

## License and author

MIT License. Created and maintained by **Shaibu Ibrahim, P.E.**
