Skip to main content
Top

2018 | OriginalPaper | Chapter

2. Python Scripting for DIgSILENT PowerFactory: Leveraging the Python API for Scenario Manipulation and Analysis of Large Datasets

Authors : Claudio David López, José Luis Rueda Torres

Published in: Advanced Smart Grid Functionalities Based on PowerFactory

Publisher: Springer International Publishing

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Abstract

The need to set up and simulate different scenarios, and later analyse the results, is widespread in the power systems community. However, scenario management and result analysis can quickly increase in complexity as the number of scenarios grows. This complexity is particularly high when dealing with modern smart grids. The Python API provided with DIgSILENT PowerFactory is a great asset when it comes to automating simulation-related tasks. Additionally, in combination with the well-established Python libraries for data analysis, analysis of results can be greatly simplified. This chapter illustrates the synergic relationship that can be established between DIgSILENT PowerFactory and a set of Python libraries for data analysis by means of the Python API, and the simplicity with which this relationship can be established. The examples presented here show that it can be beneficial to exploit the Python API to combine DIgSILENT PowerFactory with other Python libraries and serve as evidence that the possible applications are mainly limited by the creativity of the user.

Dont have a licence yet? Then find out more about our products and how to get one now:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Appendix
Available only for authorised users
Footnotes
1
Detailed installation instructions for the Python interpreter are provided in Chap. 19 of the PowerFactory 15 user manual (DIgSILENT PowerFactory Version 15 User Manual, DIgSILENT GmbH, Gomaringen, Germany, 2015). See Sect. 4.1 of this chapter for a discussion on how to manage multiple versions of the Python interpreter simultaneously.
 
2
In Python, the __init__ method of a class is automatically called when the class is instantiated. The line pfsim = PowerFactorySim() causes the __init__ method from Fig. 3 to be called.
 
3
CSV (Comma-Separated Values, csv) are plain text that files store data in tabular form by separating values with commas.
 
4
Python iterables are objects capable of returning their members one at a time. For example, the line for member_object in iterable_object: makes the iterable iterable_object return its members one by one, where iterable_object can be a list, a dictionary, etc.
 
