0% found this document useful (0 votes)
21 views

Free Simulation Tools

FreeSimulationTools a

Uploaded by

bens082024
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Free Simulation Tools

FreeSimulationTools a

Uploaded by

bens082024
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

21th International Conference on Renewable Energies and Power Quality (ICREPQ’23)

Madrid (Spain), 24th to 26th May 2023


Renewable Energy and Power Quality Journal (RE&PQJ)
ISSN 2172-038 X, Volume No. 21, July 2023

Free Simulation Tools for Power Quality and Grid-Integration of


Renewable Energies Cases
M. Manana∗ , A. Arroyo, R. Martinez, S. Bustamante, A. Laso, E. Sainz

Department of Electrical and Energy Engineering


Universidad de Cantabria, Spain
* E-mail: [email protected]

Abstract. The analysis of Power Quality issues and/or • Generation and demand planning.
the integration of renewable energy into the grid requires • Analysis of the current state of the network and possible
the use of different tools, among which the use of computer contingencies.
simulation applications stands out. The basic objective is • Data acquisition systems, monitoring, and control
to obtain a model of the electrical system under study that (SCADA).
allows for knowledge, with a reasonable degree of preci-
sion, of its behavior under different operating conditions.
The benefits of these tools are manifold, since they allow us 2. Theoretical background
to understand the response of the system, both in transient
and steady-state conditions, to situations that are difficult The field of simulation of electric power systems is classi-
to reproduce in practice: short circuits, failures in gen- cal enough that there exists a significant set of bibliographic
eration, transmission and distribution infrastructures, etc. references. Below are provided some references that can
Additionally, these tools can be used as platforms for opera- help the reader to understand the fundamentals of simulat-
tor training and network planning. Currently, a wide variety ing electric power systems, both in the time and frequency
of commercial tools that are de facto standards can be found domain.
on the market. Some of these tools have a high cost and
cannot be used by students outside the academic environ- • Time domain. [1–5]
ment. In parallel, and thanks to the efforts of the scientific • Frequency domain. [4, 5]
community, simulation tools have been developed that are
available free of cost under several licensing models. This
contribution analyzes some of the available tools, with spe- 3. Grid exchange formats
cial attention to those that are published under several open
source and academic non-commercial software licenses that Although there is no single standardized format for
are available to the academic community free of cost. exchanging information and defining networks in power
system simulators, there are some formats that are recog-
Key words. Computer Simulation Tools, Open-source nized as de facto standards:
Software, Electromagnetic Transients Program, Power Flow
Software CIM-CGMES The Common Grid Model Exchange Spec-
ification (CGMES) is a set of IEC stan-
dard based on the IEC Common Information
1. Introduction Model (CIM). This information model was
designed by TSO data exchanges in appli-
Since the appearance of the first digital computers in the cation devoted to system development and
1960s, the development of tools for simulating power elec- operation.
trical systems has experienced continuous evolution. In the UCTE-DEF The Union for the Co-ordination of Trans-
initial stage, the scarcity of computational resources moti- mission of Electricity Data Exchange Format
vated engineers and scientists to focus their efforts on the (UCTE-DEF) is an exchange format speci-
development of simple models and efficient algorithms. fied by the UCTE with the aim of facilitat-
Furthermore, the capabilities of the machines limited their ing the exchange of grid model among its
use to offline simulation tasks, that is, to design and resource members.
analysis tasks. In that sense, this initial effort has made it XIIDM The iTesla Internal Data Model (IIDM) is a
possible with the current capabilities of computers to use format designed by the iTesla project. The
these tools for real-time control of power electrical systems. aim of this format is not only the exchange
This fact has also allowed them to be used in real- of grid information but also the management
time network operation tasks, which represents a signifi- of simulation results.
cant qualitative change. In this sense, the most common PSS/E This set of formats were defined by Siemens.
management applications are: One of them is the RAW format, that

