Python software for symbolic power system modeling and numerical analysis.
Project description
ANDES
The dynamic simulation engine of the CURENT Large-scale Testbed
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) |
|---|---|
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:
Application Gallery
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
- Documentation with step-by-step tutorials, a modeling guide, and API reference
- GitHub Discussions for questions
- Issue Tracker for bug reports
- Examples
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file andes-2.0.0.tar.gz.
File metadata
- Download URL: andes-2.0.0.tar.gz
- Upload date:
- Size: 8.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3292c44205b27867dd78da40539c79af8684c92850daa5b07e0221006ae1417e
|
|
| MD5 |
c03918133904cd1b7bcfe25f5d15fec8
|
|
| BLAKE2b-256 |
0449ba47e9224edd5495921dcb961fa87d2fbf5a6bc87ce47495235a64c145dc
|
File details
Details for the file andes-2.0.0-py3-none-any.whl.
File metadata
- Download URL: andes-2.0.0-py3-none-any.whl
- Upload date:
- Size: 3.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
565db0ed16be87ad2d33df2717d13231b8b2452f1ec4e9d3978f79f659c88943
|
|
| MD5 |
2670eb1083e2ea201944c60c929a33b5
|
|
| BLAKE2b-256 |
c17fc364e4cf203875c8e438128a0f44ce9d8a7a55062f7dd02a2de9a0aa1100
|