{'fraction_non_alphanumeric': 0.02505296122317399, 'fraction_numerical': 0.0051579626047711154, 'mean_word_length': 4.939824945295404, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Refinery Emergency Shutdown System Based on High Safety Analysis

Safety issues in experimental studies of gas-lift wells are considered, methods of well research are analyzed, and functions of approximation of the main characteristics of a gas-lift well are analyzed. It is shown that in order to ensure safety in experimental well testing in order to obtain the most accurate results, it is advisable to use the probabilistic characteristics of measurements and the cost of resources allocated for research. Requirements have been set for the sequence and by whom the suspension operations should be carried out. The issues of creating a database for system design are considered. The issue of optimization for design in accordance with the practical system is considered.


INTRODUCTION
Automated process control is reflected in the oil industry. As a result, oil production, export and pumping are carried out using automatic control systems. One of the highest forms of control in oil exploitation is automatic control. To achieve high efficiency and safety at oil production facilities, it is necessary to organize optimal automatic control of the technological process.

Original Research Article
Optimal automatic process control means maximum production with a minimum level of energy resources [1][2][3][4]. Before considering the issues of optimization and process safety, it is necessary to study the entire operation of the system and the processes that occur in it. The indicators used to characterize oil fields are: oil recovery factor, dynamics of current oil production, residual and initial production reserves per well, well life, the total number of active and undrilled oil wells, economic production potential [5,6].
Experimental studies of wells in the process of oil production are important not only for determining their optimal modes and technical conditions, but also for controlling the development of oil fields in general. Various reports in oilfield practice show that the change in the pressure of the gas-liquid mixture in the lift along the well occurs due to the gradient curve P(L), which is also experimentally studied using a depth gauge to determine it with the required accuracy [7,8]. In some cases, in order to properly analyze the operation of gas lift wells, pressure and temperature are measured from the tubing at certain intervals through downhole instruments, which makes it possible to find gas entry points and even gas lift leaks. The disadvantages of conducting research with such downhole instruments are the impossibility of conducting them in high-yielding wells, high costs and an incomplete description of well operation [9,10]. Therefore, studies based on the results of measuring parameters at the wellhead are very important, the most important of which is the determination of the main characteristics of the well through experimental studies.

FORMULATION OF THE PROBLEM
The ICSS system consists of the following functional subsystems and should be a fully integrated system, not limited to: The above subsystems and components must be connected to the ICSS with a local area network (LAN) so that operators can control and manage and exert certain effects. The ESD system is a shutdown system that includes both process stops and emergency stops, which in turn form a system of equipment protection. The ESD system should be designed as a system that detects and responds to trends in equipment and processes: It activates emergency shutdown levels to protect personnel and equipment. The system should be designed to minimize equipment downtime and reduce the risk of accidents. Transmitters and switches installed in the field, which are normally used for process control, cannot be used to detect inclinations and to stop the process immediately [11,12]. Separate transmitters, switches, solenoid valves, emergency stop valves and insulators must be used to carry out emergency shutdowns. The ESD system includes buttons to activate an emergency stop in the event of an emergency.
These key blocks must be located on the critical situation control panel in the central control room [10]. They must be accessible and protected against accidental intrusion [13]. The emergency shutdown system should be designed to take into account the possibility of undesirable situations so that it can return the system to a safe state in the event of a power outage or loss of control [14]. The emergency stop system shall activate the stop when any inclination is detected in the equipment or devices. In order to increase the sustainability and level of security, this system should also carry out emergency shutdowns when receiving information from the fire and gas system.

OPERATION AND FUNCTIONAL REQUIREMENTS
Some operating requirements of the ESD system should be as follows: • Shut down systems containing explosive substances in case of fire or explosion; • Shut down the process in case of leakage of any explosive substances; • Reducing emissions of greenhouse gases.
The functional requirements of the ESD system are as follows: • Signaling and switching of emergency levels based on analog input and switching; • Identification of critical inputs (to prevent faulty Instrumentation from stopping by mistake) • Complex diagnostics of system errors.
The ESD system must be based on highreliability, fault-tolerant, software and hardware PLCs that meet SIL levels. "Error resistance" is an important characteristic of PLC. "Error resistance" is the ability of the PLC to operate continuously when the modules are removed. This concept is valid for the following different hardware supply structures: • Dual processors with dual input / output modules; • Inputs with 2oo3 option configurations; • Inputs with 1oo2 option configurations.
Activation of the emergency shutdown system. The emergency shutdown system can be activated either manually or automatically: • Automatic start-up: Emergency shutdown systems should be designed so that the emergency shutdown system is activated automatically when the process deviates from normal operating conditions and there is a possibility of an accident before the operator intervenes. Automatic emergency shutdown should be considered as a last resort and, if it does occur, should assist operators in making appropriate adjustments through various indicators. • Manual start-up: Emergency stop can be started manually, either from the field or remotely -by means of the buttons on the CCR and from the operator's workstation.
The proposed Emergency Shutdown System is divided into several levels to prevent nonemergency equipment and general process shutdown: • ESD-1: Emergency shutdown of the entire area; • ESD-2: Emergency shutdown of an entire production; • ESD-3: Emergency termination of the process • ESD-4: Emergency shutdown of the aggregate chain; • ESD-5: Emergency shutdown of equipment.
ESD-1 is the highest level of emergency shutdown and should be used to bring the entire area to a safe state. Stopping the whole area is a critical step in terms of the process. Therefore, this suspension must be carried out by the authorities using a wire-connected button on the critical action panel. And this wire-related button could be the start of some of the critical points outlined below: • Generator shutdown; • Compressor shutdown; • Initiate of the PAGA system; • Activate the ESD-2 level.
The ESD-2 emergency shutdown should result in the shutdown of all production and non-essential networks. Significant networks include systems that protect the safety of the entire industry: diesel, air, water, food, fire water and nitrogen. ESD-2 can be started in the following cases: The ESD-4 can be started in the following cases: • According to the order received as a result of stopping ESD-3; • Using the ESD-4 buttons on the critical actions panel in the CCR; • With the ESD-4 buttons on the local panel located in the area; • When receiving an "HH" signal with high priority, depending on the process.
ESD-5 Equipment Emergency Shutdown should be applied to equipment that has been identified as inclined but has no effect on other equipment. When the inclination condition (or operator's order) occurs, stopping the unit will cause the individual equipment to stop. In addition, an emergency stop by the workstation keyboard must be considered in the CCR. The buttons should allow operators in the CCR to turn off any device independently. For example, an emergency shutdown of the unit can stop any pump and close several valves. The emergency stop system must be activated either manually or automatically: • Automatic start-up: The emergency stop system should be designed so that the emergency stop system should start automatically when the process deviates from normal operating conditions and there is a possibility of an accident before the operator intervenes. Automatic emergency shutdown should be considered as a last resort and, if it does occur, should assist operators in making appropriate adjustments through various indicators; • Manual start-up: Emergency stop must be able to be started manually either from the field or remotely -by means of the buttons on the CCR and from the operator's workstation.

ESD VOTING PROCEDURE
When a ban on ESD field entries is applied, the ESD selection algorithm must be modified from 1 to 1 (Table 3). In general, all exceptions from 1 to 1 (1oo1) should be based on the choice of transitions. In the case of 3 to 2 (2oo3) the access ban on one of the ESD inputs is based on the selection of transitions, so that the transmitter must pass SIF task values in the event of future errors and indications ( Table 2). For the 1-to-1 (1oo1) algorithm, the application of a safe ESD access block will not cause the transition to occur. The safe access of the entrance will be considered as a choice of crossings (Table 3).  The proposed emergency stop system is divided into stop levels to increase the level of safe control of the technological process and to prevent accidental stops. Each sub-level is hierarchically dependent on the level above it, and is the initiator of the stop based on the task from the top level during the stop. The division into levels prevents non-accidental, process-free devices from being stopped and a strict control regime is abandoned.

CONCLUSION
In this study, following were carried out in order to attain final goals. The reliability of the ESD system for the oil refining process was analyzed. Based on the analysis, stopping levels were determined based on possible scenarios. The requirements for who and in what sequence the suspension operations will be carried out are defined. The issues of creating a database for system design were considered. The issue of optimization for design in accordance with the practical system was considered.