ANDES

Power system transient dynamics simulation with symbolic modeling and numerical analysis.
https://github.com/CURENT/andes

Category: Energy Systems
Sub Category: Energy System Modeling Frameworks

Keywords

analysis andes eigenvalue-analysis library modeling-dae package power-system power-system-analysis power-system-dynamics power-system-simulation powerflow simulation small-signal timedomain tool toolbox

Keywords from Contributors

power-systems cim power co-simulation curent curent-ltb geo-visualization power-grids simulation-framework

Last synced: 30 minutes ago
JSON representation

Repository metadata

Python toolbox / library for power system transient dynamics simulation with symbolic modeling and numerical analysis 🔥

README.md

ANDES

The dynamic simulation engine of the CURENT Large-scale Testbed

PyPI
Conda
Documentation
License: GPL v3

ANDES is an open-source Python package for power system modeling and
simulation. It supports power flow, time-domain simulation (transient
stability), eigenvalue analysis, continuation power flow, and state
estimation.

Quick Start

pip install andes       # or: conda install -c conda-forge andes
import andes

ss = andes.load("ieee14.raw", addfile="ieee14.dyr", setup=False)
ss.add("Fault", bus=2, tf=1.0, tc=1.1)       # three-phase bus fault
ss.setup()

ss.PFlow.run()                                # power flow
ss.TDS.run()                                  # time-domain simulation
ss.TDS.plt.plot(ss.GENROU.omega)              # plot generator speeds

Five lines from a PSS/E case file to a transient stability plot:

What ANDES Provides

Five analysis routines.
Power flow (Newton-Raphson), time-domain simulation (implicit trapezoidal),
eigenvalue analysis, continuation power flow for voltage stability limits,
and state estimation.

Over 100 dynamic models.
Synchronous generators (GENROU, GENCLS), turbine governors (TGOV1, IEEEG1,
HYGOV), exciters (EXST1, ESST3A, SEXS, AC8B), stabilizers (IEEEST, ST2CUT),
second-generation renewable models (REGCA1, REECA1, REPCA1, WTDTA1),
distributed energy resources (PVD1, ESD1), and dynamic loads (ZIP, FLoad),
with full implementation of limiters, saturation, and time constant zeroing.

PSS/E data compatibility.
ANDES natively reads PSS/E RAW and DYR files, MATPOWER cases, and its own
JSON and Excel formats. Once a dynamic model is implemented, its PSS/E DYR
input is automatically supported.

Scripting and extensibility.
Built for Python workflows: load cases, sweep parameters, modify topology,
and extract results in NumPy arrays or Pandas DataFrames. A Gymnasium-compatible
reinforcement learning environment is available for power system control
research.

Performance.
A 20-second transient simulation of a 2000-bus system completes in seconds
on a typical desktop computer, with optional Numba JIT compilation.

Verification

ANDES has been verified against DSATools TSAT and Siemens PSS/E on standard
test systems. The NPCC 140-bus case (GENROU, GENCLS, TGOV1, IEEEX1) produces
results identical to TSAT. The WECC 179-bus case (GENROU, IEEEG1, EXST1,
ESST3A, ESDC2A, IEEEST, ST2CUT) shows close agreement across all three tools.

NPCC 140-Bus (ANDES vs. TSAT) WECC 179-Bus (ANDES vs. TSAT vs. PSS/E)
NPCC WECC

Full verification notebooks with side-by-side comparisons are available in the
documentation.

Symbolic Modeling Framework

Models in ANDES are defined as mathematical equations in Python. The framework
automatically generates optimized numerical code, analytically derived Jacobian
matrices, and LaTeX documentation from the same source. What you simulate is
what you document.

The following is the complete implementation of the TGOV1 turbine governor.
Reusable transfer function blocks (LagAntiWindup, LeadLag) and discrete
components (limiters, deadbands) are provided in the ANDES library.

class TGOV1Model(TGBase):
    def __init__(self, system, config):
        TGBase.__init__(self, system, config)

        self.gain = ConstService(v_str='ue/R')

        self.pref = Algeb(v_str='tm0 * R',
                          e_str='pref0 * R - pref')
        self.wd = Algeb(v_str='0',
                        e_str='ue * (omega - wref) - wd')
        self.pd = Algeb(v_str='ue * tm0',
                        e_str='ue*(- wd + pref + paux) * gain - pd')

        self.LAG = LagAntiWindup(u=self.pd, K=1, T=self.T1,
                                 lower=self.VMIN, upper=self.VMAX)
        self.LL = LeadLag(u=self.LAG_y, T1=self.T2, T2=self.T3)

        self.pout.e_str = 'ue * (LL_y - Dt * wd) - pout'

ANDES generates documentation from this definition, including parameter
tables, variable listings, and rendered equations:

The documentation includes worked examples covering:

  • Forced oscillation source localization
  • Critical clearing time sweeps
  • Low-inertia frequency response analysis
  • Reinforcement learning for oscillation damping
  • and others ...

Browse the full gallery at
docs.andes.app.

Resources

Citing ANDES

If you use ANDES for research or consulting, please cite the following paper:

H. Cui, F. Li and K. Tomsovic, "Hybrid Symbolic-Numeric Framework for Power
System Modeling and Analysis," IEEE Transactions on Power Systems, vol. 36,
no. 2, pp. 1373-1384, March 2021, doi: 10.1109/TPWRS.2020.3017019.

Sponsors

ANDES was developed at the
CURENT Engineering Research Center at the University
of Tennessee, Knoxville, with support from the National Science Foundation
(NSF Award EEC-1041877), the Department of Energy Office of Electricity, and
the CURENT Industry Partnership Program.

