Automatic method of preparation of data for setting the model of the electric network mode when constructing the mnemonic diagram of the object for the simulator

The article is devoted to an automatic data preparation method for setting up a distribution network model, which is used to develop training tasks for distribution network personnel. The main goal in creating the method is to reduce the time for developing a simulator task by leveling the human error during the stage of filling in the structural data of the distribution network components. To interact with the automatic method and the already pre-created component library that was used in the previous method, it was necessary to change the internal structure of the double winding and three winding transformer components. Also, a new structural component was added to the library – Connection. The program algorithm of the automatic method consists of three cycles that go through all the components transferred from the library to the distribution network model. For a better understanding and perception of textual information about each cycle, a graphical representation of cycle process diagrams is presented. In conclusion, information is provided on the time spent when creating a task with manual data preparation and the developed automatic one, as well as suggestions to reduce computer resourced used during model run.


Automatic method of preparation of data
Rapid advances in technology have also affected the energy industry.In the components of energy distribution networks, characteristics and properties change dynamically, and the networks themselves undergo frequent changes in the number of components and structural changes.Given these changes, employees need to learn new knowledge and test current skills.The lack of skills and lack of qualifications of personnel in this area threatens the safety of people and the failure of networks [1,2].Accordingly, it was necessary to speed up the process of developing simulator tasks, as well as take into account innovations in the energy sector [3].Significant results in this matter have been achieved with the help of the distribution network model.
The distribution network model is a program that was created using a graphical editor that contains a graphic field and a library of distribution network components with which it is possible to create a mnemonic diagram model that will completely duplicate the existing distribution network.The model can be run on any device with the Windows operating system, which is beneficial from an economic point of view [1,[4][5][6].The model of distribution network modes does not require the presence of a programmer at the task development stage, since all the processes that require the programmer's work (calculation of current or voltage values, mode switching, functions of the distribution network components) were done before the task development stage [7][8][9].Previously, the task was developed simultaneously by a programmer and an energy specialist who does not have programming skills, which significantly slowed down the development.A specialist in the energy field can contact a programmer to add a new distribution network component by providing the necessary technical documentation about the component.The new component will be added to the library from the next version of the model, and the developer of simulation tasks will be able to use the new components to train personnel.
At the stage of preparing data for calculating the model of the distribution network, initially, the developer manually enters the structural parameters (number of copies of components, branch indices).The main disadvantage of this method of preparing mode model setting data is the possibility of errors when entering this data.These errors can occur if the task developer copied a ready-made parameter, pasted it, but forgot to change the value to the required one.Therefore, several parameters will have the same values of node numbers or branch indices, which will lead to an error in calculating the mode values.It can take a long time to find invalid parameter values.An error in the calculation of modes makes this training task irrelevant in the process of training the personnel of the distribution network, which leads to a decrease in the competence of the personnel.Therefore, it was decided to develop a new data entry method that would eliminate the human factor in the process of entering structural parameters.This method has been called the automatic data entry method for setting up the mode model.Unlike manual preparation, in automatic preparation, a copy of the node component receives its number in the process of adding it to the mimic (the copy that was added first gets number 0, the copy that was added second gets number 1, etc.).

Library of components
As in manual data preparation, the automatic one uses a library of distribution network mnemonic diagram components, which is created by graphical editor.The library contains the following components (figure 1):

Double winding and three winding transformers
When mimic diagram components were transferred from manual to automatic data preparation, the double winding transformer and three winding transformer components had a problem with assigning a number to the transformer nodes and assigning an index to the transformer branches.This issue has been fixed by adding transformer Nodes and transformer Branches inside transformer component copies.Unlike ordinary branches and nodes, transformer ones have a technological one -the transformation ratio parameter.Also, transformer branches are not visible on the mnemonic diagram, as they are located in the inner layer of the transformer [10,11].In transformers, it is possible to set technological parameters, such as conductivity and transformation ratio [11,12] (figure 2).

Connection
The connection component performs the function of transferring the structure parameter from node or branch copies to voltage or current output component copies.When constructing a mnemonic diagram, a copy of the connection component must be placed so that one end of the line enters the node or branch, and the other end of the line must enter the instance of the voltage or current output (figure 3) [13].If this condition is not complete, the transfer of the structural parameter does not occur and the output will show an incorrect result (the value will be permanently equal to 0).

Construction of a mnemonic diagram
After getting acquainted with the modified library of components, the developer of the training task can proceed to the construction of a mnemonic diagram.This process is shown in figure 4.
A visual representation (specification) of this process and three cycles of data preparation was created using Bizagi, based on the BPMN 2.0 standard.thisstandard is often used to represent program process [14][15][16].The following components are used from this standard [17,18]: • Data Object -data array • Start Event -start of the process of constructing a mnemonic diagram • User Task -task performed by the developer of the training task [19] • Inclusive Gateway -gateway with condition.Depending on the fulfillment of the condition, the branching of the process depends • End when message is send • Start when message is received • Sub Processes -task that contains other tasks • Service Task -a task that is performed automatically • End Event -completion of the mode calculation model process The first step the developer selects from the component library is the component copies necessary to construct the mnemonic diagram.Unlike manual provisioning, in automatic, the developer does not need to set structural parameters, since the program automatically assigns structural parameters after the program starts.After adding and placing all the components on the mnemonic diagram and filling in the technological parameters for copies of the mnemonic diagram components, the program must be started.The next step is the automatic preparation of structural parameters and links.The last step is the mode calculation model, in which the value of voltages and currents is mathematically calculated.After each switching, the value of currents and voltages is recalculated [7][8][9]20].

