Development of methods for determining the relative weight of physical factors in pipeline paraffinization

The paper is devoted to the development of a system for predicting pipeline paraffinisation, which is a matter of urgency in oil transportation to ensure resource-saving and facilitating sustainable development of the oil industry. The paper focuses on the composition analysis of measuring instruments, the combined use of which can fix the values of all physical parameters right at the time of paraffin formation. To date, the need for such measurements is due to the absence of a precise model for the process of formation of paraffin deposits and correlating dependencies between the process of paraffinisation and physical factors causing it, as well as the absence of possibility to create a forecasting system without this information. Its creation has become possible as a result of introducing advanced methods for measuring the degree of pipeline paraffinisation and oil stream viscosity, critical for the aforesaid data collection. The paper discusses the process of pipeline paraffinisation, presents the selected methods for measuring the desired values, as well as describes the required measuring equipment. The developed system of sensors is characterized by the absence of contact with the medium being measured, full automation, and minimum number of elements. Economically feasible stages of the system development and implementation were selected.


Introduction
One of the most promising lines in the development of automation is the creation of forecasting systems [1][2][3]. In oil industry, particularly, in oil transportation, an intensive search is being conducted for the possibility to predict paraffinisation of equipment. The increased demand is caused by a continuing increase in the share of heavy oils in oil production and an increased number of transportation lines, located in regions with severe climatic conditions.
The main problem, when it comes to creating a forecasting system, resides in insufficient state of knowledge of the process of paraffinisation. To date, a number of factors affecting paraffin formation are known, but due to the complexity of this process, the creation of a formulaic dependence of paraffin formation on physical factors does not seem possible on the theoretical side. The aim of this paper is to develop technically feasible and economically viable methods for determining the relative weight of physical factors in paraffin formation.
Studies of the latest techniques in the oil and chemical industries revealed that as of today the best and the only possible way to achieve the goal formulated is to measure the values of all affecting factors at the time of paraffin formation and to perform further analysis of the obtained array of measurements, which can be advantageously implemented via neural networks [3][4][5]. Thus, the main objectives of the paper include the analysis of the composition of the minimal system of sensors and measurement protocols, which can provide a highly-accurate determination of the values of all physical parameters at the time of paraffin formation, as well as determine the method of collecting the desired data, characterized by minimal costs [6].

Methods
The following research methods were used in the scientific project: literary and patent search; study of the process of paraffin formation and factors influencing it; comparison of methods for detecting paraffin deposits; generalization and analysis of the theory and practice of using the radioisotope measurement method in the control of heterogeneous streams; development of a method for detecting paraffin deposits with a stationary radioisotope system; development of a method for determining the viscosity of an oil flow; analysis of the radioisotope method in terms of safety for operating personnel; synthesis of the method and algorithm of an automatic system for minimizing energy costs for transport; determining a cost-effective method of collecting information; feasibility study of the proposed method.

