Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Учебники / 0841558_16EA1_federico_milano_power_system_modelling_and_scripting

.pdf
Скачиваний:
82
Добавлен:
08.06.2015
Размер:
6.72 Mб
Скачать

484

22 Visualization Matters

22.2.3Three-Dimensional Plots

Three-dimensional (3D) visualization has been little exploited for power system analysis, although in [348], the advantages of the 3D visualization are discussed and recognized. In [208], rotor speeds of a multi-machine system are displayed in a kind of 3D plot, however the topological information is missing. Reference [93] proposes a variety of 3D visualizations and animations of traveling waves in transmission lines. Finally, [197] proposes 3D animations for visualizing the voltage collapse and undamped oscillation phenomena.

The main issue with 3D plots is how to create a smooth surface that qualitatively captures the “shape” of a set of data (e.g., bus voltage magnitude values). An e ective solution to this problem is to compute the convex hull of a set of points, which “is considered one of the most elementary interesting problem in computational geometry, just as minimum spanning tree is the most elementary interesting problem in graph algorithms” [282]. Using mathematical terms, the convex hull for a set of points X in a real vector space V is the minimal convex set containing X [248].

The idea of convex hull can be easily visualized in two dimensions, i.e., for data sets that lie in the plane. In this case, the convex hull can be thought as an elastic band stretched open to encompass the given object. If released, the elastic band assumes the shape of the convex hull (see Figure 22.2).

Fig. 22.2 2D representation of the convex hull [282]

The convex hull of a set X in a real vector space V certainly exists since X is contained at least in V , which is a convex set. Furthermore, any intersection containing X is also a convex set containing X. This fact, is useful for a mathematical definition of the convex hull. In particular, the Carath´eodory’s theorem states that the convex hull of X is the union of all simplexes with at most n + 1 vertices from X.

A convex hull can be defined for any set composed of points in a vector space. The dimension of the data set can be any. However, the convex hull

22.2 Result Visualization

485

of finite sets of points in a two or three dimensions are the cases of most practical importance.

The determination of the convex hull is an important problem of computational geometry. Several algorithms with various computational burdens have been proposed for a finite set of points [67, 73]. The complexity of the corresponding algorithms is usually estimated in terms of n, of the number of input points, and of the number of points on the convex hull. An open source implementation of algorithms related to the convex hull problem are provided by the qhull project, which is a general dimension code for computing convex hulls, Delaunay’s triangulations, and Voronoi’s diagrams [249].

The problem of finding convex hulls has several practical applications. Fields where the convex hull is widely used include, for example, pattern recognition, image processing, statistics and GIS. Furthermore, several important geometrical problems are based on the determination of the convex hull. For example, just think of the determination of the diameter given a set of points describing a circle is based on the convex hull. In fact, any diameter will always connect to points laying on the convex hull (e.g., the circumference) of the circle.

Example 22.2 3D Visualization of the IEEE 14-Bus System

Figure 22.3 shows a 3D voltage temperature map for the power flow solution of the IEEE 14-bus system. The procedure for obtaining the map is as follows. The 3D plot is obtained using the Mayavi suite for Python [253]. The procedure is practically the same as that described in Example 22.1 except for the last step for which the function mesh of the Mayavi library was used.

An important aspect that is di cult to “feel” from Figure 22.3 is the fact that 3D maps are interactive, i.e., the user can rotate, zoom and manipulate the map. In a 3D map, “peaks” are generally easy to see, while “valleys” can be hidden. However, rotating the 3D map allows viewing the map from all perspectives and creates in the user the impression of “flying” over the power system. Since one can see the map from any point of view, there is actually no part of the map that remains hidden.

22.2.4Geographic Information System

Geographical Information Systems (GIS) are used for visualizing, digitizing and analyzing data by linking geographic locations to information. Geospatial data is used for creating maps, assigning data (or extracting “features”, which is the name given to individual geometrical objects) and performing spatial analysis.