Literature
1.
go back to reference K.J. Millman, M. Aivazis, Python for scientists and engineers. Comput. Sci. Eng. 13(2), 9–12 (2011)CrossRef K.J. Millman, M. Aivazis, Python for scientists and engineers. Comput. Sci. Eng. 13(2), 9–12 (2011)CrossRef
2.
go back to reference S. van der Walt, S.C. Colbert, G. Varoquaux, The NumPy array: a structure for efficient numerical computation. Comput. Sci. Eng. 13(2), 22–30 (2011)CrossRef S. van der Walt, S.C. Colbert, G. Varoquaux, The NumPy array: a structure for efficient numerical computation. Comput. Sci. Eng. 13(2), 22–30 (2011)CrossRef
3.
go back to reference T.E. Oliphant, Python for scientific computing. Comput. Sci. Eng. 9(3), 10–20 (2007)CrossRef T.E. Oliphant, Python for scientific computing. Comput. Sci. Eng. 9(3), 10–20 (2007)CrossRef
4.
go back to reference W. McKinney, Data Structures for Statistical Computing in Python, in Proceedings of the 9th Python in Science Conference, ed. by S. van der Walt, J. Millman (2010), pp. 51–56 W. McKinney, Data Structures for Statistical Computing in Python, in Proceedings of the 9th Python in Science Conference, ed. by S. van der Walt, J. Millman (2010), pp. 51–56
5.
go back to reference F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, E. Duchesnay, Scikit-learn: machine learning in Python. J. Mach. Learn. Res. 12, 2825–2830 (2011)MathSciNetMATH F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, E. Duchesnay, Scikit-learn: machine learning in Python. J. Mach. Learn. Res. 12, 2825–2830 (2011)MathSciNetMATH
6.
go back to reference J.D. Hunter et al., Matplotlib: A 2D graphics environment. Comput. Sci. Eng. 9(3), 90–95 (2007)CrossRef J.D. Hunter et al., Matplotlib: A 2D graphics environment. Comput. Sci. Eng. 9(3), 90–95 (2007)CrossRef
7.
go back to reference P. Kundur, N.J. Balu, M.G. Lauby, Power system stability and control, vol 7 (McGraw-hill New York, 1994) P. Kundur, N.J. Balu, M.G. Lauby, Power system stability and control, vol 7 (McGraw-hill New York, 1994)
8.
go back to reference S. Teimourzadeh, B. Mohammadi-Ivatloo, Probabilistic Power Flow Module for PowerFactory DIgSILENT, in PowerFactory Applications for Power System Analysis, eds. by F.M. Gonzalez-Longatt, J.L. Rueda (Springer International Publishing, 2014), pp. 61–84 S. Teimourzadeh, B. Mohammadi-Ivatloo, Probabilistic Power Flow Module for PowerFactory DIgSILENT, in PowerFactory Applications for Power System Analysis, eds. by F.M. Gonzalez-Longatt, J.L. Rueda (Springer International Publishing, 2014), pp. 61–84
9.
go back to reference B. Slatkin, Effective Python: 59 Specific Ways to Write Better Python (Pearson Education, Mar. 2015) B. Slatkin, Effective Python: 59 Specific Ways to Write Better Python (Pearson Education, Mar. 2015)
10.
go back to reference S. Gupta, R. Kambli, S. Wagh, F. Kazi, Support-vector-machine-based proactive cascade prediction in smart grid using probabilistic framework. IEEE Trans. Industr. Electron. 62(4), 2478–2486 (2015)CrossRef S. Gupta, R. Kambli, S. Wagh, F. Kazi, Support-vector-machine-based proactive cascade prediction in smart grid using probabilistic framework. IEEE Trans. Industr. Electron. 62(4), 2478–2486 (2015)CrossRef
11.
go back to reference P. Zhang, X. Wu, X. Wang, S. Bi, Short-term load forecasting based on big data technologies. CSEE J. Power Energy Syst. 1(3), 59–67 (2015)CrossRef P. Zhang, X. Wu, X. Wang, S. Bi, Short-term load forecasting based on big data technologies. CSEE J. Power Energy Syst. 1(3), 59–67 (2015)CrossRef
12.
go back to reference J. Zhang, C.Y. Chung, Z. Wang, X. Zheng, Instantaneous electromechanical dynamics monitoring in smart transmission grid. IEEE Trans. Industr. Inf. 12(2), 844–852 (2016)CrossRef J. Zhang, C.Y. Chung, Z. Wang, X. Zheng, Instantaneous electromechanical dynamics monitoring in smart transmission grid. IEEE Trans. Industr. Inf. 12(2), 844–852 (2016)CrossRef
13.
go back to reference M. Ozay, I. Esnaola, F.T.Y. Vural, S.R. Kulkarni, H.V. Poor, Machine learning methods for attack detection in the smart grid. IEEE Trans. Neural Networks Learn. Sys. 27(8), 1773–1786 (2016)MathSciNetCrossRef M. Ozay, I. Esnaola, F.T.Y. Vural, S.R. Kulkarni, H.V. Poor, Machine learning methods for attack detection in the smart grid. IEEE Trans. Neural Networks Learn. Sys. 27(8), 1773–1786 (2016)MathSciNetCrossRef
14.
go back to reference R.K. Pandey, S. Kumar, C. Kumar, Development of Cluster Algorithm for Grid Health Monitoring, in 2016 2nd International Conference on Control, Instrumentation, Energy Communication (CIEC) (Jan. 2016), pp. 377–381 R.K. Pandey, S. Kumar, C. Kumar, Development of Cluster Algorithm for Grid Health Monitoring, in 2016 2nd International Conference on Control, Instrumentation, Energy Communication (CIEC) (Jan. 2016), pp. 377–381
Metadata
Title
Python Scripting for DIgSILENT PowerFactory: Leveraging the Python API for Scenario Manipulation and Analysis of Large Datasets
Authors
Claudio David López
José Luis Rueda Torres
Copyright Year
2018
DOI
https://doi.org/10.1007/978-3-319-50532-9_2