“Emergency Response Plan” Automated System for Oil Production and Transportation Enterprises

In order to increase the efficiency of implementing the emergency response measures, the emergency response plan drawing up, revision and implementation at oil production enterprises, it is expedient to use an analogue of the supervisory control and data acquisition (SCADA) system, which generates an interactive mode that allows interaction with the person in charge for localizing and eliminating the consequences of accidents that negatively affect, inter alia, the environmental situation. The SCADA system was developed on the basis of the approved document “Emergency Response Plan” and provides for data exchange with the automated systems of the enterprise to form a complete description of the situation for the person in charge for localizing and eliminating the consequences of accidents. The automated system application software was developed using high-level programming languages (Embarcadero Delphi or analogues) and technologies for direct access to the Oracle database management system. The use of an automated system is feasible for large enterprises of the extractive and processing industries with the possibility of integration into the automated Manufacturing Execution System (MES-systems) of an enterprise.


INTRODUCTION
At hazardous industrial facilities of oil production, oil refining, mining, metallurgical and other industries, there is a possibility of occurring events that result in accidents (explosion, spill, fire), and, as a consequence, in uncontrolled emissions of highly toxic substances and hazardous chemicals into the industrial infrastructure and the environment (Grozovsky, 2001). An accident for such industrial facilities is defined as an uncontrolled release (release into the atmosphere) of mass or energy that poses or is capable of posing an immediate risk to personnel, the environment or equipment (Palukh et al., 2011). In this case, mass or energy acts as a source of emergency threat.
Emergency situation (ES) is a release (spill) of hazardous substances outside the sanitary protection zone of technological facilities in excess of admissible concentration limit (Kiselev, 2017). Any production facilities and reservoirs such as tanks, producing wells, petroleum pipelines, road tank trucks, shut-off valves and flanged joints can be potential sources of oil spills. The possible causes and factors contributing to the occurrence and development of accidents may include the following: equipment failures (malfunction) (physical wear, mechanical damage; control instrumentation failures; metal corrosion of external, internal walls and bottom of tanks, internal metal corrosion, metal corrosion of pipeline walls); inappropriate staff operation; (non-observance of the rules for technical maintenance; wrong actions when performing repair, preventive maintenance and other work associated with unstable transient modes); external impact of natural and man-made character; illegal actions of people resulting in the deliberate creation of an emergency (Pivovarova et al., 2017).
The main adverse factors associated with oil and petroleum products spills are as follows: environment pollution; toxic effects on humans and the environment; thermal radiation in case of oil and petroleum products spills burning. The scale of consequences of accidents and the size of zones of protective measures depend on the volume of hazardous substances spreading in the environment (Korelskiy et al., 2020).
Generally, the tasks of the rescue and firefighting services can be defined as follows: prevention of accidents by monitoring and preventing the occurrence of an emergency; prevention of the development of an accident, in case of its occurrence, into an emergency; minimization of the consequences of an accident/emergency situation (Mastryukov, 2003). In order to increase the efficiency when implementing the emergency response measures, the emergency response plan drawing up, revision and putting it into operation, it is expedient to use the SCADA system, which generates an interactive mode that allows interaction with the person in charge for localizing and eliminating the consequences of accidents at the enterprise (Komandirov, 2008), in particular, the "Emergency Response Plan" automated system (ERP AS).