Network operators use GIS for their infrastructure and utilities management and network construction planing. As a part of the network information system, the geographical data of the network is associated with the database of the utility. An interface to enterprise resource planning (ERP) software

486

22 Visualization Matters

Fig. 22.3 Voltage level 3D visualization for the IEEE 14-bus system

may exist for the organization of the resources. Furthermore, network planners often need the GIS data for simulating future planned network assets. In most cases, these two systems are separated and operate independently. The only link is an identification or location reference in a database table.

In summary, a GIS-based power system information platform can provide:

Geographical, topological and schematic representation.

Graphical representation of simulation analysis results.

Cable layout and detailed local area network plan.

Search and query functions.

Live information about the network status.

Recently, the major GIS software houses have being trying to interface power system simulation software. This interface allows only one common and consistent database. For example, a project of EDF Energy and GE Energy for a network planning system comprises of the Smallworld GIS application with an embedded network analysis engine [70]. Other examples are Smallworld and PTI/PSSEngines. All these attempts to combine GIS and simulation tools are proprietary solutions, thus showing all the issues associated with “closed” systems that have to be avoided.

In recent years, several open source GIS applications have reached the required maturity for being used in power system analysis [101, 214, 216, 217, 242, 250, 306, 319]. Open source geospatial libraries are the base of many open-source desktop GIS applications. Since these libraries are distributed as

22.2 Result Visualization

487

extensible open-source code, one can freely use, access and extend the functionality of these libraries by means of plug-ins or script interfaces (Python, Java, etc.).

The quickest way to incorporate a GIS system in a power system application is to create the geographical map using an external open source program and then import GIS data into the power system application. In this way, the programming e ort is reduced to the code necessary for importing the data. Clearly, a necessary condition for implementing the bridge between the GIS application (e.g., OpenJump [217]) and Python is that the GIS application allows creating user-defined data. This is possible only if the GIS software packages is “open”.

As discussed in Script 9.2 of Chapter 9, any device is referenced using unique identification codes (ids). These ids must be assigned to their geometrical representation. For example, the simplest geometrical representation of topological buses is a point type primitive; transmission lines can be represented using polylines, etc.

Example 22.3 Italian System Temperature Map

OpenJump allows exporting topological data in GML format, which is a special XML scheme particularly suited for defining GIS [105]. The GML/XML format can be easily exchanged and parsed by other applications. The next step is to parse the XML file containing the GIS data and assign the topological information to each electrical device. Parsing XML data is rather simple in Python [153].

Fig. 22.4 Bus voltage magnitude map for the Italian HV transmission system. Values in the legend are in pu

488

22 Visualization Matters

4.2 - 6.02

3.35 - 4.2

2.81 - 3.35

2.51 - 2.81

2.18 - 2.51

1.76 - 2.18

1.21 - 1.76 0.87 - 1.21 0 - 0.87

Fig. 22.5 Load active power visualization for the Italian grid obtained using the JML-OSGIS tools. Values in the legend are in pu

Figure 22.4 depicts the Italian 400 kV transmission grid. The system includes 32 generators and 82 loads. The mainland system has been drawn in OpenJump and then parsed using Python. In particular, Figure 22.4 shows a temperature map of bus voltage magnitude levels of a power flow solution. In the maps, generators are represented as blue squares while loads are indicated by green triangles.

The procedure for generating the topological scheme is as follows. The first step is to acquire and generate the geographical information as a data set for the GIS platform. The picture of the geographical layout of the Italian Grid is georeferenced with the help of QuantumGIS to generate the spatial representation of the buses and lines. Then, the bus connections of the lines and the length are analyzed. Finally a GML file is generated. This file holds the geospatial features and attributes of the Italian HV grid. The map of Figure 22.4 was obtained using the Matplotlib library, which allows automatically clipping the map using the border paths.

An entire family of maps can be also generated the other way round, e.g., by importing power flow results into the JML file once the power flow analysis is solved. Figure 22.5 shows an example of the possibilities of the JML format and GIS visualization tools [295].4

4 The picture is courtesy of Mr. Matthias Stifter, arsenal research, Vienna.

