CN109902265B - Underground early warning method based on hidden Markov model - Google Patents

Underground early warning method based on hidden Markov model Download PDF

Info

Publication number
CN109902265B
CN109902265B CN201910150450.1A CN201910150450A CN109902265B CN 109902265 B CN109902265 B CN 109902265B CN 201910150450 A CN201910150450 A CN 201910150450A CN 109902265 B CN109902265 B CN 109902265B
Authority
CN
China
Prior art keywords
data
real
early warning
accident
initial
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910150450.1A
Other languages
Chinese (zh)
Other versions
CN109902265A (en
Inventor
陈雁
葛忆
李平
钟原
代臻
童兴格
黄嘉鑫
谢静
郑津
钟学燕
刘影
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southwest Petroleum University
Original Assignee
Southwest Petroleum University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Southwest Petroleum University filed Critical Southwest Petroleum University
Priority to CN201910150450.1A priority Critical patent/CN109902265B/en
Publication of CN109902265A publication Critical patent/CN109902265A/en
Application granted granted Critical
Publication of CN109902265B publication Critical patent/CN109902265B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a hidden Markov model-based underground early warning method, which comprises the following steps: s1, acquiring initial sample data; s2, predicting data of the next time period; s3, selecting real data and bringing the real data into an accident candidate set; s4, acquiring a real accident state corresponding to the real data in each time period; s5, acquiring a real accident state sequence corresponding to the initial sample data; s6, establishing an initial early warning model by using a hidden Markov model, and training the initial early warning model to obtain a trained early warning model; and S7, acquiring data generated by target drilling in real time, taking the data as the input of the pre-warning model after training, and performing real-time pre-warning through the pre-warning model after training. The method can effectively improve the comprehensiveness of underground prediction, so that the prediction result is more accurate.

Description

Underground early warning method based on hidden Markov model
Technical Field
The invention relates to the field of underground early warning, in particular to an underground early warning method based on a hidden Markov model.
Background
The task of drilling a borehole from the surface using mechanical equipment or manual labor is known as drilling. Generally refers to the engineering of drilling boreholes and large diameter water-supply wells for exploration or development of liquid and gaseous minerals such as oil, gas, and the like. The application of well drilling in national economic construction is extremely wide.
Based on drilling anomalies, there are few systems for accident prediction. Existing accident prediction methods typically calculate the borehole energy by calculating the expected tortuosity of the wellbore, calculate a first value by planning, and use the first value to compare to a predetermined threshold to achieve the predicted effect. The disadvantage is that only the degree of well tortuosity is taken as a criterion and only certain state values can be used, which would cause a prediction misalignment if uncertain state values were used.
The alarm for preventing drilling accident is composed of electric contact type hydraulic meter, hydraulic buffer and electronic sound-light alarm. The hydraulic buffer stably transmits the fluctuating hydraulic pressure to the hydraulic gauge. When the water pressure exceeds the normal range, the hydraulic pressure meter is communicated through the circuit of the alarm device, and sends out sound and light signals through the amplification and conversion action of the electronic technology, so that accidents are prevented in time. The disadvantage is that different conditions may occur in different climates, different places and different times, and the prediction error is large. Prediction errors will likely lead to serious consequences.
Disclosure of Invention
Aiming at the defects in the prior art, the underground early warning method based on the hidden Markov model can quickly and efficiently carry out underground early warning.
In order to achieve the purpose of the invention, the invention adopts the technical scheme that:
a hidden Markov model-based downhole early warning method is provided, which comprises the following steps:
s1, acquiring real data generated in the historical drilling process, and taking the real data as initial sample data;
s2, randomly selecting data of a certain time period from the real data of the initial sample data, and predicting the data of the next time period according to an autoregressive analysis method;
s3, respectively obtaining characteristic values of the predicted data and the real data in the same time period, obtaining the difference between the characteristic values of the predicted data and the real data in the same time period, and bringing the corresponding real data into an accident candidate set when the difference is larger than a threshold value;
s4, judging accidents according to real data in the accident candidate set by the expert system, screening out real accidents in the drilling process, classifying and marking the real accidents, and obtaining real accident states corresponding to the real data in each time period;
s5, arranging the real accident states corresponding to the data in each time period according to the time sequence to obtain a real accident state sequence corresponding to the initial sample data;
s6, establishing an initial early warning model by adopting a hidden Markov model, taking initial sample data and a corresponding real accident state sequence as training data of the initial early warning model, and training the initial early warning model to obtain a trained early warning model;
and S7, acquiring data generated by target drilling in real time, taking the data as the input of the pre-warning model after training, and performing real-time pre-warning through the pre-warning model after training.
Further, the specific method for predicting the data of the next time period according to the autoregressive analysis method in step S2 is as follows:
according to the formula
Figure BDA0001981371880000021
Data X over a t-1 time periodt-1Data X of prediction t time periodt(ii) a Wherein c is a white noise parameter; epsilontAn error parameter for a time period t;
Figure BDA0001981371880000031
and thetajAre all learning parameters; epsilont-jThe difference value of two adjacent data; i is the ith accident state; j is the jth accident state; p is the number of moving averages; and q is the order of the non-stationary sequence which is converted into the stationary sequence through differentiation.
Further, in step S6, training the initial early warning model by using the initial sample data and the corresponding accident state sequence as training data of the initial early warning model, and the specific method for obtaining the trained early warning model includes the following substeps:
s6-1, counting the real data in the initial sample data as a sequence (O) according to the time sequence1,O2,…,Ot,…,OTIn which O istBelongs to B, and B is an observation matrix; while the true accident status sequence is { q1,q2,…,qi/qj,…,qN}; wherein q isiRepresenting the i-th true accident situation, qjRepresenting the j-th real accident state; t ═ N;
s6-2, according to the formula
Figure BDA0001981371880000032
Acquiring the true accident state q in the adjacent time periodiTransfer to qjState transition probability of (a)ijFurther, a state transition probability matrix A, a is obtainedijE is A; wherein
Figure BDA0001981371880000034
For the real accident state in the adjacent time period by qiTransfer to qjFrequency of (d); n is the total number of the accident states;
s6-3, according to the formula
Figure BDA0001981371880000033
Obtaining the real accident state as qjAnd the real data is OtObservation probability of (2)
Figure BDA0001981371880000035
Wherein
Figure BDA0001981371880000036
For a true accident condition of qjAnd the real data is OtFrequency of (d);
s6-4, acquiring initial accident state q in all initial sample dataiFrequency of (n) isqiFurther obtaining an initial state vector pi; wherein piqi∈π;
S6-5, establishing an initial early warning model lambda (A, B, pi) based on the hidden Markov model according to the parameters obtained from the step S6-1 to the step S6-4, and obtaining a trained early warning model by taking the initial sample data and the corresponding real accident state sequence as training data of the initial early warning model; wherein A is a state transition probability matrix; b is an observation matrix; pi is an initial state vector; q. q oft∈qN
Further, the specific method of step S7 is:
and acquiring data generated by the target well in the current time period in real time, inputting the data into the trained early warning model, and predicting the probability of each underground accident at the next moment by the trained model according to the input data through a Vital algorithm to complete underground prediction.
The invention has the beneficial effects that: the invention adopts a state variable to represent the system states at different moments, such as the situations of drilling sticking, well leakage, blowout and the like at a certain moment and the possible abnormal situations of a single or a plurality of detection points, and the states under different situations are represented by setting the number of hidden states, thereby effectively improving the comprehensiveness of prediction and ensuring that the prediction result is more accurate. Meanwhile, the invention uses a group of observed values at a certain moment, such as the state values of well pressure value, gas quantity, vertical well depth and the like recorded at a certain moment in the drilling process, adopts more prediction standards to solve the problem of prediction error, and effectively improves the prediction accuracy.
Drawings
FIG. 1 is a schematic flow chart of the present invention.
Detailed Description
The following description of the embodiments of the present invention is provided to facilitate the understanding of the present invention by those skilled in the art, but it should be understood that the present invention is not limited to the scope of the embodiments, and it will be apparent to those skilled in the art that various changes may be made without departing from the spirit and scope of the invention as defined and defined by the appended claims, and all changes that can be made by the invention using the inventive concept are intended to be protected.
As shown in fig. 1, the hidden markov model-based downhole early warning method comprises the following steps:
s1, acquiring real data generated in the historical drilling process, and taking the real data as initial sample data;
s2, randomly selecting data of a certain time period from the real data of the initial sample data, and predicting the data of the next time period according to an autoregressive analysis method;
s3, respectively obtaining characteristic values of the predicted data and the real data in the same time period, obtaining the difference between the characteristic values of the predicted data and the real data in the same time period, and bringing the corresponding real data into an accident candidate set when the difference is larger than a threshold value;
s4, judging accidents according to real data in the accident candidate set by the expert system, screening out real accidents in the drilling process, classifying and marking the real accidents, and obtaining real accident states corresponding to the real data in each time period;
s5, arranging the real accident states corresponding to the data in each time period according to the time sequence to obtain a real accident state sequence corresponding to the initial sample data;
s6, establishing an initial early warning model by using a hidden Markov model, taking initial sample data and a corresponding real accident state sequence as training data of the initial early warning model, and training the initial early warning model to obtain a trained early warning model;
and S7, acquiring data generated by target drilling in real time, taking the data as the input of the pre-warning model after training, and performing real-time pre-warning through the pre-warning model after training.
The specific method for predicting the data of the next time period according to the autoregressive analysis method in step S2 is as follows: according to the formula
Figure BDA0001981371880000051
Data X over a t-1 time periodt-1Data X of prediction t time periodt(ii) a Wherein c is a white noise parameter; epsilontAn error parameter for a time period t;
Figure BDA0001981371880000052
and thetajAre all learning parameters; epsilont-jThe difference value of two adjacent data is obtained; i is the ith accident state; j is the jth accident state; p is the number of moving averages; and q is the order of the non-stationary sequence which is converted into the stationary sequence through differentiation.
In step S6, the specific method for training the initial early warning model by using the initial sample data and the corresponding accident state sequence as training data of the initial early warning model to obtain the trained early warning model includes the following substeps:
s6-1, counting the real data in the initial sample data as a sequence (O) according to the time sequence1,O2,…,Ot,…,OTIn which O istE is B, and B is an observation matrix; while the true incident State sequence is { q }1,q2,…,qi/qj,…,qN}; wherein q isiIndicates the ith true failure status, qjRepresenting the j real accident state; t ═ N;
s6-2, according to the formula
Figure BDA0001981371880000061
Obtaining the true accident state q in the adjacent time periodiTransfer to qjState transition probability of (a)ijFurther, a state transition probability matrix A, a is obtainedijBelongs to A; wherein
Figure BDA0001981371880000063
For real accident status in adjacent time periodiTransfer to qjFrequency of (d); n is the total number of the accident states;
s6-3, according to the formula
Figure BDA0001981371880000062
Acquiring the real accident state as qjAnd the real data is OtProbability of observation of
Figure BDA0001981371880000064
Wherein
Figure BDA0001981371880000065
For a true accident condition of qjAnd the real data is OtFrequency of (d);
s6-4, acquiring initial accident state q in all initial sample dataiFrequency of (n)qiFurther obtaining an initial state vector pi; wherein piqi∈π;
S6-5, establishing an initial early warning model lambda (A, B, pi) based on the hidden Markov model according to the parameters obtained from the step S6-1 to the step S6-4, and obtaining a trained early warning model by taking the initial sample data and the corresponding real accident state sequence as training data of the initial early warning model; wherein A is a state transition probability matrix; b is an observation matrix; pi is an initial state vector; q. q oft∈qN
The specific method of step S7 is: and acquiring data generated by the target well in the current time period in real time, inputting the data into the trained early warning model, and predicting the probability of each underground accident at the next moment according to the input data by the trained model through a Vibe algorithm to complete underground prediction.
In summary, the invention adopts a state variable to represent the system states at different times, such as the situations of stuck drilling, lost circulation, blowout and the like at a certain time and the possible abnormal situations of a single or a plurality of detection points, and the states under different situations are represented by setting the number of hidden states, so that the comprehensiveness of prediction is effectively improved, and the prediction result is more accurate. Meanwhile, the invention uses a group of observed values at a certain moment, such as the state values of well pressure value, gas quantity, vertical well depth and the like recorded at a certain moment in the drilling process, adopts more prediction standards to solve the problem of prediction error, and effectively improves the prediction accuracy.

