Cascade Temperature Control Data Analysis in Oil and Gas Industry

Currently, one of the most effective methods of personnel training for the oil and gas industry is training on computer simulators. Studies show that most often emergencies occur in small areas of large production facilities, which indicates the existence of a problem with the possibility of training and development of simulators for basic objects of complex production chains. Nowadays, there are a lot of technical and technological solutions in the field of simulators, however, the segment of simulators of basic units and equipment of oil and gas industry objects is practically absent. In order to develop computer simulators that fully correspond to real objects, it is necessary to build adequate mathematical models. Within the framework of this research, the development of mathematical and structural models of the basic object of the oil and gas industry has been performed.


Introduction
The oil and gas industry is one of the most dangerous industries. A mistake in the management of an industrial asset can cost not only large financial losses, but also human lives. Therefore, it is most important to pay special attention to personnel training. Knowledge and ability to respond to abnormal situations, as well as the ability to competently manage the technological process are all the basis for successful and accident-free production. [1,3,16] One of the most effective methods of personnel preparation is training with the help of computer simulators emulating the operation and functionality of a real facility.
A significant contribution to the study and development of industrial computer simulators of technological processes was made by Russian scientists V.M. Dozortsev, T.B. Chistyakova, S.I. Magid, S.A. Rubashkin, etc. Thomas P., Berry A., Crawford A., Crawford C., Martin T., and many others also played a great role in the development of the computer simulator industry.
Training on computer simulators is recognized as the best and most effective method of training specialists to work at a real facility. [2,3,7,16] However, as a rule, enterprises tend to provide their personnel with computer simulators of a large facility (installation), forgetting to pay attention to the training of specialists in the field of technological process mastery at a specifically taken small section of this technological system. In most cases, emergencies occur precisely at a particular node of a large system: failure of a heat exchanger, a cooler, problems at a node with gate valves, etc. According to the studies of Korotkova T.G., Bozhenova K.S., among the main reasons of accidents at oil and gas objects one can single out failure and depressurization of technical devices, as well as human errors connected with violation of organization and production of hazardous works and violation of industrial safety requirements [11].
Therefore, in order to ensure high quality training of specialists, who are going to operate a complex technological process, it is initially necessary to undergo training on a basic level simulator (a separately taken technological unit).
This approach ensures the acquisition and mastery of process control skills with all its subtleties. By implementing a training system "from the simple to the complex" you can significantly improve the level and quality of training of specialists, which, in turn, contributes to reducing the risk of emergency situations in production, eliminating significant economic losses of the enterprise and increasing the reliability of equipment.
Let us take a closer look at the device of computer simulators.

Features of computer simulators construction
The architecture of computer simulators is similar to the real object control system (figure 1). [5,6] The difference is that instead of real object sensors their emulation is used. It is important to note that the most effective training and adaptation to the real production conditions, if the model has the maximum convergence with the real control object. During training, the user is fully immersed in the process of controlling the process on the simulator, imagining that this is the real object. If the control model and the real object will have significant differences, then the result of training on this model will not meet all the requirements for the skills of the trainee. According to the structure, computer simulators are divided into simulators of enterprise level, simulators of medium level, and simulators of installation level. The latest in their turn are divided into specialized simulators, simulators of typical technological units and simulators of basic technological units and devices (Fig. 2). [1,6,9]  At the moment there are many technical and technological solutions in the field of simulators, however, there is practically no segment of simulators of basic units and devices of oil and gas industry facilities. Nevertheless, it is the basic simulators that allow to learn more fully the functionality and technological process of an object and to obtain the skills of controlling this process. The process of personnel training "from the simple to the complex" is broken, which irreversibly affects the quality of personnel training, the level of knowledge and practical skills obtained.
In addition to the above, it should be noted that there is also a lack of development in the segment of domestic developments of computer simulator systems.
The computer simulators are based on the model of behavior of real objects. [4,14] Based on this model, basic units are developed which allow emulating the operation of objects or processes. According to the adequate object model, a simulator software module is developed. Based on the operator's real screen images, a graphical module of the simulator or a man-machine interface is created. Communication channels are used to connect software and interface modules into a single software product. These developments are carried out on specialized software, as a rule, in SCADA-systems. More details about the structure and principles of building computer simulators are presented in [15].
In terms of building computer simulators the following types of models can be -distinguished: -mathematical; -analytical; -parametric; -algorithmic; -structural; -simulation.
Depending on the research object and training tasks, one or several models can be created simultaneously to achieve behavioral indicators of a real object when developing a computer simulator [7,8,10,12].