https://doi.org/10.24084/repqj21.458 718 RE&PQJ, Volume No.21, July 2023


includes a collection of raw data for case Source Code: http://faraday1.ucd.ie/p
definition in power flow analysis. sat.html
IEEE-CDF This format was defined in the 1970s for the
exchange of solved load flow cases[6].
The Power System Analysis Toolbox (PSAT) is a toolbox
for electric power system analysis and simulation written
4. Software Tools in Matlab by Professor Federico Milano [9]. The current
version 2.1.11 can be run in both Matlab and GNU Octave.
The following is a compilation of some of the tools available PSAT is a powerful tool that is available by means of
as free software. This list is not intended to be exhaustive. graphical user interfaces (GUI). The toolbox also provides
Web links to download pages and source code were last a Simulink-based library for network design.
revised as of March 13, 2023. PSAT includes many features:

4.1 MATPOWER • Power Flow.


• Continuation Power Flow.
• Optimal Power Flow.
• Small Signal Stability Analysis.
Website: https://matpower.org/ • Time Domain Simulation.
License: BSD (3-clause) • Complete Graphical User Interface.
Source Code: https://github.com/MATPO • User Defined Models.
WER/matpower • FACTS Models.
• Wind Turbine Models.

MATPOWER [7] is a set of functions written in Mat-


4.4 OpenDSS
lab (M-files) distributed as a open-source under the BSD
license beginning with version 5.1. The package allows
solving steady-state power system simulation and optimiza-
tion problems, such as:
Website: https://www.epri.com/pages/s
• Power Flow (PF). a/opendss
• Continuation Power Flow (CPF). License: BSD
• Extensible Optimal Power Flow (OPF). Source Code: https://sourceforge.net/
• Unit Commitment (UC). p/electricdss/code/HEAD/tree/
• Stochastic, Secure Multi-interval OPF/UC.

4.2 PYPOWER The Open Distribution System Simulator (OpenDSS) is


a simulation tool for electric utility distribution systems
developed by Electrotek Concepts [10]. This tools has been
originally written in Object Pascal using Delphi. Several
Website: https://pypi.org/project/PYP parts have been written in C and C++. It can be used for:
OWER/
License: BSD • Distribution Planning and Analysis.
Source Code: https://github.com/rwl/P • General Multi-phase AC Circuit Analysis.
YPOWER • Analysis of Distributed Generation Interconnections.
• Annual Load and Generation Simulations.
• Risk-based Distribution Planning Studies.
PYPOWER [8] is a solver devoted to Power Flow and • Probabilistic Planning Studies.
Optimal Power Flow. It is a translation of MATPOWER • Solar PV System and Wind Plant Simulations.
from Matlab to Python. Among others, the following fea- • Nuclear Plant Station Auxiliary Transformer Modeling.
tures are included: • Distribution Automation Control Assessment and Pro-
tection System Simulation.
• DC and AC (Newtons method & Fast Decoupled) • Storage Modeling.
Power Flow. • Distribution Feeder Simulation with AMI Data and
• DC and AC Optimal Power Flow (OPF). State Estimation.
• Ground Voltage Rise on Transmission Systems.
In recent years, it has not undergone significant evolu- • Geomagnetically-Induced Currents (GIC).
tion. Efforts have been devoted to updating libraries and • Co-simulation of Power and Communications Net-
dependencies. works.
• Analysis of Unusual Transformer Configurations.
4.3 PSAT • Harmonic and Interharmonic Distortion Analysis.
• Neutral-to-earth Voltage Simulations.

The software can be used by means of a stand-alone exe-


Website: http://faraday1.ucd.ie/psat. cutable windows program and as an in-process COM server
html DLL that can be call from several software platforms as
License: GPL Matlab, Python, C# and R. In addition, OpenDSS also has a
proprietary script language.

https://doi.org/10.24084/repqj21.458 719 RE&PQJ, Volume No.21, July 2023


4.5 PyPSA • Peak Load Management.
• Distributed Generation and Storage.
• Rate Structure Analysis.