Chapter 23

Challenges of Scripting for Power System Education

Most power system software packages are commercial proprietary products that require a generally costly license. This fact is implicitly accepted as normal in the power system community. However, there can be a reliable and costless alternative. This alternative is provided by Free and Open Source Software (FOSS). This chapter shows that FOSS is a valid platform to distribute educational and research-oriented tools for power system analysis as it has proved to be in several other scientific fields.

23.1Concepts and Definitions

In Chapter 3, scripting is presented as an e ective approach for producing open software projects, as opposed to system programming that lead to closed projects. In this section, the concepts “open” and “close” are formalized using commonly accepted definitions.

Software can be divided into three main categories based on the development method: proprietary software, open source software and free software. Free and open source software merges together the common characteristics of free software and open source software. This section introduces concepts and definitions of each type of software development.

23.1.1Proprietary Software

Proprietary software refers to software that has restrictions for its use, modification and, more importantly, restrictions on copying, distributing, and publishing unmodified or modified versions of it. The restrictions are placed by the proprietors of the software and are detailed in the software license. In the U.S., copyright laws provide severe penalties for unlawful distribution of copyrighted material. Reverse engineering of the software could also violate the U.S. Copyright Law or the Digital Millennium Copyright Act [321].

F. Milano: Power System Modelling and Scripting, Power Systems, pp. 489–493. springerlink.com c Springer-Verlag Berlin Heidelberg 2010

490

23 Challenges of Scripting for Power System Education

Proprietary software is also referred as commercial, non-open, or non-free software. Sometimes these terms are considered derogatory, which is actually unintended, due to the fact that terms like freedom and openness are more appealing than their opposites. In [170], the term closed software has been coined to refer to all this type of software and avoid the derogatory misunderstanding.

23.1.2Open Source Software

Open Source Software (OSS) is one that complies with the Open Source Definition (OSD) [63], published by the Open Source Initiative (OSI) [215]. Formed in 1998, OSI is a non-profit corporation created by a group of programmers to promote the adoption of OSS licenses. The OSD gives the criteria to which software wishing to adopt an OSS license must comply with. These criteria are that users must be free to use the software for any purpose, make copies and distribute the software without paying to the issuer of the license, to create derived works and to distribute them without paying royalties, to view and use the source code and to use the open source software in combination with other software including proprietary software.

In summary, open source software permits anyone, anywhere and for any purpose to copy, modify, and distribute the software for free or for a fee. Therefore, anyone has to have full access to the source code.

23.1.3Free Software

Free Software (FS) is software that can be used, studied, and modified without restriction. The term free software was coined by Richard Stallman who founded the Free Software Foundation, its formally defined by the Free Software Definition [100]. One of the most important instances of the definition is that software can be copied and distributed in modified or unmodified form without restrictions. Restrictions may be used only for ensuring that future recipients of the software are guaranteed to copy, study, modify and distribute the software (this is the main di erence with respect to OSS). Moreover, the source code of the software must be made available, and it may be accompanied by a software license. The license should state that the copyright holder permits these acts, or alternatively the software can be released into public domain so that the rights mentioned above automatically hold. The Free Software Foundation maintains a list of Free Software Licenses [103], being the most common the GNU General Public License (GPL) [293].

It is customary to explain the FS concept by saying that the idea is not that the software should be free “as in beer”, or available at no charge, but that it should be free “as in speech”, so that the software can be reviewed and modified.

23.2 Education-Oriented FOSS

491

23.1.4Free Open Source Software

Free Open Source Software (FOSS), also known as Free/Libre Open Source Software (FLOSS), is a merger of the FS and OS concepts focusing on the characteristics for software development and distribution without addressing subtle di erences between the two of them. To this extent, Free Software and Open Source Software are near synonyms. Interested readers can find details on the philosophical background and di erences between FS and OSS in [58, 167, 254, 292].

23.2Education-Oriented FOSS