Claims (3)

1. A hidden Markov model-based downhole early warning method is characterized by comprising the following steps:
s1, acquiring real data generated in the historical drilling process, and taking the real data as initial sample data;
s2, randomly selecting data of a certain time period from the real data of the initial sample data, and predicting the data of the next time period according to an autoregressive analysis method;
s3, respectively obtaining characteristic values of the predicted data and the real data in the same time period, obtaining the difference between the characteristic value of the predicted data and the characteristic value of the real data in the same time period, and bringing the corresponding real data into an accident candidate set when the difference is larger than a threshold value;
s4, according to the expert system, carrying out accident judgment on the real data in the accident candidate set, screening out real accidents in the drilling process, and classifying and marking the real accidents to obtain a real accident state corresponding to the real data in each time period;
s5, arranging the real accident states corresponding to the data in each time period according to the time sequence to obtain a real accident state sequence corresponding to the initial sample data;
s6, establishing an initial early warning model by using a hidden Markov model, taking initial sample data and a corresponding real accident state sequence as training data of the initial early warning model, and training the initial early warning model to obtain a trained early warning model;
s7, acquiring data generated by target drilling in real time, taking the data as input of the pre-warning model after training, and performing real-time pre-warning through the pre-warning model after training;
in step S6, training the initial early warning model by using the initial sample data and the corresponding accident state sequence as training data of the initial early warning model, and the specific method for obtaining the trained early warning model includes the following substeps:
s6-1, making statistics on real data in the initial sample data as a sequence { O1,O2,…,Ot,…,OTIn which O istE is B, and B is an observation matrix; while the true incident State sequence is { q }1,q2,…,qi/qj,…,qN}; wherein q isiIndicates the ith true failure status, qjRepresenting the j real accident state; t ═ N;
s6-2, according to the formula
Figure FDA0003390313040000021
Obtaining the true accident state q in the adjacent time periodiTransfer to qjState transition probability of (a)ijFurther, a state transition probability matrix A, a is obtainedijE is A; wherein
Figure FDA0003390313040000022
For real accident status in adjacent time periodiTransfer to qjFrequency of (d); n is the total number of the accident states;
s6-3, according to the formula
Figure FDA0003390313040000023
Obtaining the real accident state as qjAnd the real data is OtObservation probability of (2)
Figure FDA0003390313040000024
Wherein
Figure FDA0003390313040000025
For a true accident condition of qjAnd the real data is OtFrequency of (d);
s6-4, acquiring all initial sample data with the initial accident state qiFrequency of (n) isqiFurther obtaining an initial state vector pi; wherein piqi∈π;
S6-5, establishing an initial early warning model lambda (A, B, pi) based on the hidden Markov model according to the parameters obtained in the steps S6-1 to S6-4, and obtaining a trained early warning model by taking the initial sample data and the corresponding real accident state sequence as training data of the initial early warning model; wherein A is a state transition probability matrix; b is an observation matrix; pi is an initial state vector; q. q.st∈qN
2. The hidden markov model-based downhole early warning method according to claim 1, wherein the specific method for predicting the data of the next time period according to the autoregressive analysis method in step S2 is as follows:
according to the formula
Figure FDA0003390313040000026
Data X over a t-1 time periodt-1Data X of prediction t time periodt(ii) a Wherein c is a white noise parameter; epsilontAn error parameter for a time period t;
Figure FDA0003390313040000031
and thetajAre all learning parameters; epsilont-jIs two adjacent to each otherA differential value of the data; i is the ith accident state; j is the jth accident state; p is the number of moving averages; and q is the order of the non-stationary sequence which is converted into the stationary sequence through differentiation.
Figure FDA0003390313040000032
Figure FDA0003390313040000033
3. The hidden markov model-based downhole early warning method according to claim 1, wherein the specific method of the step S7 is as follows:
and acquiring data generated by the target well in the current time period in real time, inputting the data into the trained early warning model, and predicting the probability of each underground accident at the next moment by the trained model according to the input data through a Vital algorithm to complete underground prediction.
CN201910150450.1A 2019-02-28 2019-02-28 Underground early warning method based on hidden Markov model Active CN109902265B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910150450.1A CN109902265B (en) 2019-02-28 2019-02-28 Underground early warning method based on hidden Markov model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910150450.1A CN109902265B (en) 2019-02-28 2019-02-28 Underground early warning method based on hidden Markov model

