- Maintainer: Changgang Li [email protected] from School of Electrical Engineering, Shandong University.
- Documentation: http://steps.drli.group:310
- Date of Readme: August 25, 2019
Simulation Toolkit for Electrical Power Systems (STEPS) is an open source power system simulator designed for balanced large-scale AC-DC hybrid power system analysis.
Currently, it supports powerflow solution and dynamic simulation. In the future, short circuit analysis and eigenvalue analysis will be supported with no timetable.
The data format of STEPS is improved based on PSS/E raw and dyr data format. BPA dat format is also supported.
You are encourage to join us for further development.
- Install Code::Blocks.
- Install C and C++ compiler supprting C++17. GCC is recommended.
- For Unix-like systems, follow guides to install gcc and g++ with the latest version.
- For Windows system, MinGW-64 is suggested.
- Go to http://mingw-w64.org/ and go to its sourceforge download site for the latest version.
- Install 32-bit version or 64-bit version as you like. 64-bit version is recommended.
- Start Code::Blocks, and configure its toolchain exectuable.
- Install Python if you want to try the stepspy module. 64-bit version is recommended. However, if you want to use 32-bit dynamic library of STEPS, you should install Python of the 32-bit version.
- Select Linear Algebra solver to use
- Open STEPS.cbp in the code/ folder with Code::Blocks.
- Go to header/basic/sparse_matrix_define.h. Comment the solver you don't want to use. For example, if you want to keep only c_sparse, comment umfpack and klu.
- Go to source/basic/sparse_matrix_klu.cpp and umfpack.cpp, disable 'compile' and 'link' options of the two files.
- Save STEPS.cbp.
- Compile Linear Algebra solver.
- Open the Linear Algebra solver project. For example, if you choose to use CSparse as default Linear Algebra solver, open csparse.cbp in the code/ folder with Code::Blocks.
- Go 'Project'-'Properties'-'Build targets'and set type as 'static library'.
- Compile CSparse. You should get a libCSparse.a in folder build/bin/Release/.
- Compile CppTest.
- Open cpptest.cbp in the code/ folder with Code::Blocks, set build target as 'static library'.
- Compile CppTest. You should get a libCppTest.a in folder build/bin/Release/.
- Build STEPS
- Open STEPS.cbp in the code/ folder with Code::Blocks.
- Go 'Project'-'Build options'-'Linker settings', and add the libCsparse.a and libCppTest.a library to 'Link libraries'.
- Go 'Project'-'Properties'-'Build Target', and select build target - If you want to compile STEPS as dynamic library, select 'Dynamic library', and set the output file name as 'libsteps.so' for Unix-like systems or 'libsteps.dll' for Windows systems. - If you want to compile STEPS as console application, select 'Console application'.
- If the target is dynamic library, disable 'Link' option for Source files with leading name of 'main'. If the target is console application, enable 'Link' option for only one of Source files with leading name of 'main'.
- Compile the STEPS. You should get the output file in folder build/bin/Release/.
- When compiling in Windows, remove -no-pie and -lgfortran options and remove libKLU.a, libBLAS.a, libUMFPACK.a
Here is a complete procedure of how to build STEPS.
- Compile BLAS as static library. You can find BLAS.cbp in the code/ folder.
- Compile UMFPACK as static library. You can find UMFPACK.cbp in the code/ folder.
- Compile CSparse as static library. You can find CSparse.cbp in the code/ folder.
- Compile CppTest as static library. You can find CppTest.cbp in the code/ folder.
- Compile STEPS as dynamic library or exectuable file. Include libUMFPACK.a, libBLAS.a, libCSparse.a, and libCpptest.a. Put libBLAS.a after libUMFPACK.a.
Dynamic simulator has both parallel and serial version. Typically, the serial version is 2 times faster than the parallel version if paralle number is set to 1. Therefore, in stepspy both parallel and serial library should be provided.
To build serial version, comment the following line in dynamic_simulator.cpp, then build with previous instructions to get libSTEPS.dll or libSTEPS.so:
#define STEPS_DYNAMIC_SIMULATOR_OPENMP
To build parallel version, keep the following line in dynamic_simulator.cpp, then build with previous instructions to get another libSTEPS.dll or libSTEPS.so:
#define STEPS_DYNAMIC_SIMULATOR_OPENMP
Then, you should change libSTEPS to libSTEPS-p, i.e., the library file becomes libSTEPS-p.dll or libSTEPS-p.so.
stepspy is a Python module of advanced APIs of STEPS. It enables most of STEPS applications. It is recommended to use stepspy in Python 3 of 64-bit version, though Python 2 is also supported.
stepspy has been uploaded to pypi.org, and can be installed via:
- pip3 install stepspy
- python -m pip install stepspy
Both parallel and serial library files should be built and copied to the stepspy folder.