ANDES Model Development Workflow
Published:
Based on my development experience of ANDES dynamic model, I summarized this guide as a clue for those who want to try ANDES and develop models.
What is ANDES?
ANDES is an open-source Python library for power system modeling and simulation developed by Dr. Hantao Cui. ANDES allows users to develop new models by their own will, which can be easily done by translating block diagrams into models.
The philosophy of ANDES is introduced in:
H. Cui, F. Li and K. Tomsovic, “Hybrid Symbolic-Numeric Framework for Power System Modeling and Analysis,” in IEEE Transactions on Power Systems , vol. 36, no. 2, pp. 1373-1384, March 2021, doi: 10.1109/TPWRS.2020.3017019.
ANDES is currently under ACTIVE development and maintenance by Dr. Hantao Cui.
How to develop new model with ANDES?
Two examples for development new models are available at Development.
Before developing a new model, it is recommended to go through the Model reference and check out the existing groups and their functions. Then the following steps can be followed:
- Make sure you have installed ANDES in development mode.
- Check existing models that are similar to your model, and then draft the diagram of your model. Some standard model references are available on ESIG, Neplan, PowerWorld, and PSSE Model Library.
- When implementing the model, similar function pieces from existing models can help to reduce manual efforts.
- Build your model and finalize it.
- Re-generate the pycode by
andes prep
. Sometimes there occur multi-functionalities, where you may needandes prep -f
to re-generate all model codes. - Create a test case file that includes your model, where the IEEE 14-bus system and Kundur system can be used.
- Load the test case, and run the
ss.TDS.init()
to see if the initialization is successful. If initialization runs into an error, you may need to tune the model initialization equations (v_str
defined in the model). Remember to runandes prep
and restart the kernel (for Jupyter Notebook users) every time you make a change to the model code. - After finishing the model development, it is encouraged to check the code style (can be done by package flake8) and open a PR to contribute it into the ADNES repo.