CASE STUDY

swingbus · Transmission network analysis

AC and DC power-flow solver, N-1 screening and DC-OPF, validated against PYPOWER.

Type
CASE STUDY
Project
swingbus
Status
Open source · v0.1
Updated
2026-11-15
Read time
2 min
Language
EN
PLATE · SWINGBUS · N-1 SCREENINGILLUSTRATIVE
1234567891011121314N-1 SCREEN · ILLUSTRATIVE GRIDOUT L 1–2solvedOUT L 4–7solvedOUT L 2–4solvedOUT L 5–6solvedOUT L 9–14solvedOUT L 7–8solvedOUT L 3–4solvedOUT L 12–13solvedIEEE 118-BUS · FULL N-18.3 msMAX DEVIATION FROM PYPOWER10−13 pu
Illustrative 14-bus network: each branch is taken out in turn, as in an N-1 screen. The two figures on the right are the project’s published results.
In this document
  1. 01 · Problem
  2. 02 · Approach
  3. 03 · Result
  4. 04 · What it shows
  5. 05 · Limitations
  6. 06 · Sources
Contribution
Design, implementation and validation
Period
2026
Tools
Python · NumPy · SciPy · MATPOWER cases

01 · Problem#

Studying a transmission network requires accurate, fast power-flow calculations, in particular to check that the grid withstands the loss of any single element (N-1 criterion).

02 · Approach#

  • AC power flow by Newton-Raphson, fast decoupled and Gauss-Seidel, plus DC power flow.
  • N-1 contingency screening and DC-OPF with nodal prices.
  • Results checked against PYPOWER on every commit, on MATPOWER cases.

03 · Result#

  • Maximum deviation of 10⁻¹³ pu from PYPOWER.
  • N-1 screening of the IEEE 118-bus system in 8.3 ms.

04 · What it shows#

The core of grid studies: power flow, contingencies and dispatch, with systematic validation against a reference tool.

05 · Limitations#

Version 0.1. Screening time depends on the machine used.

06 · Sources#

github.com/akeanti/swingbus

IN 60 SECONDS

Elmehdi Essamit

I build complete systems, from the ESP32 sensor to the power-flow solver, and validate every result against a reference.

Profile
Engineering student, year 1 · EHTP
Looking for
Introductory internship · 1 to 2 months
Period
Summer 2027
Mobility
Morocco or abroad
Languages
Arabic · French · English
Download the CVessamit.elmehdi@proton.meLinkedInFull recruiter page

Search the portfolio