Multilevel Functional-logic Models in 3D-simulators of Electrical Equipment A.L. Safonov1, D.I. Kopeliovich1 safonoval@yandex.ru | dkopeliovich@rambler.ru 1 Bryansk State Technical University, Bryansk, Russian Federation At present, much attention is paid to the training of specialists who operate at responsible and hazardous industries, using various types of benches and simulators. A special place among them is occupied by three-dimensional computer simulators, which are characterized by low cost and sufficient quality of training. The paper presents an approach to developing an integrated control system for computer simulators; its functional chart is proposed. In this work, the problem of modeling complex technical systems taking into account the criteria of complete and realistic modeling and performance is specially noted. There is also an approach to constructing simulators with variable technical object models depending on the target and with a given level of detail. The results of the work were tested in the development of simulators of electrical equipment. Keywords: computer simulators, computer graphics, specialist training, complex technical systems. the speed and lack of delays in the operation of the computer 1. Introduction application largely depends on the properties of 3D models of technical systems. Gaining practical experience in dealing with complex Objects in 3D application development systems can be technical systems is an integral part of training. This is primarily created in different ways: within the environment, by importing connected with hazardous industries, as well as with those where a model, they can have different shapes and complexity, but all errors and accidents can lead to significant economic losses. of them are represented as polygon meshes which is a set of Such activities are characterized by the use of expensive vertices, edges and faces that define the shape of a polyhedral equipment, maintenance and repair of which are also not cheap, object in 3D computer graphics and solid modeling. Objects are for example, the control of oil and gas equipment units, electric colored in certain colors or specially prepared raster objects power facilities, special types of vehicles. (textures) are placed on them with the help of specially written Modern technologies allow to replace the use of full-scale shaders (programs designed to provide vital information about training in testing grounds by training methods in specialized your video card and graphics processor (GPU)). To display a computer systems. The most interesting application for such polygon mesh, it must pass through a video processor for tasks is three-dimensional computer simulators (3D simulators), processing and rendering. which realistically simulate technical systems, form highly Models of complex technical systems consist of a large qualified specialists [1]. number of bodies with different geometries. Often, most of them In open sources, including the market of information contain curved features that require thousands or even more systems, a significant number of computer simulators are elements to be represented by polygon meshes in order to render presented, although the problem of developing realistic the model correctly. simulators has not been fully solved yet. First of all, this is Several approaches can be used to reduce the computational connected with the modeling of complex technical systems, complexity of models [1]: which should be characterized by sufficient detail of objects and 1. Using simple shaders. at the same time have high performance. The paper deals with 2. Visualization technique with different levels of detail the methods of modeling such systems. (levels of detail, LOD). 3. Using MIP (a texturing method that uses multiple copies 2. Simulators of the same texture with different details. The name comes from Early graphic applications were made practically from the latin "mutuum in parvo" which means "much in small"). scratch, now they are developed by means of ready-made tools Professional 3D simulators are widely represented at the (game engine). This allows developers to reduce project time and market. For example, KIT 3D system of Dipol company (Fig.1 improve its quality. shows a simulator operating with power lines), simulators of Along with the availability of a wide range of tools for United 3D Labs company and other solutions [5]. developing 3D-simulators, there are several tasks of their implementation for complex technical systems (for example, electricity generation facilities), which require the development of a methodological approach that takes into account the peculiarities of the subject area, limitations on hardware and software, the possibility of combining with other components in integrated software solutions [4]. The most important issue in developing simulators is the balance of performance/details of the model (price/quality). The main aspects affecting the performance of the model concerning simulators are: 1. Perfection of 3D-engines. 2. Detail level of objects. 3. The quality of developing application logic (algorithm optimality). No matter how advanced is the logic of operating with models meaning its performance in the framework of developing Fig. 1. KIT 3D power line model of Dipol company simulators and how "fast" is the engine on the selected platform, Copyright © 2019 for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). They are made in the form of separate applications, which allows to use all the resources of the computer station, in contrast to the system on the web-platform considered in this paper. For complex models and simulators these systems are demanding of hardware. At the same time, some of the objects of the environment related to the subject matter of the simulator are not presented accurately and fully enough. For example, as Fig. 1 shows, wire fastening to the power line insulators does not match the correct solution with the help of helical ties. 3. Selection of 3D-simulator System Architecture To define the rational architecture of the system, which determines the main ways of interacting its elements, the key point is selecting the target platform of 3D applications (scenes). This will largely affect the properties (capabilities) of both the visual part of 3D simulator and the choice of technologies and methods of interaction with other parts of the system. Evaluation criteria of the target platform are the following: Fig. 2. General system architecture. 1. Ease of control. 2. Restrictions on computing resources (object granularity, At present, there are a huge number of game engines, from number of polygons). GameMaker, Cocos2D, Marmalade to Unity3D and Unreal 3. Memory size limits. Engine [3]. Many issues are not disclosed in official sources, you 4. Graphics restrictions (quantity and quality of textures, need to seek help in the Internet resources. using shaders). Game Maker is more focused on beginners just starting to 5. Networking with the server (possible architecture, develop games. It is rather easy to learn it, but the possibilities of messaging frequency, message size, etc.). Game Maker are limited. 6. Methods of distribution (sales): SaaS-platform, full Cocos2D is optimized for the development of two- packaged type, distribution through app stores (App Store, dimensional games. The engine is not suitable for modeling data Google Play, Amazon). simulators. There is a variant of implementing 3D applications by means With the help of Marmalade such well-known games as of cross-platform supporting, i.e. the possibility to implement "Plants vs. Zombies" and "Godus" were created. One of its most one developed project through several system types. In most significant drawbacks was that the community of Marmalade cases, this is problematic due to the different requirements for specialists is not big. different technologies (specifications, file structure, I/O devices So, among the major alternatives only Unreal and Unity are and product distribution methods). Therefore, in 3-D simulators the most common options for developing 3D applications. project it was decided to focus on one specific option, and in the Unity3D engine was selected for 3D simulators project. future to develop an alternative option involving own free labour The key findings of comparison: force(for example, an option with large highly detailed models, Unity is much easier to learn and understand. C# language is or, on the contrary, one that is easy to use in mobile devices). used for Unity scripting. Below are the options for implementing 3-D simulators Unity is cross-platform, i.e. the same code written in Unity project, which are more or less suitable for it. engine with minimal changes can be transferred to different 1. Mobile devices. platforms (PC, Mac, Android, iOS, Web, game consoles) 2. Personal computer (Windows, Mac, Linux). Unity is widely used by other developers, so there is an 3. Consoles opportunity to get high-quality and fast support and take 4. Web application in web browsers. advantage of a large number of already developed resources. 5. VR (virtual reality environment) Analyzing the features of these platforms and the need to link 4. Development of 3D simulators 3-D simulators project in a single system with other modules In the system of 3D simulators Unity-application is an (training, statistics, administration) we determine to use Web- interactive part of the system, where the user interacts directly platform (players, WebGL) as the main implementation option with the models of technical objects (he trains or performs tasks). with the ability to switch to another platform quickly. The application itself is cross-platform, and in the developed Fig. 2 shows the architecture of the software system, which system this application is a WebGl-package, executed in the is a classic version of 3-level web-system: client-server-data browser environment. The tools of Unity 3D allows to develop a stores. virtual environment, including that one operating within the Game engine is the central software component of computer framework of certain physical laws, and then put into this video games and other interactive applications with graphics environment a user-controlled object giving it the functions of processed in real time. It provides core technologies, simplifies interaction with the surrounding space and objects. development, and often gives the game an ability to run on For example, Fig. 3 presents the model of 110/10 kV several platforms. The game engine includes a whole range of distribution station (Unity-application). applications, including rendering engine (visualizer) for 2D or Here are the principal units of the system: steel structures, 3D graphics, physics engine, sound, animation, artificial elements of operational control (cabinets, control panel), the intelligence, network code, memory control, graphics scenes. building with the equipment. The controls are interactive: there That is, all parts of the code written by programmers for the is a possibility to change the state of objects (turn on/off switches, development of the game are components of the engine [2]. open doors, etc.). 5. Ensuring the Performance of Simulators Using Models of Complex Technical Systems The information model and using the tools of the proposed approach allowed to develop three-dimensional simulators of technical objects: station areas, power lines, etc. However, often training how to work with complex systems requires simulation models, which should ensure maximum compliance with the original objects. For example, power distribution units of electrical stations, control panels, etc. These systems have a large number of relatively small objects, which cannot be ignored or greatly simplified in models for simulators- this will lead to a mismatch with the original and disrupt the Fig. 3. Unity-application with the model of 110/10 kV training process. In such models, with a "direct approach" to modeling, the number of polygons can reach tens of millions, distribution station. which significantly affects the performance of the system, Software development allows to provide for the interaction influencing the time of rendering (frame rendering) and RAM of application objects, including the process logic of simulator used. A slight improvement is achieved by using LOD technology tasks. – a technique in three-dimensional graphics programming, which 3D simulators should provide the formation of competencies, the main of which are: consists in the creation of several hierarchically nested levels of 1. Knowledge of the design of technical systems in the detail of the object, which switch depending on the removal of the object from the virtual camera. subject area. For example, Fig. 5 and Fig. 6 show portal structures with 2. Ability to identify faults in the design and operation modes different levels of detail. Fig. 5 shows a strut type, which uses a of technical objects. 3. Skills of safe operation of hazardous technical systems. plane with a texture lattice structure as vertical struts, and Fig. 6 presents a multi-polygonal strut model. In addition, one can see According to the competencies above, the simulator can the change in the number of elements, in particular sets of operate in one of three modes: insulators when approaching the object. 1. Excursion mode – moving around specific points of the simulator with the demonstration of the main model elements and their detailed description; 2. Inspection mode – free movement of the player (trainee) on Unity scene (technical system models), followed by testing of the objects seen, for example, a list of faults; 3. Practice mode – performing tasks of 3D simulator in real- time. Let us consider the practice mode as the most interesting variant of the system operation. It involves the performance of tasks by trainees and evaluation according to a pre-developed scenario that corresponds to the data model presented in Fig. 4. Fig. 5. Portal structure with low level of detail. Fig. 4. Data model of the simulator (diagram entity- connection). Task performance involves actions in real time, and after completion, checking the list of completed actions and their order in accordance with the options given in the script. Fig. 6. Portal structure with high level of detail. However, in many models of technical systems, the use of standard LOD mechanisms is insufficient to achieve satisfactory system functionality even if all the requirements for the quality of the geometric model are met. In this case, the system of simulators uses a variable /Разьединитель РН-СЭЩ- functional-logic model of a group of objects or their elements 110/Деталь6_005 corresponding to a given function of the simulator. In the logical model (Fig. 7) the introduction of a link between a specific simulator task (Simulator Test) and the elements of the model (Element) is provided. This allows to change the model when performing a specific task of the simulator. Thus, to perform a specific task of the simulator, only a small number of element models that are really necessary are loaded in detail, and the remaining elements are represented by default models. 6. Conclusion The use of the proposed approach allows to develop professional simulators, which model technical systems as realistically as possible. This opens wide opportunities for the formation of professional competencies in the field of technical systems: electricity, oil and gas sector, ad other production branches. The proposed approach to changing 3D models on the basis of not only geometric details, but also the functional-logic model allows to design and use a system of multi-functional 3D simulators of technical systems. The given approach was tested in the project to develop an Fig. 7. Simulator data model taking into account the level of integrated system of training to operate electrical installations, detail of the model elements. performed by JSC "Klinskiy Institute of Safety and Working Conditions" for PJSC "MRSK Severo-zapada", which According to the model, all possible tasks are listed in the components are computer simulators. Training systems are simulator operation mode (task) listing file (xml format) in allowed to form and certify competences in the field of electrical Simulator Tests section. After selecting a task performed by the safety when working with the main types of electrical station simulator, the models of all the elements listed here with the equipment and power lines. specified parameters are updated, indicating the network path to the updated model.. An example of xml data file is shown in 7. Acknowledgments listing 1: Listing 1. An example of xml data file The authors appreciate Klinskiy Institute of Safety and Working Conditions for the methodological and technical Department of Information Technologies. Вывод трансформатора в ремонт 8. References [1] Bunto P.A., Kulikov V.A. Virtual reality tools and operation of industrial facilities. CAD/CAM/CAE [2] O'Conor K. GPU Performance for Game Artists. https://www.gamedev.net/articles/programming/graphics/g pu-performance-for-game-artists-r4632. [3] Pasko D.N. Modern game engines. Innovatsionnaya Nauka. Informatics. 2012. n. 2(38). pp. 78-83. Провода 10 кВ от Т1 к Крун Вкл Rope_Trans1_Razed/Rope_3/