Website: https://pypsa.org/ 4.8 PandaPower


License: MIT
Source Code: https://github.com/PyPSA/

Website: https://www.pandapower.org/
The tool Python for Power System Analysis (PyPSA) is License: BSD (3-clauses)
and open source toolbox for the simulation and optimization Source Code: https://github.com/e2nIE
of both power and energy systems [11]. PyPSA is developed E/pandapower
and maintained by the Department of Digital Transfor-
mation in Energy Systems at the Technical University of
Berlin. PyPSA includes many features: PandaPower is an open source tool for power system
modeling, analysis and optimization written in Python as
• Power Flow. a package [15]. The is published under BSD (3-clauses).
• Linear and Security-constrained Linear Optimal Power PandaPower includes many features:
Flow.
• Total electricity/energy system least-cost investment • Power Flow.
optimization. • Optimal Power Flow.
• State Estimation.
4.6 GridCal • Short-Circuit Calculation.

4.9 ATP-EMTP

Website: https://github.com/SanPen/Gr
idCal
License: LGPL Website: https://atp-emtp.org/
Source Code: https://github.com/SanPe License: Proprietary license
n/GridCal Source Code: Not available for general users

GridCal is a tool developed by Santiago Peñate Vera EMTP is a transient electromagnetic simulation program
[12]. GridCal has been written in Python with a Qt GUI. It focused on power systems. Theoretical development is sup-
also has a console Python console that allows some degree ported by pioneering work such as that of H. Dommel
of automation. It is licensed under the LGPL license and [1, 16]. Both ATPDraw (GUI pre-processor) and ATPSolver
includes many features: can be used for both research and teaching free of cost. The
only requirement is to be registered at the EEUG organi-
• Power Flow. zation. In summary, the electrical system is represented by
• Optimal Power Flow and Generation Dispatch. its admittance matrix and solved using the trapezoidal rule.
• MonteCarlo stochastic Power Flow. The combined use of the method of characteristics and the
• Three-phase and unbalanced short circuit. trapezoidal rule allows solving models that integrate both
• Blackout cascading in simulation and step by step concentrated and distributed parameters. Later on, other
mode. scientists such as W. Scott Meyer joined the initial devel-
opment by Professor Dommel. Subsequently, this collective
4.7 GridLAB-D effort involved, among others, A. Ametani, V. Brandwajn,
L. Dubé, J. R. Marti, and A. Semlyen. Nowadays, it is pos-
sible to access this tool for free for academic use thanks to
the EEUG group led by Professor Hans Kr. Høidalen from
Website: https://www.gridlabd.org/ NTNU in Norway. From this original idea of trapezoidal
License: Proprietary license (BSD-style) integration, other commercial variants have been developed
Source Code: https://github.com/gridl which are not included here as they require the payment of
ab-d/gridlab-d licenses:

• EMTDC/PSCAD. Commercial equivalent to ATP/EMTP


GridLAB-D is a distribution level power system simu- that is currently developed and mantained by Mani-
lator designed to allow users to create and analyze smart toba HVDC Research Center (https://mycentre
grid technologies [13, 14]. It is been developed by Pacific .hvdc.ca/).
Northwest National Laboratory (PNNL) in collaboration • DIgSILENT. Includes a commercial equivalent full
with industry and academia through funding from the U.S. EMT-type simulation module (https://www.digs
Department of Energy Office of Electricity Delivery and ilent.de/en/).
Energy Reliability (DOE/OE). GridLAB-D includes many • Simscape Electrical (known in the past as SimPow-
features: erSystems). Commercial tool developed by Math-
Works that is based on a state-space approach for
• Distribution automation Design/Evaluation. solving models that combine electronic, mechatronic,

https://doi.org/10.24084/repqj21.458 720 RE&PQJ, Volume No.21, July 2023


