Skip to content

5-Bus Test System

The 5-bus test system is a minimal power system suitable for learning the STEPSS tools and experimenting with dynamic simulation concepts. It is small enough to trace every computation step while still demonstrating the full simulation workflow, and runs in either edition: in Python as shown below, or in STEPSS GUI, which ships it as a bundled example.

Repository: SPS-L/stepss-5-bus-test-system

One-line diagram of the 5-bus test system
import stepss
import os
# Configure the test case
case = stepss.cfg()
case.addData('dyn.dat') # dynamic model data
case.addData('lf1solv.dat') # power-flow solution
case.addData('solveroptions.dat') # solver settings
case.addDst('nothing.dst') # no pre-defined disturbances
case.addObs('obs.dat') # observables to record
case.addTrj('output.trj') # trajectory output file
# Remove stale output files from previous runs
for f in os.listdir('.'):
if f.endswith('.trj') or f.endswith('.trace'):
os.remove(f)
# Run simulation with exciter setpoint change
ram = stepss.sim()
ram.execSim(case, 0.0)
ram.addDisturb(1.0, 'CHGPRM EXC G Vo 0.05 2') # +0.05 pu step on Vo at t=1 s
ram.contSim(60.0)
ram.endSim()
# Extract and plot results
ext = stepss.extractor(case.getTrj())
ext.getSync('G').P.plot() # active power
ext.getSync('G').Q.plot() # reactive power

The test system files are available in the stepss-5-bus-test-system repository.