Development of a mathematical and structural model for a basic object of the oil and gas industry
Within the scope of this study as an object of development is selected an oil heater with an intermediate coolant. This object is determined on the basis of the greatest prevalence and subsequent applicability, or adaptation to similar objects (heat exchangers, oil product heaters, etc.).
Mathematical and structural models for the specified technological unit with their subsequent software implementation and obtaining a computer simulator of the basic type are proposed. Figure 3 shows the basic technological scheme of the oil heater with the intermediate coolant. To achieve sufficient regulation, the data about the dynamic behavior of the control object is needed. A process of obtaining (synthesis) a mathematical description of an object based on experimentally obtained signals at its input and output is called object identification. The mathematical description can be obtained in tabular form or in the form of equations and dependencies. A distinction is made between structural identification, when the structure of the mathematical description of an object is searched for, or parametric identification, when the values of parameters included in the equations of the model are found for the known structure. In case of searching for model parameters with known structure it is said about identification of model parameters, not the object.
By structural identification is meant determining the type of transfer functions of the elements included in the object, within which the technological process takes place, and the links between them, as well as other elements that have a significant impact on its course. [3,9,10,13] Transfer functions are selected from the list of typical links of the automatic control system based on their physical and technical properties and on the type of transients.
Development of the mathematical model of the simulator, prior to software implementation, was carried out using the MATLAB application package in the Simulink dynamic simulation application.
Based on the experimental data, it was found that the electric motor, valve and heat exchanger are one-component objects with self-alignment and can be described by the transfer function of the aperiodic first-order lagged link: The reduction unit and its components are a non-self-aligned object described by the transfer function of an ideal integrating link: The transfer functions of the PI controller (3) and the position controller (4) are as follows: The general view of the mathematical model, implemented in the form of transfer functions, is shown in Figure 4, where Tset -temperature allowance, Tenv -ambient temperature, Gout -rod displacement in mm, Fout -gas flow rate, Tout -temperature. The structural model developed on the basis of the mathematical model of the object is shown in Figure 5. The model also includes two closed loops covered by a single negative feedback: a temperature control loop (external) based on a PI controller and a valve stem position control loop (internal) using a three-position regulator. Thus, there is a cascade regulation of the stem position (i.e., gas flow rate in terms of process parameters) according to the set point calculated by the PI temperature controller.
The model operates as follows. Based on the result of calculation of the mismatch between the oil temperature set point (Temperaturesetpoint block) and the "measured" temperature value coming from the model output, the PI Regulator (PI Regulator block) calculates the set point for the valve plug position.
Since the frequency (periodicity) of the PI control program is limited by the duration of the controller cycle during which the output value remains unchanged, we introduce a zeroorder extrapolation using the ZeroOrderHold block (named ControllerCycle). The calculated position set point value is fed to the input of the three-position regulator (Signum block named PositionRegulator) through the DeadZone block, which implements a dead zone for the position of the plunger stem to avoid excessively frequent motor starts in the valve actuator.
The Signum unit generates a signal depending on the sign of the input value: when the input value is negative, "-1" (valve closing), when it is positive, "1" (valve opening), when it is zero, "0" is also generated at the output (the stem does not move). Thus, the three-position regulation law is realized.
The actual frequency of motor starts (i.e. the minimum time between two starts) is also set with the ZeroOrderHold block named DelayOn/Off. When a non-zero signal is received at the input of the TransferFunction block named ElectricMotorreducer (turning the motor to one or the other side), the angular speed value with a sign corresponding to the direction of rotation is generated at its output.
The Reducer (Gain type) and Transmission (Integrator type) blocks are designed to recalculate angular velocity into linear velocity of rod and plunger movement taking into account motor ON time and then integrate this value to recalculate it into actual rod movement G, mm.
The maximum stroke limit is set in the Transmission block. The movement of the stem and plug causes the change of gas flow F, for the calculation of the value of which the valve block of TransferFunction type with the name Valve is used.
Then a block of the same type with the name Heatexchanger (heat exchanger) calculates the oil temperature T at the heater outlet, depending on the gas flow rate, taking into account the ambient temperature (block constant with the name InitialTemperature).
The TransportDelay block is used to implement the transport lag. The Display blocks are used to display the current values of temperature and stem position mismatches, as well as the calculated setpoint position, stem movement, gas flow rate and the temperature itself. The Scope type blocks are used to display graphs of changes in the parameters of the same name.

Conclusion
As a result of the mathematical and structural identification of the process of oil heating the features of control of the heat-exchange apparatus have been revealed, and the type of transfer functions of the elements included in the object, within which the technological process and other elements significantly affecting its course have been determined. The structure of mathematical model of oil heater has been obtained, and cascade control of oil temperature at the outlet of oil heater depending on the position of the valve stem, which determines the gas flow has been implemented. The next stage of development is to determine the coefficients and parameters of transfer functions of elements included in the model. Further the received model will pass stage of program realization and testing.
The peculiarity of the obtained model is the possibility to supplement this structure with other object modules, thus obtaining a structural model of a more complex control object. It should also be noted that parametric identification of this model is possible using the Simulink module of the Matlab package. This allows selecting more accurately all parameters of the model and tracing the closest indicators of modeling result to indicators of real object, which is a critical condition in development of computer simulator.