and electrical systems. Its graphical interface is the components. Fig. 2 shows the results for the model shown
well-known Simulink software included in Math- in Fig. 1.
Works’ Matlab (https://es.mathworks.com
/products/simscape-electrical.html).
5. Application example
Fig. 1 shows the ATPDraw [17], that is an ATP GUI Pre-
processor. In this example a controlled rectifier is simulted. This section introduces an example in which the Pan-
daPower library is applied to the analysis of the voltage
profile of a low voltage distribution network that includes
distributed generation (see Fig. 3).

Fig. 1: Analysis of harmonic distortion of a single phase


controlled rectifier in ATPDraw .

Fig. 3: Distribution network with distributed generation .

The basic Python script that defines the case is

import p a n d a p o w e r a s pp

# c r e a t e empty n e t
n e t = pp . c r e a t e _ e m p t y _ n e t w o r k ( )

# create buses
BusMT01 = pp . c r e a t e _ b u s ( n e t , vn_kv = 1 2 . , name= " BusMT01 " )
BusBT01 = pp . c r e a t e _ b u s ( n e t , vn_kv = 0 . 4 , name= " BusBT01 " )
BusBT02 = pp . c r e a t e _ b u s ( n e t , vn_kv = 0 . 4 , name= " BusBT02 " )
BusBT03 = pp . c r e a t e _ b u s ( n e t , vn_kv = 0 . 4 , name= " BusBT03 " )

# create switches
f r o m _ b u s = pp . g e t _ e l e m e n t _ i n d e x ( n e t , " b u s " , " BusBT02 " )
t o _ b u s = pp . g e t _ e l e m e n t _ i n d e x ( n e t , " b u s " , " BusBT03 " )
S w i t c h 0 1 = pp . c r e a t e _ s w i t c h ( n e t , from_bus , t o _ b u s , e t = " b " ,
c l o s e d = F a l s e , t y p e = "DS" , name= " S w i t c h 0 1 " )

# c r e a t e bus e l e m e n t s
r e d 1 = pp . c r e a t e _ e x t _ g r i d ( n e t , b u s =BusMT01 , vm_pu = 1 . 0 0 ,
name= " G r i d C o n n e c t i o n " )
C a r g a 0 1 = pp . c r e a t e _ l o a d ( n e t , b u s =BusBT03 , p_mw = 0 . 1 2 0 , q_mvar = 0 . 0 5 ,
name= " C a r g a 0 1 " )
GeneradorFV01 = pp . c r e a t e _ s g e n ( n e t , b u s =BusBT02 , p_mw = 0 . 1 , q_mvar =0 ,
sn_mva = 0 . 1 2 , t y p e = ’PV ’ , name= ’ GeneradorFV01 ’ )

# c r e a t e branch e l e m e n t s
# T r a f o 0 1 = pp . c r e a t e _ t r a n s f o r m e r ( n e t , h v _ b u s=BusMT01 , l v _ b u s =BusBT01 ,
s t d _ t y p e = " 0 . 4 MVA 2 0 / 0 . 4 kV" , name= " T r a f o 0 1 " )
T r a f o 0 1 = pp . c r e a t e _ t r a n s f o r m e r _ f r o m _ p a r a m e t e r s ( n e t , BusMT01 , BusBT01 ,
sn_mva = . 2 5 , vn_hv_kv =12 , v n _ l v _ k v = 0 . 4 , v k r _ p e r c e n t = 1 . 4 2 5 ,
v k _ p e r c e n t =6 , pfe_kw = 1 . 3 5 , i 0 _ p e r c e n t = 0 . 2 3 7 5 , t a p _ s i d e = " hv " ,
t a p _ n e u t r a l =0 , t a p _ m i n = −2 , tap_max =2 , t a p _ s t e p _ p e r c e n t = 2 . 5 ,
t p _ p o s =0 , s h i f t _ d e g r e e =150 , name= ’ T r a f o 0 1 ’ )
Fig. 2: Time snapshot and harmonic components of a cur-
L i n e a 0 1 = pp . c r e a t e _ l i n e ( n e t , f r o m _ b u s =BusBT01 , t o _ b u s =BusBT02 ,
rent demanded by a single phase controlled rectifier . l e n g t h _ k m = 0 . 1 , s t d _ t y p e = "NAYY 4 x50 SE " , name= " L i n e a 0 1 " )
L i n e a 0 2 = pp . c r e a t e _ l i n e ( n e t , f r o m _ b u s =BusBT01 , t o _ b u s =BusBT03 ,
l e n g t h _ k m = 0 . 1 , s t d _ t y p e = "NAYY 4 x50 SE " , name= " L i n e a 0 2 " )