Publications (2)

Publication Number Publication Date
CN109902265A CN109902265A (en) 2019-06-18
CN109902265B true CN109902265B (en) 2022-07-22

Family

ID=66945881

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910150450.1A Active CN109902265B (en) 2019-02-28 2019-02-28 Underground early warning method based on hidden Markov model

Country Status (1)

Country Link
CN (1) CN109902265B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110263433B (en) * 2019-06-19 2024-03-05 苏州科技大学 Fuse fault alarm method and system
CN111726341B (en) * 2020-06-02 2022-10-14 五八有限公司 Data detection method and device, electronic equipment and storage medium
CN112101673B (en) * 2020-09-22 2024-01-16 华北电力大学 Power grid development trend prediction method and system based on hidden Markov model

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105447304A (en) * 2015-11-10 2016-03-30 重庆邮电大学 Self-learning algorithm based warning system and mobile terminal

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7128167B2 (en) * 2002-12-27 2006-10-31 Schlumberger Technology Corporation System and method for rig state detection
US8478710B2 (en) * 2010-04-30 2013-07-02 Xerox Corporation On-line autoregressive prediction in time series with delayed disclosure and monitor systems using same
CN103308945B (en) * 2013-05-29 2015-07-08 吉林大学 Simulating generating and forecasting method for first arriving former noise for land exploration
CN103744977A (en) * 2014-01-13 2014-04-23 浪潮(北京)电子信息产业有限公司 Monitoring method and monitoring system for cloud computing system platform
CN104881711B (en) * 2015-05-18 2018-08-07 中国矿业大学 Underground early warning mechanism method based on miner's behavioural analysis

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105447304A (en) * 2015-11-10 2016-03-30 重庆邮电大学 Self-learning algorithm based warning system and mobile terminal

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Early Warning to Banking Crises in the Dual Financial System in Indonesia: The Markov Switching Approach;Irfan Nurfalah 等;《JKAU: Islamic Econ》;20180731;第31卷(第2期);133-156 *
基于隐马尔可夫模型的煤矿胶带机异常时间点预测;李小斌 等;《南京大学学报(自然科学版)》;20130330;第49卷(第2期);217-225 *
矿井通风瓦斯数据融合技术研究;申庆涛;《中国优秀硕士学位论文全文数据库 工程科技Ⅰ辑》;20130215(第02期);B021-155 *