First loop through component copies
The Service task of preparing structural parameters and links consists of three cycles.In each of the cycles, structural parameters are assigned to the copies of components.Using the function of browsing all copies of the mnemonic diagram components, the process of reading the type of the mnemonic diagram component is in progress.While browsing all the components, the array of components is filled.After the array is filled, it loops over it.On the first iteration, the nodes, node buses, and transformer nodes of the mnemonic diagram are automatically assigned unique numbers and displayed on the mnemonic diagram.The switch and disconnector component copies are set to state.These components can be in two states: 1 (disabled) and 2 (active).The developer can change the state by clicking the left mouse button on the component copy (figure 5).

Second loop through component copies
In the second cycle, the component copies: capacity of node, branch, transformer branch, line, are automatically assigned structural parameters.Numbers are assigned to capacity of node, and indexes are assigned to branches, transformer branches and lines.The capacity of node number duplicates the number of the host node.The value of the index parameter depends on the numbers of nodes that are between the branch or line.Further, the structural parameters are entered into the adjacency list, and the links to the components into the link array (figure 6).

Third loop through component copies
The third iteration through the component array begins by assigning indexes to the switch, disconnector, and current pointer component copies.The index of these components duplicates the index of the placement branch.The direction of the pointer is also automatically set by readout the direction of the mains current.The last process in the third cycle is the transfer of the structural parameter of the current or voltage output copies using the connection component (figure 7).

Conclusions
The disadvantage of the automatic method of preparing data for setting up the mode model is the increase in the time for placing component copies on the mnemonic diagram in comparison with manual preparation.This increase in time is due to the addition of a new communication component and its location on the mnemonic diagram.An error of incorrect placement of a connection component is easier to notice than an error when filling in structural parameters.The average time to fix this error is 7 seconds, but the average time to find this error is 2 seconds, and unlike the structural data filling error, there is no need to check the "Properties" menu and Technological components • Double winding transformer • Three winding transformer • Switch • Disconnector (iii) Output Components • Current pointer • Node load power pointer • The field for outputting the value of the load current of the node • Voltage value output field • Current value output field For automatic preparation, the following components of the mnemonic diagram have been changed: Double winding transformer and a three winding transformer.Also, a new structural component was added to the mnemonic diagram component library -a connection.

Figure 1 .
Figure 1.An example of a fragment of a mnemonic diagram of a distribution network.

Figure 2 .
Figure 2. Inner layers of double winding and three winding transformers.

Figure 3 .
Figure 3. Visual view of the Connection component.

Figure 4 .
Figure 4. Visual The process of constructing a mnemonic diagram, preparing parameters, links and a mode calculation model.

Figure 5 .
Figure 5. First loop through component copies.