The results obtained with ATP can be analyzed with pp . r u n p p ( n e t )


programs like XYPlot, a plotting and post-processing tool net . res_bus
developed by Professor M. Ceraolo [18]. XYPlot can be
used for plotting the current waveform and its harmonic

https://doi.org/10.24084/repqj21.458 721 RE&PQJ, Volume No.21, July 2023


Table 1 summarizes the voltage profile and power flow 7. Acknowledgments
results considering that the Switch01 is open. Table 2 pro-
vides the same results considering that the Switch01 is This research was funded by the European Commission
closed. under the Horizon 2020 Program: Project FLEXIGRID with
reference No 864579, H2020-LC-SC3-2019-ES-SCC.
Table 1 Voltage profile with switch 01 opened.
Bus Vm [pu] Va [degree] P [MW] Q [Mvar]
BusMT01 1.0000 0.0000 -0.0331 -0.0523
8. References
BusBT01 0.9859 -0.2669 0.0000 0.0000
BusBT02 1.0250 0.0271 -0.1000 -0.0000 1 H. W. Dommel, “Digital computer solution of electromag-
BusBT03 0.9313 0.5964 0.1200 0.0500 netic transients in single-and multiphase networks,” IEEE
Transactions on Power Apparatus and Systems, vol. PAS-88,
no. 4, pp. 388–399, 1969.
2 W. S. Meyer and H. W. Dommel, “Numerical mod-
elling of frequency-dependent transmission-line parameters
Table 2 Voltage profile with switch 01 closed. in an electromagnetic transients program,” IEEE Transac-
Bus Vm [pu] Va [degree] P [MW] Q [Mvar] tions on Power Apparatus and Systems, vol. PAS-93, no. 5,
BusMT01 1.0000 0.0000 -0.0221 -0.0507 pp. 1401–1409, 1974.
BusBT01 0.9869 -0.1221 0.0000 0.0000 3 J. A. Martinez-Velasco, ed., Transient Analysis of Power
BusBT02 0.9814 0.4405 -0.1000 -0.0000 Systems. Wiley IEEE Press, 2020.
BusBT03 0.9814 0.4405 0.1200 0.0500 4 J. Arrillaga and C. Arnold, Computer Analysis of Power
Systems. John Wiley & Sons, 1990.
5 J. Arrillaga and N. Watson, Computer Modelling of Electrical
Power Systems. John Wiley & Sons, Ltd, 2001.
Fig. 4 and 5 show the network topology and bus voltages 6 W. Group, “Common format for exchange of solved load flow
(in pu) and line loading (in percentage) respectively. data,” IEEE Transactions on Power Apparatus and Systems,
vol. PAS-92, no. 6, pp. 1916–1925, 1973.
7 R. D. Zimmerman and C. E. Murillo-Sánchez, “Matpower,”
Oct 2020.
8 R. D. Zimmerman, C. E. Murillo-Sánchez, and R. J. Thomas,
“Matpower: Steady-state operations, planning, and analy-
sis tools for power systems research and education,” IEEE
Transactions on Power Systems, vol. 26, no. 1, pp. 12–19,
2011.
9 F. Milano, L. Vanfretti, and J. C. Morataya, “An open source
power system virtual laboratory: The psat case and expe-
rience,” IEEE Transactions on Education, vol. 51, no. 1,
pp. 17–23, 2008.
10 R. C. Dugan and T. E. McDermott, “An open source platform
for collaborating on smart grid research,” in 2011 IEEE Power
Fig. 4: Network graph. and Energy Society General Meeting, pp. 1–7, 2011.
11 T. Brown, J. Hörsch, and D. Schlachtberger, “PyPSA: Python
for Power System Analysis,” Journal of Open Research Soft-
ware, vol. 6, no. 4, 2018.
12 S. Peñate Vera, “Practical grid modelling,” 2021.
13 D. Chassin, J. Fuller, and N. Djilali, “Gridlab-d: An agent-
based simulation framework for smart grids,” Journal of
Applied Mathematics, vol. 2014, 2014.
14 D. Chassin, K. Schneider, and C. Gerkensmeyer, “Gridlab-
d: An open-source power systems modeling and simulation
environment,” 2008.
15 L. Thurner, A. Scheidler, F. Schäfer, J. Menke, J. Dollichon,
F. Meier, S. Meinecke, and M. Braun, “pandapower an open-
source python tool for convenient modeling, analysis, and
optimization of electric power systems,” IEEE Transactions
on Power Systems, vol. 33, pp. 6510–6521, Nov 2018.
16 H. W. Dommel, “Electromagnetic transients program,” Elec-
Fig. 5: Bus voltages [pu] and line loading [%] . tromagnetic Transients Program Reference Manual, 1986.
17 H. K. Høidalen, B. A. Mork, F. Gonzalez, D. Ishchenko,
and N. Chiesa, “Implementation and verification of the
hybrid transformer model in atpdraw,” Electric Power Sys-
6. Conclusion tems Research, vol. 79, no. 3, p. 454 459, 2009. Cited by:
27.
18 M. Ceraolo, “Mc’s plotxy. a general-purpose plotting and
The simulation of electrical power systems is a mature
post-processing open-source tool,” SoftwareX, vol. 9, p. 282
discipline that has a large number of free simulation tools. 287, 2019.
Many of these tools are distributed under open software
licenses as GPL, LGPL, BSD and MIT, so that it is possible
for researchers to access the source code to study and mod-
ify it to suit their specific needs. In this article, several tools
have been reviewed, comparing their characteristics, license
type and source code availability. Table 3 summarizes this
comparison.

