Research and Development of Power System Analysis Software Based on Graphical Interface
2026-04-06 00:20:18··#1
Abstract: This paper discusses the design concept and overall structure of a graphical interface-based power system analysis software, including the interface between the power system analysis software written in FORTRAN and a high-level visualization language. The implementation methods of the graphical module, steady-state analysis module, fault analysis module, and transient analysis module are also presented. Keywords: Graphical interface, power system analysis, calculation, object-oriented software design 1 Introduction The development trend of power systems is towards large-scale systems and large-scale interconnections, resulting in an ever-increasing volume of data to be processed by dispatchers. The operation of the power grid is managed by dispatchers at various levels. Due to the complexity of the power grid structure, dispatchers at all levels must rely on power system analysis software to determine the output of each power plant, how to balance power, how to regulate loads, how to generate electricity most economically, how to transmit electricity most economically, what mode of operation is safest, and anticipate contingency plans, etc. In short, using power system analysis software for calculation and analysis is the most basic and indispensable means of modern power system operation. Traditional power system analysis and calculation software is mostly written in FORTRAN, with data input and output via data files. The format requirements for these data files are extremely strict; even a single error during data entry can lead to drastically different calculation results. It's hard to imagine that in today's advanced computer technology, power system operators and dispatchers still have to analyze power systems by manually filling in and reading data files. Therefore, it is necessary to provide operators and dispatchers with a power system analysis software with a user-friendly interface. Applying visual programming technology to power system analysis and simulation software has become a current trend in power system application software development. 2. Software Overall Structure A fundamental characteristic of graphical user interface (GUI) power system analysis software is its graphical nature. Most user operations can be performed on the graphical interface through mouse clicks and drags, abandoning the traditional methods of filling in, modifying, and reading data files. This software mainly consists of four modules: a graphics module, a steady-state analysis module, a fault analysis module, and a transient analysis module. The overall software structure is shown in Figure 1. The graphics module is responsible for establishing power network diagrams, inputting electrical component data, outputting graphical results of calculations, and outputting stability calculation curves. The steady-state analysis module is responsible for converting the input data of each component into the data format required by the steady-state analysis program, and after the steady-state analysis is completed, converting the steady-state analysis result file into the table and graphical outputs seen by the user. The fault analysis module has similar functions to the steady-state analysis module, and this module also converts the steady-state analysis result file into the input file of the fault analysis program. The transient analysis module converts the input data required for the transient analysis of each component into the data format required by the transient analysis program, converts the steady-state analysis result file into the transient analysis input file, and then converts the calculated result file into the table and curve outputs seen by the user. 3 Implementation of Software Functions 3.1 Design Philosophy In recent years, object-oriented programming (OOP) methods have been introduced into the development of power system software, and this idea has gradually begun to be applied in actual software design, achieving good results. Power systems are composed of various physical components. The relative independence of the attributes of each component and the topological connections between them are particularly suitable for object-oriented management. Various attributes are encapsulated in object classes, which can be used in both the graphical and computational analysis modules. To improve software reusability and extensibility, this software adopts object-oriented design principles. In OOP programs, a program consists of one or more classes that describe a set of objects with common characteristics. Objects are the basic components at runtime in the system, encapsulating attributes and behaviors. "Objects" and "classes" are inheritable and polymorphic, providing a unified interface to the outside world, and can be reused once created. The construction of "objects" and "classes" is the foundation of this program design and the key to achieving software openness. Power systems contain many components, these different types of components have relatively independent attributes, and there are interconnected topological relationships between them. Since various components share some common attributes and methods, a basic component class is first defined as the parent class for all components. The class `CdevElement: public CObject { public: char *m-Name;` defines a class `CdevElement` with the following parameters: `m-Name` is a pointer to a string describing the element's name, and `m-Index` is an integer variable storing the element's identifier within the power grid. This identifier is associated with the database, ensuring the element's uniqueness and facilitating database mapping after instance formation. Various elements are derived from this base class, such as busbars (CBus), lines (Cline), loads (CLoad), circuit breakers (CBreaker), transformers (CTransformer), and generators (CGenerator). Traditional power system analysis software is mostly developed in FORTRAN. These programs have undergone long-term operational validation by dispatchers, making the development of new power system calculation software unnecessary for typical power systems. This software first rewrites the FORTRAN-based steady-state and transient power system analysis calculation programs into subroutines, compiles them into a dynamic link library for Windows within the FORTRAN environment, and then allows a high-level visual language to directly call this dynamic link library. In this way, the power system analysis software written in FORTRAN is perfectly encapsulated within a user-friendly human-computer interface implemented in a high-level visualization language, making full use of existing resources. Simultaneously, the use of dynamic link libraries makes performing multiple calculations simultaneously a remarkably simple task. 3.2 Graphics Module Design: The document class CMycppDoc is defined as a data area storing all the information required for drawing, including: location information, size information, color, line type, network connection relationships, and electrical parameters and calculation information required for steady-state analysis, fault analysis, and transient analysis. This data can be divided into three parts according to its purpose: data for drawing graphics, electrical parameter data, and analysis and calculation data. Based on the different electrical components, the data for drawing graphics and the electrical parameter data are combined and encapsulated into multiple classes. Thus, these classes not only contain this data and information for drawing graphics, but also information representing network connection relationships. Placing the information representing network connection relationships in a chain with the data and information for drawing graphics ensures that once the connection relationships of each component in the graphics are established, changing only the size or position of the component will not affect its connection relationships. In other words, once a connection is established, it will remain unless deleted. 3.3 Design of Steady-State Analysis Module The steady-state analysis module includes three sub-modules: power flow analysis module, network loss analysis module, and static security analysis module. Power flow analysis is the most fundamental content of power systems. Besides its own important role, it is also the basis for network loss analysis, static security analysis, fault analysis, and transient analysis calculations. Its raw data and calculation results are indispensable components of the above analyses. Its task is to determine the operating state of the system based on given operating conditions, such as the voltage (amplitude and phase angle) of each bus, the power distribution and power loss in the network, etc., so as to analyze the operating performance of the system and propose necessary improvement measures. The function of the network loss analysis module is to calculate the active and reactive power losses of lines and transformers based on power flow analysis, and to statistically summarize various results and percentages. The architecture of the network loss analysis module is shown in Figure 2. The function of the static security analysis module is to comprehensively analyze the static operating characteristics of the power grid. The main functions include: analyzing the grid's operating characteristics and power flow distribution after disconnecting one or more components; analyzing the grid's operating characteristics after connecting one or more components; analyzing the grid's operating characteristics after disconnecting or changing the generator's output power; and analyzing the grid's operating characteristics after disconnecting or changing the load power. The module's architecture is shown in Figure 3. 3.4 Fault Analysis Module Design The fault analysis module includes short-circuit analysis and open-circuit fault analysis. Fault analysis can be performed under a given power flow mode or not. The former considers the influence of actual generator potential and load current, while the latter calculates the generator by taking E″=1∠0°. It can calculate simple and complex faults of any fault type at any specified point. The calculation results can be output in tables, and simple faults can be displayed and printed on the network diagram through the graphical interface. The structure of this module is shown in Figure 4. 3.5 Design of Transient Analysis Module The transient stability analysis module is used to analyze the stability of the system synchronous operation after the power system is subjected to various disturbances. It is an important means to analyze accidents, study measures to improve system stability, and design and select reasonable use of the power grid structure. The structure of this module is shown in Figure 5. 4 Software Functions and Features The main function of the power system analysis software based on the graphical interface is to serve as an auxiliary analysis tool for power system dispatchers. The main interface of this software is shown in Figure 6. Compared with other power system analysis software, it has the following main features. (1) All input data such as lines, transformers, generators and loads can be entered by clicking on the components on the network diagram with the mouse to pop up the dialog box, which greatly improves the efficiency and accuracy of input data. (2) The graphic editing function is powerful, including drawing network diagrams, copying blocks, moving blocks, cutting, scaling, selecting graphics and fonts and setting colors. Users can define different fonts, line types and colors of different voltage level buses according to their own requirements, so that drawing graphics is simpler and the picture is more intuitive. The icons of specific power system components, such as lines and transformers, can be folded multiple times, so that the drawn network diagram is more realistic. (3) The parameters of each component can be entered by nominal value, per-unit value, or original parameters of the component, such as the model, length and interface of the line; the percentage of short-circuit voltage, short-circuit loss, no-load loss and no-load current of the transformer. (4) The steady-state analysis results of the whole network can be displayed on the main network wiring diagram, including the voltage, angle of each node, line power flow, generator output, network loss of the whole network, etc. The position of the display results on the main wiring diagram can be adjusted according to the user's needs. The power flow calculation results can be selectively displayed, so that the operation and dispatch personnel can output only the data they are interested in. In addition, the power flow calculation results can also be printed out in tabular form. (5) The network topology can be changed by controlling the opening and closing of circuit breakers, and static safety analysis can be performed by adjusting the output of generators and the size of loads. For components that exceed the limits, the icon will flash red. This makes it convenient for dispatchers to perform static safety analysis on the network. (6) Multiple fault analysis can be performed, and the results can be displayed graphically on the main wiring diagram or printed out in tabular form. (7) Transient analysis results can be output in tabular or curve form, and the output curves are diverse in form. Multiple windows can be opened at once to display multiple curves of different types. (8) This software adopts the object-oriented design concept and has openness, so it is easy to expand new functional modules. 5 Conclusion In summary, the power system analysis software based on the graphical interface has a good human-computer interface. Users can realize most of the functions of the software by simply clicking and dragging the mouse. The software has powerful graphics functions. Users can arrange the network diagram, select the output elements, arrange the position of the output results, and set their line type, color and font according to their own habits. This software has been put into operation in several power grids in Zhejiang and Shandong provinces. Its ease of use and flexibility have been well received by users. This software is an offline power system analysis software. If the software is connected to a real-time database, it can automatically draw network diagrams based on the data in the real-time database, and then perform analysis and calculations, thus realizing online functions. In this way, users do not need to draw network diagrams and input data, further simplifying the work of dispatchers. 6 References 1 Xi'an Jiaotong University. Power System Calculation. Beijing: Water Resources and Electric Power Press, 1978 2 Zhang Xiaoping. Object-Oriented Programming and Its Application in EMS Software. Automation of Electric Power Systems, 1998, 22(5): 72-76 3 Zhou EZ. Object-Oriented Programming, C++ and Power System Simulation. IEEE Trans on Power Systems, 1996, 11(1) 4 Foley M, Bose A et al. An ObjectBased Graphical User Interface for Power System. IEEE Trans on Power Systems, 1993, 8(1)