DESCRIPTION OF THE SYSTEM STRUCTURE
The automated system was developed on the basis of the approved "Emergency Response Plan" and provides for data exchange with the automated systems of the enterprise to form a complete description of the situation for the person in charge for localizing and eliminating the consequences of accidents.
The objectives of the system include: • planning of personnel actions in various emergency situations and, on its basis, customization (revision) of the "Emergency Response Plan" and other documents related to the industrial safety; • instantaneous display of information related to an accident/emergency situation that occurred; • increasing the efficiency and recording the actions of the person in charge for eliminating accidents, when implementing the measures set forth in the "Emergency Response Plan", the immediate provision of information to the emergency response command center.
The implementation of the above-mentioned objectives is carried out via automating the following features: 1) forecasting and prevention of accidents/emergencies by: • filing electronic directories required to fulfill the objectives set forth in the "Emergency Response Plan"; • filing the documentation related to industrial safety (scanned copies of the approved escape plans, operating instructions, regulatory and administrative documentation, directories, site maps, calculations in terms of predicting volumes and areas of oil and petroleum products spills, etc.); • planning of the emergency response measures to eliminate accidents/emergencies with the introduction and approval of amendments to the "Emergency Response Plan"; 2) Receiving, processing and presenting data in case of an accident/emergency situation by: • receiving the information on the occurrence of an accident in an automated mode through the "Fire alarm and fire extinguishing", "Gas control", "Power supply" automated systems, etc.; • registration, by the personnel of the rescue and fire-fighting services, of the data received by telephone and radio communications with reference to the location (object, location, volume and content of emissions, the number and location of personnel within the accident/emergency zone, etc.); • presentation, in text form, of the operational information on the occurrence of accidents or emergency situation, emergency response measures and actions.
3) Operational management of emergency response measures and actions when eliminating an accident/emergency situation by: • search for a position in the "Emergency Response Plan" by context and location of detection; • issuance of integral information on the situation at the facility, as well as on the escape routes for people in an advantageous manner for coordinating the actions between the enterprise services; • remote issuance of the control instructions to automated process control systems of the enterprise with the provision of safety measures and access restrictions; • transmission of messages and instructions related to minimizing the consequences of an accident to the operational duty personnel (dispatcher, gas control operator, etc.); • tracking the implementation of measures, stipulated by the "Emergency Response Plan", and signaling the presence of nonfulfilled items.
The block diagram of the ERP AS is shown in Figure 1. The ERP AS functionally combines the following subsystems: • visualization subsystem, implemented on the application software of the operator's automated workstation (display of information for the operator on the ERP AS operation; receiving manual input data from the operator); • information subsystem, implemented on IIS, an application server (transformation of data, coming from the DBMS, for transfer to a display subsystem; processing of manual input data from the operator); • an administration subsystem, implemented on the standard software of the DBMS of the automated workstation of the ERP AS engineer (monitoring and control of the DBMS); • data exchange subsystem, implemented on the application software of the DBMS and providing interconnection with adjacent systems (procedures for collecting the process-related data, receiving the meteorological data, obtaining the data on the movements of personnel and vehicles, issuing alarm signals to external systems) (Safiullin et al., 2019); • data storage subsystem, implemented on the application software of the DBMS and storing all types of data; • service subsystems of the DBMS that perform automated analysis of the received data, generate queries, data for display, and alarm signals.
The ERP AS operation is based on the approved "Emergency Response Plan" for an enterprise. The operational part of this document contains information categorized by positions. Each position is characterized by: production zones, routes of movement of rescue teams of the emergency and fire-fighting services within production sites, escape routes and time for safe egress and evacuation of personnel to safety. Each position contains the information on the activities, indicating the person in charge for the implementation of the event, the executor of the event, the place of implementation and the object of the event. As part of the system's operation in an emergency situation, according to a certain position of the "Emergency Response Plan", the search and presentation of operational information for the executors in charge is performed. An example is given in Table 1.
In order to create information images for presenting the information to the ERP AS, the main objects are specified and the interconnections between these objects are identified; the analysis is conducted as a result of this analysis. Positions of the "Emergency Response Plan" are presented as an information image of the object. In addition, the information images should represent the production sites, which are covered by the position of the emergency response plan, escape routes for people and for movement of rescue teams of the emergency and fire-fighting services. The properties of these images are the following concepts: time for safe egress and evacuation of people, measures and actions according to the position, persons in charge, executors, etc. The defining links between the information images are shown in the block diagram presented in Figure 2.
On the basis of the system analysis, a database and software are developed for preparation of the operational part of the emergency response plan and implementing the emergency response plan for the person in charge.
The ERP AS software is divided into systemwide, basic and application software. The ERP AS is built according to the client-server architecture and consists of client software and a database, which is located on the servers of the enterprise data processing centers. For instance, the Oracle DBMS, which provides all system information storage, can be used as a basis. The DBMS maintains the database and is responsible for the integrity and safety of data, and also provides the input-output operations when the client accesses information.
Adjacent automated systems, if needed, are able to access the data of the ERP AS database server using standard tools, the main of which are the SQL language, as well as stored and attached procedures (Komissarov, 2017).  The application software of the main automated workstation of the operator is developed using a high-level programming language (Embarcadero Delphi or an analogue), using the tools for the direct access to the Oracle DBMS.
The configuration of the software for the automated workstation of the administrator is selected on the basis of the norms and rules for managing the computer infrastructure, being currently used at the enterprise (is not part of the ERP AS) (Myakishev, 2017).

AN EXAMPLE OF THE ARCHITECTURE OF THE ERP AS DATABASE
A separate table, having a primary key -an identifier, fields for external links with other tables and information fields, is created for each object of the system. In order to organize "manyto-many" relationships, staging linkage tables are created. A conditional list of objects and their corresponding tables is given in Table 2, and their relationship is shown in Figure 3. The scope of data from the ERP AS depends on the storage depth of operational data, which can vary from 1 month to 1 year (long-term storage can be due to the need for a retrospective analysis of emergency causes) and range from 400 MB to 2 GB.
The ERP AS services are provided in the read-only memory of the operator's automated workstation. The programs ensure the performance of the system features of collecting information, providing information to the user in various forms and generating the electronic forms of reporting documents.

CONCLUSIONS
The introduction of the ERP AS at enterprises for the production, transportation and refining of oil will allow: 1. Implementation of the operative emergency response actions and measures to rescue the people caught by an accident/emergency situation at the enterprise: providing information on safe egress of people from hazardous areas of the enterprise; receiving the information, on a real-time basis, on the number of people left within hazardous areas and their location using an automated personnel accounting system; 2. Implementation of the operative emergency response measures to eliminate accidents/ emergencies at the initial stage of their occurrence: providing the information on the occurrence of an accident according to the positions of the "Emergency Response Plan" in an automated mode through the adjacent subsystems of the enterprise; conducting automated search for the position of the emergency response plan by the context and by the location of the accident detection; direct display of the emergency response measures and actions to eliminate accidents; forwarding instructions and messages to the automated systems "Communication", "Loud-speaking warning", "Emergency notification", etc. and tracking the implementation of activities using standard communication protocols;