https://doi.org/10.24084/repqj21.458 722 RE&PQJ, Volume No.21, July 2023


Table 3 Comparison of Free Power System simulation tools (adapted from [15]).

MATPOWER

PYPOWER♦

GridLAB-D

ATP/EMTP
OpenDSS

GridCal
PyPSA
PSAT
Graphical User Interface X4 X X X
Time-domain X X
Frequency domain X X X X X X X X
Loads (constant Z, constant I, constant P) X X X X X X
Lines X X X X X X X X X
2-Winding Transformer (π model) X X X X X X X X X
2-Winding Transformer (T model) X X X X X X
3-Winding Transformer X X X X X
DC lines X X X X X X X
Ideal Switches X X X
Votage-controlled sources X X X X X X X X X
Static Load / Generation X X X X X X X X X
Shunt impedance X X X X X X X X X
Asymmetrical Impedance X X X
Ward equivalent (Combination of impedance and PQ loads) X X X
Storage Units X X X X X
Source code: Matlab X X X
Source code: Python X X X X X
Source code: Delphi X
Source code: C and C++ X X
Source code: FORTRAN X
BSD License X X X X
GPL X
LGPL X
MIT X
Proprietary license X X X
SCOPUS references 471 11 2,132 639 33 - 179 42 2,110
IEEEXplore references 310 8 627 457 9 - 134 25 784
(♦) Python version of MATPOWER.
(4) GUI based on MATLAB & Simulink.

https://doi.org/10.24084/repqj21.458 723 RE&PQJ, Volume No.21, July 2023

You might also like