See contributors for
the full list.

License

ANDES is licensed under the GPL v3 License.

Citation (CITATION.bib)

@article{andes_2021,
  author  = {Cui, Hantao and Li, Fangxing and Tomsovic, Kevin},
  journal = {IEEE Transactions on Power Systems},
  title   = {Hybrid Symbolic-Numeric Framework for Power System Modeling and Analysis},
  year    = {2021},
  volume  = {36},
  number  = {2},
  pages   = {1373-1384},
  doi     = {10.1109/TPWRS.2020.3017019}
}

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 3 days ago

Total Commits: 4,387
Total Committers: 23
Avg Commits per committer: 190.739
Development Distribution Score (DDS): 0.139

Commits in past year: 177
Committers in past year: 3
Avg Commits per committer in past year: 59.0
Development Distribution Score (DDS) in past year: 0.023

Name Email Commits
Hantao Cui c****o@g****m 3779
jinningwang j****m@g****m 327
Jinning Wang j****g@j****u 99
ZQW q****1@v****u 35
zaidmahmood z****d@o****u 28
Josep Fanals j****3@g****m 26
treymingee v****1@v****u 21
Jinning Wang j****g@J****l 18
Jinning Wang j****g@j****l 14
Christoph Lackner l****c@r****u 12
buaaqq x****1@g****m 8
Ahmad Ali a****i@o****u 4
Uriel Sandoval s****f@g****m 3
Wei 5****3 3
Will Schmitt w****s@a****m 2
J-K-Peng j****g@h****m 1
Muhammad Yasirroni 4****i 1
Richard Lincoln r****n@g****m 1
isilber i****r@g****m 1
ASUS\Evan e****5@v****u 1
pyup-bot g****t@p****o 1
saima s****m@o****u 1
unknown j****3@g****m 1

Committer domains:


Issue and Pull Request metadata

Last synced: 3 days ago

Total issues: 44
Total pull requests: 132
Average time to close issues: 2 months
Average time to close pull requests: 13 days
Total issue authors: 20
Total pull request authors: 13
Average comments per issue: 3.34
Average comments per pull request: 2.55
Merged pull request: 101
Bot issues: 0
Bot pull requests: 0

Past year issues: 6
Past year pull requests: 4
Past year average time to close issues: 9 days
Past year average time to close pull requests: 3 months
Past year issue authors: 6
Past year pull request authors: 2
Past year average comments per issue: 3.5
Past year average comments per pull request: 2.0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/CURENT/andes

Top Issue Authors

  • jinningwang (21)
  • cuihantao (3)
  • xiaojiangsi (2)
  • MaKla89 (2)
  • jd-lara (1)
  • Cmt111 (1)
  • carlpaten (1)
  • sjaideep1729 (1)
  • rodrigomha (1)
  • gky0302 (1)
  • seedpower (1)
  • mkschleg (1)
  • willjschmitt (1)
  • JieFeng-cse (1)
  • kornerc (1)

Top Pull Request Authors

  • jinningwang (56)
  • cuihantao (45)
  • zaidmahmood (13)
  • aaliqureshi (6)
  • J-K-Peng (2)
  • zilinzhuang (2)
  • weigao-123 (2)
  • yasirroni (1)
  • JosepFanals (1)
  • RyanVaughan (1)
  • SaimaAlamOSU (1)
  • rwl (1)
  • seedpower (1)

Top Issue Labels

  • bug (20)
  • enhancement (12)
  • low-priority (5)
  • webapp (1)
  • later (1)
  • models (1)
  • help wanted (1)

Top Pull Request Labels

  • ready to merge (4)
  • bug (4)
  • enhancement (3)

Package metadata

proxy.golang.org: github.com/curent/andes

  • Homepage:
  • Documentation: https://pkg.go.dev/github.com/curent/andes#section-documentation
  • Licenses: other
  • Latest release: v2.0.0+incompatible (published 5 months ago)
  • Last Synced: 2026-08-12T13:57:43.460Z (1 day ago)
  • Versions: 97
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent packages count: 5.401%
    • Average: 5.583%
    • Dependent repos count: 5.764%
pypi.org: andes

Python software for symbolic power system modeling and numerical analysis.

  • Homepage: https://github.com/curent/andes
  • Documentation: https://docs.andes.app/
  • Licenses: GPL-3.0-or-later
  • Latest release: 2.0.0 (published 5 months ago)
  • Last Synced: 2026-08-12T13:57:43.613Z (1 day ago)
  • Versions: 112
  • Dependent Packages: 2
  • Dependent Repositories: 2
  • Downloads: 3,881 Last month
  • Rankings:
    • Dependent packages count: 7.31%
    • Downloads: 11.366%
    • Dependent repos count: 11.798%
    • Average: 14.722%
    • Stargazers count: 20.382%
    • Forks count: 22.751%
  • Maintainers (1)

Dependencies

.github/workflows/pythonapp.yml actions
  • actions/checkout v1 composite
  • actions/setup-python v1 composite
  • pypa/gh-action-pypi-publish master composite
docker/Dockerfile docker
  • debian latest build
pyproject.toml pypi
  • chardet *
  • dill *
  • ipywidgets *
  • kvxopt >=1.3.2.0,<1.4
  • matplotlib *
  • numpy *
  • openpyxl *
  • pandas *
  • pathos *
  • pyyaml *
  • scipy <2
  • sympy >=1.6,!=1.10.0
  • texttable *
  • tqdm *
  • xlsxwriter *

Score: 17.36163518548981