UDC 004.8 Malykhina G.F., Guseva A.I., Militsin A.V., Nevelskii A.S. Peter the Great St.Petersburg Polytechnic University, Saint-Petersburg, Russia DEVELOPING AN INTELLIGENT FIRE DETECTION SYSTEM ON THE SHIPS Abstract The objective of the study is the development of an intelligent fire-fighting multi-sensor system for sea-going vessels. The system has a set of sensors for measuring temperature, carbon dioxide concentration, carbon monoxide and smoke concentration, which provide early detection of a fire. For rapid deployment and higher flexibility, the sensors are connected using a wireless Thread interface that allows devices to communicate at three levels of ISO. The algorithm implemented in the computational block makes a decision about the presence and type of ignition based on the neural network, which continuously analyzes the information received from the set of sensors. The correctness of the solution depends on the number of sensors and their location in the space of the room. To optimize the location of the sensors, a genetic algorithm is proposed, the objective function for which is the detection time of the ignition. Complexity of the description of premises on sea vessels, types of ignitions and their localization leads to expediency of application of a modeling method. A model of ignition in the vessel's premises is developed on the basis of the Navier-Stokes equations. Modeling of fires of several types of materials: rags, gasoline, oil, diesel fuel, electric cables was carried out in the supercomputer center of the Peter the Great Polytechnic University. The supercomputer is capable of performing up to 1.2PFLOPS. The supercomputer consists of two independent computing systems "RSC Tornado cluster system" and massively parallel "RSC PetaStream". The simulation results are used to form the objective function of the genetic algorithm when optimizing the location of the sensors in the ship's room. Keywords Modeling a fire; FDS; genetic algorithm; neural network; fire detect; multicriterial sensors. Малыхина Г.Ф., Гусева А.И., Милицын А.В., Невельский А.С. Санкт-Петербургский политехнический университет Петра Великого, г. Санкт-Петербург, Россия РАЗРАБОТКА ИНТЕЛЛЕКТУАЛЬНОЙ ПРОТИВОПОЖАРНОЙ СИСТЕМЫ ДЛЯ МОРСКИХ СУДОВ* Аннотация Целью исследования является разработка интеллектуальной противопожарной мультисенсорной системы для морских судов. Система имеет множество сенсоров для измерения температуры, концентрации углекислого газа, окиси углерода и концентрации дыма, которые обеспечивают раннее обнаружение возгорания. Для быстрого развертывания и большей гибкости сенсоры подключены с помощью беспроводного интерфейса Thread, который обеспечивает взаимодействие устройств на трех уровнях ISO. Алгоритм, реализуемый в вычислительном блоке, принимает решение о наличии и о типе возгорания на основе нейронной сети, которая непрерывно анализирует информацию, получаемую от множества датчиков. Корректность решения зависит от количества датчиков и от их расположения в пространстве помещения. Для оптимизации расположения датчиков предложен генетический алгоритм, целевой функцией для которого служит время обнаружения возгорания. Сложность описания помещений на морских судах, типов возгораний и их локализации приводит к целесообразности применения метода моделирования. Разработана модель возгорания в помещениях судна на основе уравнений Навье-Стокса. Моделирование возгораний нескольких типов материалов: ветоши, * Труды II Международной научной конференции «Конвергентные когнитивно- информационные технологии» (Convergent’2017), Москва, 24-26 ноября, 2017 Proceedings of the II International scientific conference "Convergent cognitive information technologies" (Convergent’2017), Moscow, Russia, November 24-26, 2017 289 бензина, нефти, дизельного топлива, электрических кабелей выполнено в суперкомпьютерном центре Политехнического Университета Петра Великого. Суперкомпьютер способен выполнять до 1.2PFLOPS. Суперкомпьютер состоит из двух независимых вычислительных систем “RSC Tornado cluster system” and massively parallel “RSC PetaStream”. Результаты моделирования использованы для формирования целевой функции генетического алгоритма при оптимизации расположения датчиков в судовом помещении. Ключевые слова Моделированипе пожара; FDS (Fire Dynamic Simulator); генетический алгоритм; нейронная сеть; обнаружение пожара; мультикритериальные датчики. Introduction Fires cause great damage to industry, destroying goods and killing people. Forest fires cause irreparable damage to nature. Fires are especially dangerous on the transport because of the difficult of people evacuation. Therefore, the task of developing an early warning system of fire is an actual problem. To solve the problem of early detection of a fire it is necessary to solve several subtasks: 1. Collect statistical data, allowing to draw conclusions about the presence or absence of fire in the room under investigation; 2. Select the optimal arrangement of sensors in the monitored space; 3. Select the model of data collection from the sensors of the system; 4. Create an intelligent system that decides whether a fire exists; In this article, we will examine all the stages in more detail. Collecting statistical data Modeling Method According to the degree of detail which describe thermos-gas-dynamic fire parameters are three types of deterministic models: integrated, zonal (zone) and field [1] consider each model to select one that will allow solving the problem. The integral method is the easiest among the existing modeling methods. The method consists in the following: the state of the gas environment is estimated based on average values throughout the room. Advantages: easy to calculate. Disadvantages: Only suitable for calculating the volume of large fires, not takes into account the heating and ventilation, unhelpful when there are multiple sources of ignition or at an initial stage of a fire. The next method of constructing models is zonal. This method involves the separation of the room into two zones: the upper layer, where the products of combustion and the lower layer of the undisturbed air. Unlike integral method, method of zones allows us to determine not only the volume average values depending on the time, but also the distribution thermo-gas-dynamic parameters by the height of the convective column. The two zone boundaries are mobile. The disadvantage of this method is that its application is necessary to know a priori the structure of the flow as well as heat and mass transfer values of all parameters are obtained only on the middle zone. For more information theory and the development of the band models described in Jones’s [2], Quintieri’s [3] and Forney’s [4] works. Field model. In the construction of this type of model the entire space is divided into a large number of small zones. These zones are not connected with the thread structure. Advantages: suitable for consideration of any fire scenario development, used for building with complex geometric configuration. Disadvantages: requires o lot of computing power. Formulation of the modeling task It is necessary to simulate a fire in a given room to obtain experimental data. For our purposes, the field model was the best solution. To calculate the movement of air currents caused by a fire, we will use the hydrodynamic model. It allows solving the Navier-Stokes equations. [5] Below are the basic equations used in this model. The mass transfer equation: 𝑑𝜌 + 𝛻𝜌𝒖 = 𝑚𝑏𝑚 , (1) 𝑑𝑡 mb – the rate of change of mass in the extracted volume due to the evaporation of droplets and other factors, 𝜌 – m the density of the transferred mass, t – the time, u – the velocity. Law of conservation of momentum: 𝑑 (𝜌𝑢) + 𝛻𝜌𝑢𝑢 + 𝛻𝑝 = 𝑝𝑔 + 𝑓𝑏 + 𝛻𝜏𝑖𝑗 , (2) 𝑑𝑡 uu – second-order tensor, 𝑓𝑏 – external forces caused by friction with droplets of liquid, 𝜏𝑖𝑗 – stress tensor: 290 2 1𝑖 =𝑗 1 𝑑𝑢𝑖 𝑑𝑢𝑗 𝜏𝑖𝑗 = 𝜇 (2𝑆𝑖𝑗 − 𝛿(𝛻𝑢)) ; 𝛿𝑖𝑗 = { ; 𝑆𝑖𝑗 = ( + ) ; 𝑖, 𝑗 = 1,2,3, (3) 3 0𝑖 ≠𝑗 2 𝑑𝑥𝑖 𝑑𝑥𝑗 The energy transfer equation: 𝑑 𝐷𝑝 (𝜌ℎ𝑠 ) + 𝛻𝜌ℎ𝑠 𝑢 = + 𝑞 " − 𝑞𝑏" − 𝛻𝑞 ′ + 𝜀, (4) 𝑑𝑡 𝐷𝑡 𝐷𝑝 𝑑𝑝 ℎ𝑠 - the apparent enthalpy, = + 𝑢𝛻𝑝 – the material derivative, 𝑞 " – the rate of heat production per unit volume 𝐷𝑡 𝑑𝑡 due to chemical reactions, 𝑞𝑏" – the heat absorption rate due to evaporation, 𝑞 ′ – reflects heat fluxes due to thermal conductivity and radiation: 𝑞 ′ = −𝑘∇T − ∑ ℎ𝑠,𝛼 𝜌𝐷𝛼 ∇𝑌𝛼 + 𝑞𝑟" , (5) 𝛼 𝑌𝛼 – he mass fraction of the gas component α, 𝐷𝛼 – he diffusion coefficient of the gas component α, k – the thermal conductivity. Equation of state: 𝜌𝑅𝑇 𝑝= , (6) 𝑊 𝑊 – the average molar mass of the gas mixture. For the numerical solution of equations, an explicit predictor-corrector scheme of the second order of accuracy with respect to space and time is used. The Software The most common at the moment are three software products for the field model: Fire Dynamics Simulator (FDS), Kameleon FireEx KFX and SMARTFIRE. The Fire Dynamics Simulator (FDS) is freely distributable and most universal program from these three programs. It allows you to predict the spread of smoke, temperature, carbon monoxide and other dangerous fire factors. FDS simulate fire scenarios using computational fluid dynamics (CFD), optimized for low-speed temperature-dependent flows. This approach is very flexible and can be applied to various fires, from combustion in furnaces to fire on oil tankers. FDS uses a hydrodynamic model to calculate the movement of air currents caused by the fire. For this program solved the Navier-Stokes equations describing the low-speed flows, caused by temperature changes, allowing calculating the propagation of smoke and temperature distribution. Using supercomputer to modeling a fire The program for FDS simulations allows parallelizing computations for faster calculation model. Becouse the calculation is carried out within each grid, it is possible to carry out the calculation of each grid on a separate core. Also, we can used to calculate the number of computers connected in a local area network or a network cluster to speed up the work. FDS supports two standards for parallelizing OpenMP (Open Multi-Processing) and MPI (Message Passing Interface[6]. OpenMP is an API, designed for programming multithreaded applications on multiprocessor systems with shared memory. MPI is designed to address the separation of the processing load and the organization of information exchange. [7, 8] We will run the calculation of fire model from FDS program on a supercomputer to show the example. Size of objects in the room made us choose the size of area. In our project it is 1,9x1,9x1,9 cm. If we increase the mesh size it may occur errors and deformation of objects, because all calculations are performed within the FDS rectangular grids. Each object in the model must be rectangular to fit the grid. If the position of the object is not exactly corresponding to the grid, the object automatically moves to the edge of the grid during the simulation. This may adversely affect the accuracy of the calculations. Any object that goes beyond the border grids, clipped to the boundary, and such facilities are not involved in the calculation. Also work with thin lines and objects requires a reduction in the mesh. For optimum accuracy of modeling is desirable to use about one grid cell size in all planes. In accordance with the above, and the size of the selected room total number of cells amounted to 14.5 million. Several runs with different resource allocation configurations have been conducted to select the best ways to run such applications. We tell you about them. 1. Use only the OpenMP. It is allows a single computer to run a project with one or more screens on multiple cores. We will use OpenMP on one node of a networked cluster, with one computational grid. During the 48 hours it was modeled around 1 minute real-time fire that has not produced any concrete outcomes; 2. Only the MPI. This method allows you to run the calculation on several computers in a network, or a network cluster. For this it is necessary to design the area which will be divide into several grids, at least as much as the available CPUs or cores, and each grid is assigned to its own process. Based on the cluster power provided to us, namely four nodes, each of which has two processors with twelve cores, it was decided to divide 291 the model computational grids and 96 computational grids, which corresponds to 96 cores of the entire system. In this way we have divided the load on all cores and reduced computation time. Over 48 hours was modeled almost 4 minutes of real time and obtain more detailed values; According to the results, we conclude that the use of MPI library reduces the simulation in a several times. Of course, we can combine MPI and OpenMP in the same calculation. If you have multiple computers, and each computer has multiple cores, you can assign a single MPI process for each computer, and use multiple cores on each machine to accelerate grid processing using OpenMP. But this method is still slower than the separation method of computing MPI. Modeling a fire in a typical spaces on a ship As an example of typical premises, a captain's cabin and a dining room were chosen. An example of a fire development model is shown in Figures 1 and 2 (captain's cabin and dining room respectively). Figure 1 Example of a fire in the "captain's cabin Figure 2 Example of a fire in a "dining room" Figure 3. Spreading smoke in the "captain's cabin" Figure 4. Spreading smoke in the "dining room" As already mentioned, the program provides an opportunity to model not only the development of the flame, but also the spread of smoke. Figures 3 and 4 show the spread of smoke for the same premises. Also, the program allows you to place sensors for temperature, gas concentration and visibility in the premises, which allows you to obtain accurate values of the measured values at given points. This helps to simulate the response of real sensors located at the same points. An example of the gas concentration and temperature sensors located above the ignition source and not far from it is shown in Figures 5-8. As can be seen from the graphs, the sensors located above the source have a wide range of values. The simulation allowed us to collect the necessary information on the development of fire in the room, taking into account all its features. To increase accuracy in determining a fire, it is necessary to measure not only the temperature in the room, but also other hazards (concentration of gases, smoke, etc.) 292 Figure 5. Indication of the gas concentration sensor away Figure 6. Indication of the gas concentration sensor in the from the source distance above the source Figure 7. Indication of the temperature sensor away from the Figure 8. Indication of the temperature sensor in the distance source above the source Optimal sensor location To increase the speed of response of fire extinguishing systems, it is necessary to choose the optimal position of the sensors in the room. One of the most common optimization algorithms is the genetic algorithm. Consider an algorithm for its application to solve the problem of the optimal arrangement of sensors. 1. We perform M preliminary fire simulations in the room. We will select the source locations different for each simulation; 2. We will construct a temperature map for each time point and for each variant of M preliminary simulations; 3. Create N random locations of sensors in the room, the number of sensors will take the size of L; ∑𝑀 𝑡 4. For each of the N arrangements, we calculate the function T min = 𝑖=1 𝑖 , where 𝑡𝑖 = ∑𝑁 𝑗=1 𝑡𝑟𝑒𝑎𝑐𝑡𝑗 , where 𝑀 𝑡𝑟𝑒𝑎𝑐𝑡𝑗 – is the reaction time of one set of L sensors to a fire that has arisen; 5. From all N locations choose 0.01N with the maximum Tmin. These variants are discarded and repeat step 4. The algorithm continues until the final condition is reached; The model of data collection from the sensors of the system Multisensory System of Early Warning of a Fire Multisensory system is better to build on the network technology [9] using the Thread wireless interface. The interface allows using the sensor units, which can be easy to move around the room depending on the location of the most probable source of fire. Fully connected topology, implemented interface Thread, provides high reliability of data transmission system, allow you to work on the first three ISO levels, including network (third) level. If you use Thread wireless interface it will allows you to build system architecture for a distributed wireless network. Sensory nodes and portable remotes for controlling the system running directly from the battery, and can easily be displaced in space. The sensors are directly connected to controllers through Thread interface; sensor and control nodes are powered by batteries. Sensor nodes constitute fully connected (mesh) network. They transmit the results of measurements to the nearest router. Routers collect data and transmit them to the gateway connected to a wired network. The gateway allows transmitting information to the server database which located in a cloud 293 SCC(Supercomputer center). This information may be used directly on the ship or remotely in a server cloud. System structure is shown in Figure 9. Figure 9 The structure of the multi-sensor system Proper functioning depends on the operation of the software that performs the exchange of information in a distributed multi-sensor system, and the topology of the system, which is determined by the ignition probability distribution. The distribution probability, two-dimensional or three-dimensional, depending on the room type and location of flammable objects. Multi-Sensor systems software (SW) can be divided into two parts: the software communications and software of decision-making about fire. The decision about fire is performed on the mathematical model of the fire process, which is the result of solving the Navier-Stokes equations. Therefore, verification of software multisensory system should include the following two parts: 1. Verification connectivity of multisensory system, including mobile units and controls, and reporting; 2. Verification a mathematical model of combustion process; Verifying connectivity of multisensor system We need to construct a network graph to verify connectivity of the system. The nodes of the network are the set of network nodes {S, R, G, Srv, C}. They are includes sensor nodes (S), routers (R), a gateway (G), a cloud computing environment, computer operator (C) Network arcs characterized links between nodes. They have the distance marks (D) and the probability of transmitting data to {P (D)}. The probability of correct data depends on the distance and obstacles. Example of graph segment network, including the router and sensor nodes, is shown in Figure 10. So as not to overload details the connection pattern is shown only for the node S1. The set of vertices denote sensor units S1-S6 and the router R1, the set of arcs is characterized by the probability Pij i = 1..6, j = 1..6 of a correct data transfer between blocks. Considering all the paths on the graph connecting node Si and Rj, we obtain the characteristic of network connectivity: 𝑁 𝐶0 𝑛(𝑖, 𝑗) = 𝑃𝑖 𝑗 + ∑ (1 − 𝑃𝑖 𝑘)𝑃𝑘 𝑗 , (7) 𝑘=1,𝑘≠𝑖≠𝑗 where N is a number of paths, connecting nodes i and j. The probability of correct data transmission between two nodes are determined theoretically based on the analysis of signal propagation at a frequency of 2.4 GHz and confirmed experimentally in the areas of deployment. 294 Figure 10 Graph segment network Intelligent system, based on neural network The article discussed how to make an intelligent system of fire detection on ships by steps/ First of all how to run simulation on a supercomputer. The choice of method for modeling and simulation programs. A method of calculation model on a supercomputer that enables the correct use of computing resources to achieve the desired result. Also, in the article considered a method that allows the sensors in the room to be optimally located. It helps to reduce the response time of the fire protection system. Multisensory fire alarm system allows controlling the temperature, the smoke and the gas simultaneously, that enable detect fire in its early stages. The wireless interface allows deploying and reconfiguring the system rapidly, allows moving the sensors, on the position of the alleged source of fire. Location sensors, their connection is controlled by the software and can be verified on the basis of mathematical models of the object and the system. Conclusions The article discussed how to make an intelligent system of fire detection on ships by steps. First of all how to run simulation on a supercomputer. [10] The choice of method for modeling and simulation programs. A method of calculation model on a supercomputer that enables the correct use of computing resources to achieve the desired result. Also, in the article considered a method that allows the sensors in the room to be optimally located. It helps to reduce the response time of the fire protection system. Multisensory fire alarm system allows controlling the temperature, the smoke and the gas simultaneously, that enable detect fire in its early stages. The wireless interface allows deploying and reconfiguring the system rapidly, allows to move the sensors, on the position of the alleged source of fire. Location sensors, their connection is controlled by the software and can be verified on the basis of mathematical models of the object and the system. Acknowledgments The scientific research was supported by Supercomputer Center "Polytechnic". Authors are grateful for scientific and financial support. References 1. FGU VNIIPO of EMERCOM of Russia – Application field method of mathematical modeling of fires in the buildings: Guidelines, Moskov(2003); 2. Jones W. W. A Review of Compartment Fire Models. National Bureau of Standards, 3. URL: http://fire.nist.gov/bfrlpubs/fire83/PDF/f83001.pdf 4. Quintiere J. A Perspective on Compartment Fire Growth. National Bureau of Standards, (1984) 5. Forney G. P., Moss W. F. Analyzing and Exploiting Numerical Characteristics of Zone Fire Models, Fire Science and Technology, Vol. 14. – № 1/2 (1994),pp 49-60 6. Polyanin, A. D.; Kutepov, A. M.; Vyazmin, A. V.; Kazenin, D. A. (2002), Hydrodynamics, Mass and Heat Transfer in Chemical Engineering, Taylor and Francis, London. 7. Parallel Processing via MPI and OpenMP, M. Firuziaan, O. Nommensen. Linux Enterprise, 10, 2002. 295 8. Basumallik, Ayon; Min, Seung-Jai; Eigenmann, Rudolf (2007). "Programming Distributed Memory Systems [sic] using OpenMP". Proceedings of the 2007 IEEE International Parallel and Distributed Processing Symposium. New York: IEEE Press. 9. R. Chandra, R. Menon, L. Dagum, D. Kohr, D. Maydan, J. McDonald, Parallel Programming in OpenMP. Morgan Kaufmann, 2000. 10. P.S. Jadhav, V.U. Deshmukh “Forest Fire Monitoring System Based on Zig-Bee Wireless Sensor Network”. International Journal of Emerging Technology and Advanced Engineering. V.2, Issue 12, 2012. 11. Borovkov A.I ., Boldyrev Y.Y. Supercomputer Engineering – Strategic Platform for Engineering Education Development // In .: High intellectual technologies and innovations in the national research universities. Between materials. Scientific Conference. St. Petersburg, 2014. S. 87-92. Note on the authors: Malykhina Galina F., Doctor of Engineering Sciences, Full Professor, scientific adviser of the department measuring information technologies, Institute of Computer Science and Technology, Peter the Great St.Petersburg Polytechnic University, g_f_malychina@mail.ru Guseva Alena I., postgraduate student of the department measuring information technologies, Institute of Computer Science and Technology, Peter the Great St.Petersburg Polytechnic University, alyona- kitty@rambler.ru Militsin Alexey V., assistant professor, Deputy Head of General Affairs of the department measuring information technologies, Institute of Computer Science and Technology, Peter the Great St.Petersburg Polytechnic University, ctsp@mail.ru Nevelskii Artem S., Master of Science student of the department measuring information technologies, Institute of Computer Science and Technology, Peter the Great St.Petersburg Polytechnic University, artich@list.ru Об авторах: Малыхина Галина Фёдоровна, доктор технических наук, профессор, научный руководитель кафедры измерительных информационных технологий, института компьютерных наук и технологий, Санкт-Петербургский политехнический университет Петра Великого, g_f_malychina@mail.ru Гусева Алёна Игоревна, аспирант кафедры измерительных информационных технологий, института компьютерных наук и технологий, Санкт-Петербургский политехнический университет Петра Великого, alyona-kitty@rambler.ru Милицын Алексей Владимирович, доцент, заместитель заведующего по общим вопросам кафедры измерительных информационных технологий, института компьютерных наук и технологий, Санкт-Петербургский политехнический университет Петра Великого, ctsp@mail.ru Невельский Артем Сергеевич, магистр кафедры измерительных информационных технологий, института компьютерных наук и технологий, Санкт-Петербургский политехнический университет Петра Великого, artich@list.ru 296