Discussion
To secure the values of all physical variables at the time of paraffin formation, first of all, it is necessary to provide the system of sensors with a device capable of determining the moment in time for taking it as a point of reference, i.e., with a signaling device that notifies about the beginning of paraffinisation at the early stages of deposit formation. To date, the only known method that corresponds to the formulated task is the detection of pipeline paraffinisation by comparing the attenuation coefficients of two gamma rays, located in a certain manner in relation to the pipeline cross-section ( Fig. 1) [7,8]. The measuring method is based on the Lambert-Beer law: where I is the intensity of the attenuated radiation, 0 is the initial radiation intensity, is the mass attenuation coefficient of radiation by the medium, is the density of the controlled medium, is the linear size of the controlled medium. In order to determine what other values need to be measured, for the possibility to clearly predict the process of paraffinisation, it is necessary to consider the process itself, taking into account the state of the art in terms of measuring equipment. Firstly, the tendency of oil to form paraffin depends on the concentration of high molecular weight hydrocarbons of paraffin series in it, which should be assessed on the basis of the combined measurement of oil viscosity and density , which will be discussed below. Another important factor is the temperature of the oil stream and the temperature difference between the oil stream and the pipeline material [9,10]. The easiest way to determine these parameters is the use of two contact temperature sensors, of any principle of operation, one of which would be located in the oil stream and the other near the pipeline wall. If the pipeline is equipped with such sensors, one can use the readings obtained from them, in case of their absence, provision is made to calculate these parameters on the basis of the measured ambient temperature, thermal conductivity of the insulation and the temperature of oil at the inlet of the pipeline. Water-cut and oil flow rates also increase the risk of paraffinisation.
The last two factors, affecting paraffinisation, include pipeline pressure and the roughness of its inner wall; it is worth noting that both of these factors do not directly affect paraffinisation of the pipeline: their deterioration leads to an increase in the amount of free gas in the stream, which results in an impairment in the oil's ability to dissolve paraffins, and thereby to their separation from the stream and precipitation on the surface of the pipeline (paraffinisation) [11,12]. To reduce the number of measurements, their complexity, and the cost of equipment, it would be expedient to measure one of the intermediate parameters, i.e., the oil's ability to dissolve paraffins or the amount of the gas component, but the first parameter cannot be determined for the entire stream at the current state of the technique, and measuring just one of them will not give sufficient information. Despite the fact that the primary task of the study is to create a forecasting system, for operation of which it is sufficient to determine the gas component, it is essential to obtain information on how much the pressure and roughness of the walls contribute to the paraffinisation of the pipeline. Actually, for the further development of forecasting systems, it is necessary not only to know what combination of parameter values will result in the formation of a paraffin layer, but also not to allow these values to take place; therefore, they must be controlled. If two factors affect the free gas emission, its efficient adjustment requires determining the direct contribution for each of them. To date, one of the most promising methods for controlling paraffinisation is the use of smooth pipes, which is associated with major capital costs, and collection of information on the impact of pipe roughness on paraffinisation, compared to other factors, will make it possible to conclude for what climatic conditions and types of oils their use is deemed to be expedient, and which ones need other means for controlling paraffinisation. Thus, it is necessary to measure the impact of both parameters, the pipeline pressure and its roughness, on paraffinisation, but since direct measurement of pressure will require additional equipment for the developed system of sensors, provision was made to measure changes in the amount of the gas component and the pipeline roughness, since the measurement of these parameters also uniquely characterizes the contribution of pressure and roughness to paraffinisation.
As mentioned above, the developed minimal system of sensors should include a device that signals the beginning of pipeline paraffinisation. This measuring device generates two gamma rays, one of which passes near the inner wall of the pipeline where paraffinisation is more than likely to begin, and the other along the cross sectional diameter of the pipeline, providing control over the entire oil stream (Fig. 1). Proceeding from the above, it seems reasonable to use a radioisotope beam to obtain other characteristics of oil stream [7,8,13]. Currently, by analyzing gamma rays passing through the cross-sectional diameter of an oil stream, such parameters as gas concentration, water-cut, density, and oil flow rate are effectively measured. Due to the fact that these values directly affect the process of paraffinisation, and determining their values by the radioisotope method does not result in an increase in measuring equipment, provision is made to provide the developed system of sensors with protocols for processing the measured change in the degree of gamma-ray attenuation over time in order to determine gas concentration, water-cut, density, and oil flow rate.
The absence of measuring instruments capable of determining the viscosity of oil stream throughout its entire volume caused major difficulties in terms of further research implementation. Currently, the most widely used methods for viscosity measurement are the capillary outflow method, the rotational method, and the Stoke's method. These methods analyze oil only in a small volume of the whole substance, i.e., in a sample. However, the viscosity of oil in the oil pipeline is continuously changing due to the continuous change in its component-wise and chemical composition even within the same working. Mixtures of oil streams from different wells, transported via main pipelines, change even more. In addition, these methods are contact-based and cannot be used for inline determination of viscosity; they also are extremely labor-consuming for the operating personnel: sampling, cleaning of the elements of measuring devices, and other operations need to be done. The difficulties that arise in controlling the viscosity of liquids lead to the fact that in industrial conditions measurements are either performed without observing regulatory documents, or not performed at all.
The non-contact viscosity determination methods (laser, acoustic, pneumatic) being currently developed can theoretically be used for continuous measurement of the viscosity of large oil streams, but their installation would require violating the integrity of the pipeline, as well as stopping the transport for the time of installation, calibration, and repair work [14,15]. Moreover, within the framework of creating a minimal system of sensors, the use of these methods will require the introduction of additional equipment and, consequently, the involvement of additional costs.
In this regard, a much more rational solution could be the development of a method for determining the viscosity of an oil stream based on an analysis of the change in the degree of attenuation of gamma rays passing through the pipeline cross-sectional diameter over time. The creation of this method would allow to determine the viscosity of oil stream using the same equipment that is already contained in the sensor for signaling on pipeline paraffinisation. Therefore, one of the stages of the study was the development of a method that meets the specific requirements, discussed in greater detail in [16].
The combined measurement of the viscosity and density of the oil stream will make it possible to precisely assess the concentration of high molecular weight hydrocarbons of the paraffin series. Theoretically, this can be accounted for the influence of the chemical composition of the oil stream on its physical characteristics. The density of the oil stream is affected by the presence of asphalt-resinous substances, as well as groups of highmolecular-weight hydrocarbons of the paraffin series, while the presence of asphaltresinous substances has a greater effect on viscosity. In connection with the above, to achieve the goal formulated in the paper, it is proposed to determine the chemical composition, namely the concentration of high-molecular-weight hydrocarbons of the paraffin series by the results of the combined analysis of the viscosity and density of the oil stream.
The remaining parameters affecting the paraffinisation of the pipeline, namely the roughness of the pipeline inner walls and the thermal conductivity of the insulation, are the parameters of the pipeline and, as a result, cannot change abruptly. To assess their values, it is proposed to perform diagnostics on a regular basis. The objective of the selected diagnostic methods, as well as of the entire developed system of sensors, is to provide noncontact and fully automated control, when adding a minimum number of elements to the measuring system. In connection with that, the authors propose to determine the roughness of the walls by the pressure losses along the length, which depends on the viscosity of the oil stream and the roughness of the walls. The head pressure generated at the inlet of the pipeline can be derived from the readings of the sensors of the electric motors of the pumping equipment, which all present-day electric drives are equipped with. Parameters of the viscosity and the head pressure drop at a certain distance will be measured by a radioisotope sensor. And in connection with the fact that in the ultimate result. paraffin formation is affected by the release of gases in the oil flow caused by roughness, the average value of roughness of the pipeline determined in this way will be sufficient within the framework of the stated task, namely, to determine the contribution of physical factors in paraffinisation of the pipeline.
To determine the thermal conductivity of the insulation, it is necessary to have in the system a highly-precision temperature sensor of any operating principle located outside the insulation [17]. The sensor placed in this way will be affected by these 2 factors: the ambient temperature and the temperature coming from the pipeline. Since the placement of a measuring unit at the stage of data collection will bring significant economic benefits to the pipelines equipped with electric heating, which will be proved hereafter, the temperature under the insulation can be set and changed much more quickly compared to the change in the ambient temperature. It is proposed to perform the pipeline diagnostics, for example, under a sharp change in the temperature of electrical cable, which is required by the algorithm. After a sharp change in the cable temperature, measuring is performed via an outer temperature sensor and the rate and value of the change are recorded. The elimination of errors, caused by changes in the ambient temperature, is achieved by repeated measurements and their approximation.
Another factor characterizing paraffinisation is the size of already existing paraffin layer. Since the paraffin layer, even at the early stages of formation, causes substantial negative consequences, its complete elimination is proposed. This task can be achieved by a specially designed arrangement of sensors along the pipeline length. The presence of three radioisotope devices is assumed. A device, similar in design to the device shown in Figure  1, but with enhanced digital content, should be located in a location with the highest probability of paraffin formation, as indicated by operating experience or mathematical model of the pipeline. The complete set and the exact number of required measuring devices is shown in Figure 2, where the distance from the beginning of the pipeline to the place with the highest probability of paraffin formation is indicated by the variable N in Figure 2, as an indication that it will vary for different pipelines. Two other radioisotope devices will generate only one gamma ray passing through the pipeline cross sectional diameter, one of them will be located 40 meters away from the beginning of the main pipeline, the second 10 meters closer to its terminal point. The intended role of these two devices is to ensure that there is no paraffinisation in the pipeline sections that are not controlled by the main signaling device notifying on paraffinisation. This task is solved by comparing the density of the oil passing through all measuring instruments, which in the absence of paraffinisation should remain constant. Another task of the radioisotope measuring device located at the inlet of the pipeline is to register the initial value for the concentration of the free gas in the oil stream, which is required to detect the change in its concentration caused by a change in the pipeline pressure and roughness. Thus, the developed system of sensors will include three different in their design radioisotope measuring devices, a system of temperature sensors and standard sensors for the electric drive of pumping equipment, the location of which relative to the pipeline and the relationship between the measurements they make are presented in Figure 2. The developed system of sensors is based on the radioisotope measuring technique and is highly accurate [18]. Widely used radioisotope sensors have passed the state metrological certification and comply with the standards of accuracy for the oil industry. The gas concentration is determined with an accuracy of 0.2%, and the thickness of paraffin deposits, even before the latest upgrades, was determined with a maximum absolute error of 0.5 mm. It is worth noting that modern techniques of neural simulation, which will subsequently be applied to the array of measurements obtained, will further increase the accuracy of the final information system, the creation of which is the prime objective of this paper.
The safety certification of the radioisotope sensors, based on which the developed measuring system has been implemented, showed the maximal recorded dose rate of equivalent radiation at a distance of 1 m equal to 0.1 μSv/h, which is 200 times less than it is established for measuring instruments by the sanitary rules for radiation protection . In addition, the operation of the radioisotope measuring device is completely automated and does not require the presence of operating personnel, the device itself is placed in a protective casing that has signs of radiation hazard on the surface, and the access to it is possible only with a special key. Based on the above, it can be concluded that the measuring system does not harm the health of the enterprise personnel, provided that safety measures are observed.
After determining the composition of the system of sensors capable of measuring the values of all parameters affecting paraffinisation at the moment of its formation, it is necessary to determine, how the set of measurements and data collection will be implemented. When collecting data, the method of laboratory experiments is most commonly used, which in this case would be characterized by the need to generate changes in the parameters of the oil stream, pipeline and medium over a wide range with a small step, and, therefore, will be labor-consuming, complex in implementation and less costefficient. To avoid these side effects, the authors propose the optimization of the existing control systems for electric heating of oil pipelines by implementing the developed measuring system, which will ensure measuring the desired values and bring economic benefits already at the stage of implementation. Currently, the voltage control action in all electrical heating systems, including promising skin cables, is formed according to the readings of temperature sensors [19,20]. This approach, prior to the advent of the techniques for direct detection of pipeline paraffinisation, was the only available option; however, it has low efficiency and can be significantly improved by the introduction of a new method for direct detection of paraffinisation. The efficiency of the proposed optimization is due to the fact that, as already mentioned, many factors affect the pipeline paraffinisation by: at the same heating temperature, the oil stream with different concentrations of high-molecular-weight hydrocarbons and water-cut, the pressure in the pipeline, and the speed of transportation, passing through pipelines with different roughness and insulation, may or may not cause paraffinisation. To completely prevent paraffinisation, provided that the control action is generated based on the temperature sensors only, safety factors of up to 36% are accepted. The problem can be solved by implementing a developed system of sensors. The proposed optimization is characterized by low capital costs, it does not require shutting down the transportation of oil for the time of its implementation, and increases the profitability of electric heating of the oil equipment. In the software part of the optimized automated control system, the algorithm for generating the control action will be changed and the function of data collection, discussed in this paper, will be added. The algorithm of the new controller operation is presented in Figure 3. According to the algorithm, immediately after receiving the signal of paraffinisation, the paraffinisation process must be stopped and the formed paraffin removed. During the data acquisition phase, heating or changing the oil transfer rate will be applied for this purpose. After the information has been collected, any method of paraffin control can be used to control paraffinisation . The most effective method for each situation will become clear from the analysis of the collected data. In more detail, the algorithm of the generation of control output of skin cables using the developed set of sensors will be implemented in the following steps. After the controller receives a signal about the presence of paraffin deposits, the developed control system will calculate the voltage reference. The calculation includes a check on the expiration of the waiting time for the reaction of the paraffin layer to the control action of past cycles. If the calculations show the formation of a paraffin layer and the expiration of the reaction waiting time, the need to increase the temperature of heating of the transported oil stream by skin cables above the paraffin precipitation temperature becomes obvious, meaning the need to increase the voltage on the skin cables. The controller calculates the control action increasing the voltage above the previous control cycle according to the allowable minimum step according to the regulation specification.
The calculated value of the control command must be checked for the compliance with the range of values limited by the maximum possible control command, which depends on the characteristics of the skin cables and the specific operating conditions. If the calculated value is within the technically feasible voltage range for the given operating conditions, it is output to the voltage generating device. An excess of the calculated voltage value over the maximum value indicates the inability of this paraffin control device to cope with the transportation of this type of oil under the operating conditions, gives the maximum possible control effect on the skin conductors, and signals the operator that other means should be used. Upon receiving the signal, the operator can also change the assignment to the pump units by changing the pressure and speed of the oil in the pipeline, which, together with the maximum temperature of the cable, should be able to eliminate the paraffin layer formed or to engage mechanical means of cleaning the pipeline.
When a signal is received that there is no paraffin layer, the controller checks other factors that affect paraffin formation, which are also calculated by the radioisotope meter for other purposes. And when these factors improve in terms of the probability of paraffinisation, the controller reduces the level of control action by the voltage generator in order to reduce energy costs. The most important for the final goal of the project is the part of the algorithm responsible for accumulation of useful information. Namely, the entry in the permanent memory of the oil and the control signal parameters of the device, at which the paraffinisation of the pipeline occurred, and at what indicators of the control action it was possible to overcome it.

Conclusion
This paper presents a contactless, fully automated, high-precision measuring system, which has no analogues in Russia or abroad and is capable of signaling the formation of a paraffin layer at early stages and registering the values of all physical factors affecting paraffinisation. The developed system of sensors is distinguished by the absence of contact with the measured medium , full automation, and minimum number of elements.
Measurement of all physical quantities affecting the formation of paraffin in the pipeline section is possible using a small set of measuring instruments: sensors for electric motors of pumping equipment engaged in transport, two temperature sensors and three radioisotope sensors. Such a relatively small number of sensors can be used to measure a significant number of physical quantities as a result of a comprehensive digital analysis of all the measurements from the sensors.
The introduction of the developed unit will increase the energy efficiency of electric heating of pipelines by 36%, thereby bringing economic benefits to the enterprise even at the stage of data collection. The information obtained and processed using neural networks will become the main part of the forecasting system to control the paraffinisation of the pipeline. The use of the collected information has great prospects for the creation of an algorithm that, according to the given parameters of an oil pipeline under construction and optimization (oil properties, climatic and geographical conditions), will be able to originate reliable and economically viable systems for controlling paraffin formation and calculation of its parameters.