Software for educational purposes should be user-friendly, easy to use and reliable. In particular, software for power system education should contain an user interface that allows drawing one-line diagrams, displays results and plots time domain simulations. Most proprietary software for power system analysis presents these features (see for example PSS/E [244]). However, proprietary software has two main drawbacks: it needs a costly license and it is generally di cult (if not impossible) to modify models and/or algorithms provided with the software. The first drawback limits the di usion of commercial software in developing countries, while the second issue imposes a severe limitation to the software development by Ph.D. students and researchers.

Opposite to proprietary software, free and open source software provides the user with the freedom of reading, copying, and modifying the source code. It is also possible with FOSS to redistribute the modified code, with the only condition that the resulting program must also be distributed as free and open source software [293]. Despite initial skepticism shown by commercial software houses, a huge number of FOSS projects have been developed and improved thanks to the cooperation of thousands of users. Some FOSS projects have also obtained worldwide success (see for example the Linux, Perl and LATEX experiences).

If applied to the power system academic community, the FOSS approach would allow deploying tools that are suitable for education and research, and at the same time creating a community of learners [292]. From the educational viewpoint, FOSS projects have the drawback of being barely understood by an undergraduate student. Even for Ph.D. students, to be familiar with the details of large C++ or Java projects requires a lot of time, which should be better dedicated to their research topics.

23.2.1Pedagogical Issues

The current generation of students is accustomed to sophisticated software suites that aid academic work via the computer. However, the most serious drawback of proprietary software for educational purposes is to reduce the

492

23 Challenges of Scripting for Power System Education

freedom of the students and to not develop their skill of analyzing results. On the other hand, open source software, while not limiting the user freedom, tends to be less complete and intuitive than proprietary one. Thus, a compromise is needed. Open source software should have a reasonably user-friendly interface and should be written in a simple and high-level programming language (e.g., Octave or Python).

An education-oriented FOSS should merge the positive features of educational software and open source philosophy. Educational free and open source software should have a reasonably user-friendly interface and should be written in a simple and high-level programming language (e.g., Python). Educational software should develop the learning process and the curiosity of the student. In summary, the use of an open source package for education should be preferred for the following reasons.

1.The mind of the student should be opened. The student should not become accustomed to a program that gives all the answers.

2.The learning process should develop the curiosity of the student. Only if the code is open can the student explore all software features.

3.The students should understand that knowledge should be free and available to everyone [292].

23.2.2Failure of FOSS for Power System Analysis

One of the most interesting phenomena of open source software is that users feel involved in the development of the project. Instead of complaining about missing features or bugs, users often contribute suggestions, bug fixes, and even new code [292]. However, this cooperative attitude is not the case of open source projects for power system analysis. The miracle of a rapid growth and community-based development that is typical of most open source projects (for example the Linux case) does not happen in the power system community. This situation is a result of four main issues.

1.The typical users of an open source power system software package are students attending the last year of their undergraduate courses or at the beginning of their Master or Ph.D. program. However, these students are typically not yet experienced enough to write code by themselves.

2.Students attending the last years of their Master or Ph.D. courses are in principle the ideal candidates for contributing with new code. However, in this case, the students are more likely developing their own software tools and uses the open software only as a benchmark or as a store from which getting ideas.

3.Researchers seldom use open source power system software package or contribute new code. The conservativeness (i.e., closed view) of the scientific world is unfortunately a common practice. Furthermore, a surprisingly high percentage of researchers is not aware of the advantages of the “open source” way of thinking.

23.2 Education-Oriented FOSS

493

4.The users of an open source power system software package are a very reduced subset of the total number of university students and researchers. Thus, an open source project aimed to power system analysis cannot be

compared with other open source packages, such as Apache or LATEX, which are used by a broad range of people.

Despite several attempts [199, 200, 326, 327], FOSS projects for power system analysis are still in a very early stage. A generational change is required. The next generation of electrical engineering students should learn to question commonly accepted assumptions and simplifications, should understand the deep, intriguing mechanisms that link modelling and scripting, and should not acritically accept results provided by an opaque proprietary software application. This is a currently open challenge.