Microsoft Word - 1429 Bálint 108.docx HUNGARIAN JOURNAL OF INDUSTRY AND CHEMISTRY VESZPRÉM Vol. 42(2) pp. 97–101 (2014) A NETWORK MODEL FOR SIMULATING THE DYNAMIC BEHAVIOUR OF AN ENERGY DISTRIBUTION NETWORK LEVENTE BÁLINT,1* TIBOR DULAI,2 ÁGNES STARK-WERNER,2 GERGELY APOSTOL,1 AND ÁDÁM TOMPOS1 1 Faculty of Information Technology, University of Pannonia, Egyetem u. 10., Veszprém, 8200 HUNGARY *E-mail: balintlevente.z@gmail.com 2 Department of Electrical Engineering and Information Systems, Faculty of Information Technology, University of Pannonia, Egyetem u. 10., Veszprém, 8200 HUNGARY The aim of this paper is to present the planning and implementation of a network model for an energy distribution network for simulating its dynamical behaviour. The model includes different types of energy sources, distribution centres and consumers. The prepared simulation environment makes it possible to add/remove/modify any type of node – to/form/in the model. Other actions that may be carried out are the initiation/termination of an energy source or change to its production level. The main goal of the simulation is to investigate the effect of an immediate event (such as a power plant failure, decreased production, etc.) on the network and search for the most appropriate substitute possible. The search may happen either on cost bases or time bases. The system created is based on web technology, any user is able to create/save/load his own model and do simulations on it. This work serves as a basis for further work, which involves more complex electrical knowledge and possibilities regarding the network. Keywords: energy distribution network, energy sources, dynamical behaviour, network model, simulation Introduction Energy efficiency has an increasing importance due to cost- and environment-related factors. At the same time, the customer demands have to be satisfied. These circumstances result in a largely heterogeneous energy producing and distributing environment. Renewable energy is applied to a considerable degree in addition to the electricity produced by traditional power plants [1]. This resulted in a system, where different types of energy sources – with different properties, like cost, response time, etc. – are applied in a mixed way. It is a non-trivial task to decide, which sources to apply even in the case of pre-determined demands. Moreover, in practice the amount of the demand appears only when needed. Earlier efforts implemented simulation environments for analysing the effect of the hybrid manner of an electric network [2, 3]. However, the problem becomes more complex when an immediate negative event happens, e.g. an energy source becomes unavailable or has to decrease its output suddenly. The optimal answer depends on many factors: e.g. how quickly a new energy source can be applied or how much it will cost. Moreover, some types of energy sources are only able to produce discrete levels of output power. This paper describes a web-based system, which makes it possible to create and modify an energy distribution network (including different types of energy sources and customers, too) with the goal of simulating different immediate events. The requirements to be collected and the network model and its elements are introduced, followed by details of the implementation and simulation. Requirements: The Desired Properties of the System Functional requirements include mainly the creation and manipulation of network models and simulations. Fig.1 presents the possible applications of the system. The interface contains a tree graph-based model whose root is the power source, the inner nodes are the network stations and the leaves are the consumers. The graph’s edges are the connections between the components. There are multiple projects in the system, each project contains a model. The main functions of the system are available through the modeling and simulation interfaces. During the simulation the components can be switched on and off. After two hours of simulation a statistic diagram can be viewed for each component of the model, showing its consumption or production. Information about components can be edited while the system is not simulating. Next to the functional requirements, the system-related requirements are that: • the system has to be web-based, • no user authentication is needed, • the reaction time is less than 1 s, even if there are 100 users, and • any system or communication failure has to be presented by an unambiguous alert to the user. 98 The Interface The interface of the system contains four important elements. On the upper edge is the modelling control bar with the component adding buttons, background theme switcher and save/load buttons. By pressing the load button, the system opens the project selector. The save button must be pressed before loading another project in order to save the current one. Under the right side of the control bar, there is the simulation control panel. There are buttons on it for editing corporate and residential priority orders, and sliders for the importance of certain properties while calculating the priority order of the power sources. There are buttons for starting, stopping, and restarting simulation time. The simulation time begins at 6:00 am and the step time can be set from 1 to 60 minutes. In the bottom left-hand corner, the event-log is located, which indicates the basic events like start/stop simulation, add/remove components in black and important events like system failure or insufficient power in red. All events have a time-stamp. While hovering the mouse over a component, the system shows the detailed properties of the element. Double clicking selects a component or deletes a connection. While a component is selected, the edit, delete and diagram buttons appear in the modelling control bar. The diagram button works only after a minimum of two hours of simulation. In simulation mode the modelling control bar is hidden and double clicking switches a component on/off. The Network Model and its Elements As the system’s main potential is in handling different types of network nodes and making the investigation of a heterogeneous energy producing and distribution system possible, the elements of the network models and their properties have a huge role. The network nodes can be classified as follows. Energy Sources The system considers renewable energy sources (water, bio, wind, solar, and geo), non-renewable energy sources (natural gas, petrol, coal, nuclear), and quick start-up energy sources (gas turbines) when the energy provided by power plants is insufficient for consumers. Each energy source has a unique name and a maximum output, which defines an upper limit for the source (Fig.2). A minimum output is defined as a lower limit, below that the operation is not profitable. Start-up cost is the cost needed to switch on the source, and start- time is the time required to start producing energy. The operational cost is a financial value which is needed for one hour of operation. Power sources have an environmental multiplier. This multiplier is 1 for renewable sources, 0.2 for non-renewable ones and 0.1 for quick start-up sources by default, but it can be edited any time during the modelling. Larger values are better, the maximum is 1 but the value cannot be 0. The system calculates an order between sources from their start-up cost, operational cost and environmental multiplier. This order can be modified by the user before starting the simulation. Distributing Elements Distributing elements for the system are power plant stations that distribute the energy to multiple network stations that further distribute the energy to retail stations directly transmit the energy to consumers. Distributing stations have only two properties (Fig.3). They have a unique name to identify them and a maximum throughput, which is the maximum power that the station can distribute to lower stations or consumers. If that limit is reached the station will not pick up more power even if the consumers need more. Figure 1: Example uses of the prepared system Figure 3: Edit station properties (Név: name or location, Teljesítmény: power) Figure 2: Edit power source properties (Név: name or location, Bekapcsolási költség: cost of starting up, Indítási idő: start-up time, Üzemköltség: operational cost, Környezeti szorzó: environmental factor, Optimális sorrend: optimal order) 99 Consumers The residential consumers are linked to the model through homes, while corporate consumers include factories, public institutions, etc. Consumers have a rate of consumption that describes their maximum required power. Current consumption is estimated during the daytime in the simulation. Consumers also have an order of priority that can be modified by the user but corporate consumers always have priority over residential consumers (Fig.4). Connections Connections have a length property, which will be used for calculating the loss, dissipated by the cables resistance. Networks can be built up by the previously introduced network nodes by connecting them appropriately. The order of connectivity is as follows: • power sources, • power plant distribution station, • network distribution station, • retail distribution station, and • consumer. Connections can be established only in this order regardless of the performance of individual components. Database and Implementation Details Properties of the network model elements and the network formed are stored in an associative array that can be used directly by the system. At each time it is saved, this array is stored in JavaScript Object Notation (JSON) format in a text file for each project separately. The database array contains an entry for all components of the model. Every component has an ID, a name, a type and position on the modelled field. Energy sources also have a fuel type, start-up time, start-up cost, running cost, environmental factor, and minimum and maximum performance level attributes. Stations have a defined maximum tolerance. For consumers, there is a stored average consumption rate, which dynamically changes over time. Each object has a sub-array, which stores the ID of any other components that are connected to the current one. Consumer objects have priority numbers that define the relevance of the consumer. If the power source cannot produce enough energy to satisfy all needs, then the consumer that has the highest priority number will be switched off from the network. The priority order equals the order of creation of components, but the corporate consumers always have preference. The order can be changed by the user any time in modelling mode and during the simulation. Implementation Details The program is implemented in JavaScript language with plug-ins like jQuery and jsPlumb. The plug-in jQuery is the most popular extension of the JavaScript language. It makes it easier to select, move, remove or modify the elements on the interface by selecting the element by its ID and modifying its properties. The system uses an in-house jQuery plug-in, windows.js. This plug-in creates free movable small windows on the interface and fills them with appropriate content defined by the programmer. The jsPlumb plug-in is an open- source plug-in for JavaScript, created to visually connect elements on the interface with straight lines or Bezier curves. The database is stored in JSON format text files, created and edited by Hypertext Preprocessor (PHP) functions and called asynchronously by JavaScript’s Asynchronous JavaScript And XML (AJAX) protocol. PHP is a server-side scripting language, but in our case its only function is to properly save and load database files to the server computer. The whole software can be started in a browser on the user’s computer and it connects to the server only while loading or saving the project. The interface is fully interactive, in modelling mode the objects can be moved or removed, in simulating mode switched on and off. Simulation Possibilities The system was created for simulating immediate events during the operation of a modelled energy distribution network. After forming the network, the software makes it possible to cause different immediate events. These severe a connection or switch on/off sources, stations and/or consumers. All of these events can be carried out on the graphical interface of the software (Fig.5). The simulation is daytime-based. It starts at 6:00 am. Users can set the step time from 1 min or sec to 60 min or sec. At the beginning the system distributes the energy produced by the power plant(s) to all consumers in a user defined order. If a power plant does not produce enough power then the last consumer will be switched off and so on. The electricity-related behaviour will be implemented in the future into the software. A possible solution is to build an ideal flow model as a cooperative game over a graph with the sources and consumers located at the nodes, each described by a maximum supply or desired demand and the power lines Figure 4: Edit consumer properties (Név: name or location, Fogyasztás: consumption, Prioritás: priority) 100 represented by the edges, each with a given power transmission capacity and admittance value describing their ability to transmit electricity. [4] The user is able to initiate immediate events and the system reacts to them in real-time and recalculates the distribution. Calculation of the consumption rate is based on the Hungarian average with a small random factor. An Example for a Simulation Let us assume that we have a power plant with a maximum power of 100 kW. The model has one of each type of stations, three households (10-10 kW maximum) and a factory (80 kW maximum) (Fig.6). Normally, all of the consumers are satisfied, but in the peak times, when the factory and the houses also approach their maximum consumption, the power will not be enough for every consumer, so the system switches off the retail consumer that is last in the priority order. There will not be a consumption reduction, but a complete shutdown. Subsequently, the plant will have to produce 95% of the maximum power. In this example all of the stations can transfer the maximum of 100 kW, but if a station cannot transfer this, then the consumer with the largest priority number connected to this station will be switched off, regardless of the current level of the power source. If the consumption is too high, it is possible that complete distribution stations are switched off. Further Developments The current system can model and simulate a fictional power network with components and connections, but the main goal of the project is to create a simulating software that can model and simulate a real electrical network. It is important to emphasize that the unit of the power of the sources and the consumption are now only kW. We need to include that the voltage of connection cables depends on the length of the connection and the diameter of the cable that are required to calculate the amperage from the resistance of the cable. International connections transmit 750 kV, and the main network in Hungary transmits 400 kV starting from the power plants (Fig.7). The distribution stations transform and divide it to lower values until the voltage reaches the necessary 250 V for retail and 360 V (or more) for corporate consumers. During the transformations, the system needs to use Kirchhoff’s current law that states that at any node in an electrical circuit, the sum of currents flowing into that node is equal to the sum of currents flowing out of that node. That means that the system has to calculate amperages for every incoming and outgoing connection of the distribution stations based on the consumption of the consumers and the target voltage of the cables. The biggest problem of power distribution networks in reality is to satisfy all consumers at all the time, even if the load is very low, without making large changes to the output of the power sources everyday. The current solution in Hungary is nighttime power. Households using electric water heaters have nighttime electric meters, when the consumption of corporate consumers is drastically reduced. This solution slightly optimizes the operation of power plants. Figure 5: The graphical interface of the software (Új erőmű: new powerplant, Új fogyasztó: new consumer, Új állomás: new station, Új kapcsolat: new connection, Mentés: Save, Betöltés: Load, Lakossági sorrend: order of households, Céges sorrend: order of companies, MaxKöltség: maximum cost, Környezet: environment, Bekaps: start-up, Indulás: begin, Indítás: start, Leállítás: stop, Újraindítás: restart Figure 6: The model of our example (méter: distance in m) 101 Conclusion This paper presented the planning phase and implementation of a web-based system that makes it possible to construct an energy distribution network together with different types of energy sources and consumers. The simulations are carried out to determine the most effective response to different immediate events (e.g. a sudden network problem or failure of an energy source). The simulation takes into account both cost-related and time-related properties, too. The present state of the software provides a basis for further works, which intend to add deeper electricity-related properties and behaviour to the system. ACKNOWLEDGEMENT The authors are thankful for scientific guidance by Prof. KATALIN M. HANGOS from the Computer and Automation Research Institute. We acknowledge the financial support of the Hungarian State and the European Union under the TAMOP-4.2.2.A- 11/1/KONV-2012-0072 project. REFERENCES [1] BREITNER M.H.: Modeling the transformation of the German energy system until 2050: A multi-criteria, long term optimization problem with many constraints, Operations Res. Proc. 2012, 369-374 [2] GEYSEN D., BOOIY P., WARMER C.: A framework for simulation and control of hybrid energy networks, Proc. EnergyCon 2014, Dubrovnik, Croatia, 2014 [3] PADULLES J., AULT G.W., MCDONALD J.R.: An integrated SOFC plant dynamic model for power systems simulation, Int. J. Power Sources 2000, 86, 495-500 [4] CSERCSIK D., KÓCZY L.Á.: Externalities in the games over electrical power transmission networks, IEHAS Discussion Papers, 2011, No 1125 Figure 7: The Hungarian transmission network