Skip to content

Included test systems

TOPS ships with a few standard test systems in tops.ps_models. Each is a module with a load() function that returns the model dictionary, so it takes two lines to start from one:

import tops.ps_models.ieee39 as model_data
model = model_data.load()

The table is generated from the bundled models when this page is built, so the counts are always up to date.

Module Buses Lines Generators Controllers f [Hz] Description
sm_ib 2 1 2 SEXS (1), TGOV1 (1) 50 One synchronous machine against an infinite bus. The smallest system to experiment with.
sm_ib_kundur 2 1 2 SEXS (1), TGOV1 (1) 60 Machine against infinite bus with a 2200 MVA, 60 Hz machine from Kundur's book.
sm_load 2 1 1 none 50 One synchronous machine feeding a passive load. No controllers.
k2a 11 8 4 SEXS (4), TGOV1 (4), STAB1 (4) 50 Kundur's two-area system, the classic case for inter-area oscillations. Used in the Quickstart.
k2a_val 11 8 4 SEXS (4), TGOV1 (4), STAB1 (4) 50 k2a with the controller settings used to validate TOPS against PowerFactory.
ieee39 39 34 10 SEXS (9), TGOV1 (9), STAB1 (9) 60 IEEE 39-bus (New England) system, based on the PowerFactory version. G1 has no controllers.
ieee39_all_ctrl 39 34 10 SEXS (10), TGOV1 (10), STAB1 (10) 60 ieee39 with AVR, governor and PSS on all ten generators.
n44 44 67 61 none 50 Nordic 44-bus system, a reduced model of the Nordic synchronous grid.
ieee68 68 64 16 none 60 IEEE 68-bus (New England / New York) system. No controllers.

In sm_ib and sm_ib_kundur the infinite bus is a second generator, IB, with a very large inertia, which is why they count two generators.

Controller names are the model types (SEXS exciter, TGOV1 governor, STAB1 stabiliser) with the number of units in brackets.

ieee68

ieee68 does not initialise at the moment: the dynamic initialisation gives NaN because of a singular matrix. The test suite marks it as a known failure. Use the other systems until it is fixed.

Models from JSON files

A model can also be stored as JSON with the same structure as the dictionary. Pass the path to PowerSystemModel. Names of bundled files are found without a path, so this loads the JSON copy of k2a:

import tops.dynamic as dps
ps = dps.PowerSystemModel(model="k2a.json")

Starting your own

The easiest way to build a new system is to copy the module closest to what you need, for example sm_ib.py for a single machine or k2a.py for a multi-machine system, and edit the tables. The Model format page explains the tables.