1. Introduction
As the chemical cementation of the carbonate formation is greater than the mechanical compaction, the genetic mechanism and prediction methods of the abnormal high pressure are different from those of the clastic formation, which makes it difficult to predict the formation pore pressure. When drilling in fractured carbonate gas reservoirs, especially with a narrow safety mud density window, drilling risks, such as a gas kick, are prone to occur, which seriously affects the drilling safety and prolongs the drilling cycle [
1]. The formation of a gas kick, in addition to being caused by the negative pressure difference in the underbalanced case, may also be formed by the gravity displacement in the overbalanced case. Due to the different mechanisms of gas kicks, different measures need to be taken, otherwise the operational risk may be increased [
2], it often leads to the occurrence of a secondary well kick or blowout, resulting in serious consequences, such as the well destruction, destruction of the oil and gas resources, and pollution of the natural environment. However, a gravity displacement gas kick and an underbalanced pressure gas kick have similar performance characteristics at the surface, both of which show an increase in the pit gain, due to the gas entry into the wellbore, making identification difficult. Researchers have been studying an underbalanced pressure gas kick for a long time and have continuously developed its mechanism and control theory, while the study of a gravity displacement gas kick has only been gradually carried out in recent years.
Some studies performed a sensitivity analysis on the effect of the fracture size, the drilling fluid performance and other parameters on the gas-liquid gravity displacement, based on the gas-liquid gravity displacement observed in the visual experimental devices [
3,
4,
5]. Some scholars have conducted experimental research on the gravity displacement laws between asphaltene heavy oil and drilling fluid, analyzed the effects of the fracture width, density and viscosity on the gravity displacement, and established a mathematical model [
6,
7,
8,
9,
10]. The above studies analyzed the effects of the fracture size and the drilling fluid performance on the gravity displacement through experimental phenomena and measurement data, and proposed the corresponding preventive measures, but did not investigate how to identify gravity displacement after it occurred. By modeling the gas-liquid two-phase flow under a gas kick, the variation characteristics of a gravity displacement gas kick and an underbalanced pressure gas kick, in terms of the bottomhole pressure, free gas, and pit gain, are obtained [
11,
12,
13]. Based on the application of back pressure at the wellhead, during the managed pressure drilling, researchers judged the gravity displacement gas kick and the underbalanced pressure gas kick, by the change in outlet flow rate. While their method is able to identify the type of gas kick, it takes a longer time and carries the risk of the continuous deterioration of the overflow. In [
14], Xia established a flow model of the wellbore-formation coupling, based on the mechanism of the gas kick occurrence, and obtained the gas kick characteristics of the different gas kick types. Meanwhile, they proposed a method to identify the type of gas kick, by observing the pit gain curve and the standpipe pressure curve, which rely on the theoretical and empirical knowledge of the field engineers and technicians.
With the development of artificial intelligence (AI) technology, combining physical models with AI algorithms has become the trend in engineering technology today. For specific engineering problems, the mechanism model and AI model are coupled to drive the way, and the physical model, data and algorithms are used at the same time, which is the third generation of AI technology. Dynamic time warping (DTW) is a classical similarity analysis and pattern recognition algorithm that uses flexible pattern matching techniques. It is able to match patterns in the presence of global or partial extensions, compressions and deformations, thus solving the problem of the similarity metrics and the classification of dynamic patterns [
15]. The dynamic time warping algorithm can effectively solve the limitations of the Euclidean distance calculation method in the expansion and bending of the time axis. Based on the idea of dynamic programming, the DTW algorithm finds the shortest path between two pieces of data, that is, the total distance (similarity) between the two pieces of data. With the advantages of a fast computation, a high positive recognition rate and robustness, the DTW algorithm is widely used to solve pattern recognition problems in many fields. For example, good results have been achieved in speech recognition [
16], dynamic gesture recognition [
17], fault diagnosis [
18,
19], problem classification [
20], gene matching [
21] and reservoir identification [
22].
This paper analyzes the characteristics of the surface measurement parameters under different gas kick types, on the basis of the flow model, coupled with the wellbore and the formations established by previous authors. AI algorithms are used to analyze the surface measurement parameters during the overflow process and the parameters computed from the physical model, to identify the type of gas kick by means of the combination of the physical model and AI methods. Compared with the existing methods, the method proposed in this paper does not need to wait for a lag time, and there is no need to adjust the wellhead backpressure, and the fine outlet flow measurement is not required, which is not only suitable for managed pressure drilling, but also for conventional drilling.