# Intelligent Prediction of Stuck Pipe Using Combined Data-Driven and Knowledge-Driven Model
## 3 Proposed Methodology
### Comprehensive Evaluation Method of Stuck Pipe Based on Fuzzy Mathematics
#### 3.3.2 Determination of Membership Function  
For the stuck pipe fuzzy set, it is necessary to give the degree of membership of each stuck evaluation index to the fuzzy set \(S\). Therefore, when using fuzzy mathematics theory, it is very important to find or design an appropriate membership function. The determination of membership function is subjective. Different people will give different results for the same problem. Finally, the Sigmoid-type function is selected as the membership function of the stuck pipe fuzzy set.  
The range of the two sub-evaluation indexes in the \(\{P_{1},P_{2}\}\) is between 0 and 1. Theoretically, when the two sub indexes are both small (between 0 and 0.5), it means that the final possibility of stuck pipe is very small at this time, that is, the possibility of stuck pipe obtained by the comprehensive evaluation index is also very small. However, when either of the two indexes is larger (0.5-1), it indicates that the possibility of stuck pipe is greater, that is, the probability of stuck pipe obtained by comprehensive evaluation index is greater. As shown in Figure 8, it can be found that the sigmoid function can simulate a similar situation, that is, when \(x\) is between 0 and 0.5, it can be simply considered that \(y\) increases linearly with \(x\), when \(x\) is between 0.5 and 1, \(y\) increases exponentially with \(x\). When there is basically no stuck pipe risk, the comprehensive evaluation index value for stuck pipe will be small. When3.3.3. Establishment of Comprehensive Evaluation Index for Stuck Pipe  
After determining the membership function of the fuzzy set, a comprehensive index of stuck pipe can be constructed. The fuzzy set \(S\) is expressed as,  
\[S=(\mu_{\mathrm{s}}(P_{1}),\mu_{\mathrm{s}}(P_{2})) \tag{22}\]  
\[\mu_{\mathrm{S}}(x)=\frac{1}{1+e^{-6(x-1)}} \tag{23}\]  
The value range of the two indexes \(P_{1}\) and \(P_{2}\) after the membership function are between 0 and 0.5, so the two elements in the stuck pipe fuzzy set can be simply linearly added as the final comprehensive evaluation index,  
\[P_{\mathrm{stuck}}=\mu_{\mathrm{S}}(P_{1})+\mu_{\mathrm{S}}(P_{2}) \tag{24}\]  
As shown in Figure 9, the blue surface represents the surface composed of values of evaluation index 1 (friction coefficient,), evaluation index 2 (probability of stuck pipe) and comprehensive index. The red plane represents the threshold value of the comprehensive evaluation index.  
In order to reduce the rate of missing alarm, the threshold value of comprehensive evaluation index of stuck pipe is set to 0.4, that is, when the comprehensive evaluation index is less than 0.4, it is considered that there is basically no risk of stuck pipe. The smaller the index is, the smaller the probability of stuck pipe is. When the comprehensive  
Figure 8: Function curve in sigmoid form.  
Figure 9: Schematic diagram of comprehensive evaluation index surface and threshold plane.  
evaluation index is greater than 0.4, it is considered that there is a risk of stuck pipe. The larger the index is, the greater the probability is.