Also Published As

Publication number Publication date
CN109902265A (en) 2019-06-18

Similar Documents

Publication Publication Date Title
US11346200B2 (en) Method and system for guaranteeing safety of offshore oil well control equipment
CN109902265B (en) Underground early warning method based on hidden Markov model
CN109508827B (en) Drilling accident early warning method based on time recursion neural network
Hou et al. Lost circulation prediction in south China sea using machine learning and big data technology
CN110619587B (en) Method and system for foundation pit monitoring intelligent early warning and data evidence storage
CN108663995B (en) Method and device for detecting abnormal trend of industrial process variable
CN102930253B (en) Coal and rock identification method based on image discrete multi-wavelet transform
CN106372799B (en) Power grid security risk prediction method
CN110580655A (en) Method and system for predicting coal mine water inflow based on LSTM algorithm
CN110738355A (en) urban waterlogging prediction method based on neural network
CN107862324B (en) MWSPCA-based CBR prediction model intelligent early warning method
Yang et al. Advanced real-time gas kick detection using machine learning technology
RU2745136C1 (en) Automated system for identification and prediction of complications in the process of construction of oil and gas wells
Li et al. Detection of downhole incidents for complex geological drilling processes using amplitude change detection and dynamic time warping
CN116777085B (en) Coal mine water damage prediction system based on data analysis and machine learning technology
CN114757365A (en) High-speed railway roadbed settlement prediction and early warning method based on deep learning
Ning et al. Real-time online prediction of surface settlement considering spatiotemporal characteristics during foundation excavation
CN115455791B (en) Method for improving landslide displacement prediction accuracy based on numerical simulation technology
CN113685166B (en) Drilling accident early warning method and system
CN114693151A (en) Bridge pile foundation state diagnosis method based on distributed strain space correlation
CN114970921A (en) Early warning method and system for severity of drilling blockage
Xiu et al. Lifetime prognosis of blowout preventer valve for offshore platform based on Wiener process
CN117094236B (en) High-precision calibration method for deep water drilling gas invasion data analysis
Hong et al. Drainage network flow anomaly classification based on XGBoost
Zhou et al. An Identification Method for Intelligent Prediction of Drilling Overflow Based on BiLSTM-BP Neural Network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant