Method of controlling well bore pressure based on model prediction control theory and systems theory

Abstract

A method for controlling well bore pressure based on model prediction control theory and systems theory, includes: detecting a well bottom pressure, a stand pipe pressure, a casing pressure, an injection flow rate and an outlet flow rate during the drilling operation process and determining the presence of overflow or leakage; if there is no overflow or leakage, then fine-adjusting the wellhead casing pressure according to the slight fluctuations of the well bottom pressure, the stand pipe pressure or the casing pressure; if there is overflow or leakage, simulating and calculating the overflow or leakage position and starting time of the overflow or leakage, predicting the variation over a future time period of the well bore pressure in the well drilling process, and utilizing an optimization algorithm to calculate the control parameter under a minimum of an actual well bottom pressure difference during the future period.

Claims

1. A method implemented with a controller coupled with memory devices having instructions code stored thereon for controlling well bore pressure, the controller including a computer equipped with capability for processing algorithms, evaluating polynomials and computing mathematical equations included with the stored instructions, wherein the instructions when executed by the computer, implement the method steps, comprising: detecting a well bottom pressure, a stand pipe pressure, a vertical casing pressure, an injection flow rate and an outlet flow rate during construction process; determining presence of overflow or leakage; if there is no overflow or leakage, then fine-adjusting the wellhead casing pressure according to a difference values between the well bottom pressure, the stand pipe pressure, the casing pressure and target pressures thereof, or the slight fluctuations of the well bottom pressure, the stand pipe pressure, or the casing pressure, so as to ensure that the well bottom pressure, the stand pipe pressure, or the casing pressure are at set values, wherein adjusting amount is optimized according to a conventional model prediction control algorithm, so as to calculate a control objective parameter of a next moment; if there is overflow or leakage, then using a well bore single-phase or multi-phase flow dynamic model to simulate and calculate the overflow or leakage position and starting time of the overflow or leakage, predicting the variation over a future time period of the well bore pressure in the well drilling process, and utilizing an optimization algorithm to calculate the control parameter under a minimum of an actual well bottom pressure difference during a future period; and repeating the optimization process for the next time period after a first control parameter is selected and set; (1) wherein a prediction control equation of the single-phase or multi-phase flow dynamic model is expressed by the following formula: { x .fwdarw. = f R [ x .fwdarw. ( t ) , u ( t ) , Q KL ] y ( t ) = g R [ x .fwdarw. ( t ) ] + e y , ( 1 ) wherein f.sub.R[], g.sub.R[] respectively represent well bore pressure system, a computing model thereof is calculated by theoretical formula of hydraulic single-phase flow and multi-phase flow; {right arrow over (x)}(t) represents a state vector at a moment of t, including the casing pressure; u(t) represents the casing pressure at the moment of t; y(t) represents the well bottom pressure at the moment of t; and e.sub.y represents an error of the well bottom pressure; (2) wherein an error between an actual measurement casing pressure and a prediction calculation casing pressure is a prediction error e(k+i),
wherein e(k+i)=y.sub.p(k)y.sub.M(k)(3) wherein y.sub.M(k) is an output value of a moment k; y.sub.p(k) is an actual measurement value of the moment k; (3) wherein a predicted value e(k+i) at a moment n+i in the future is estimated by a polynomial error fitting method based on values at a given moment, wherein the predicted value e(k+i) comprises an error at a moment k and a revised error, wherein during this process (L>l2>1), and when L=l2 e ( k + i ) = e ( k ) + .Math. i = 1 l 2 e l ( n ) i l = y p ( k ) - y M ( k ) + .Math. i = 1 l 2 l ( n ) i l ( 4 ) ( i = 1 , 2 , 3 , .Math. , L ) wherein e(k) is an error at the moment k; .sub.1(k) is a coefficient of a fitting polynomial; l.sub.2 is expanded orders of the fitting polynomial.

2. The method for controlling well bore pressure, as recited in claim 1, wherein a predicted value e(k+i) at a moment n+i in the future is estimated by a polynomial error fitting method based on values at a given moment, wherein the predicted value e(k+i) comprises an error at a moment k and a revised error, wherein during this process (L>l2>1), and when L=l2 e ( k + i ) = e ( k ) + .Math. i = 1 l 2 e l ( n ) i l = y p ( k ) - y M ( k ) + .Math. i = 1 l 2 l ( n ) i l ( 4 ) ( i = 1 , 2 , 3 , .Math. , L ) wherein e(k) is an error at the moment k; .sub.1(k) is a coefficient of a fitting polynomial; l.sub.2 is expanded orders of the fitting polynomial.

3. The method for controlling well bore pressure, as recited in claim 2, wherein the well bottom pressure is obtained according to exponential curve close to a reference pressure y.sub.ref, at the moment, a reference curve of the well bottom pressure is expressed as the following formula: r ( k + i | k ) = y ref - - Ts T ref .Math. ( k ) ( 5 ) wherein i=(1, 2, . . . H.sub.P); wherein T.sub.s represent a sampling time; T.sub.ref represents an exponential time of the reference curve; wherein symbol r(k+i|k) means evaluating reference curve at a moment (k+i) according to thereof the moment of k and predicting the well bottom pressure according to a nonlinear model, wherein when the well bottom pressure exceeds prediction range of the model, a previous input curve (k+i|k) is utilized to predict the well bottom pressure, wherein:
{right arrow over ({circumflex over (x)})}(k+i|k)=f.sub.P[{right arrow over ({circumflex over (x)})}(k+i1),(k+i|k),(k+i1|k),(k+i2), . . . ,(k|k)](6)
(k+i|k)=g.sub.P{right arrow over ({circumflex over (x)})}(k+i|k)(7) wherein f.sub.P is calculated according to theoretical formula of well bore hydraulic single-phase flow and multi-phase flow.

4. The method for controlling well bore pressure, as recited in claim 1, wherein the well bottom pressure is obtained according to exponential curve close to a reference pressure y.sub.ref, at the moment, a reference curve of the well bottom pressure is expressed as the following formula: r ( k + i | k ) = y ref - - Ts T ref .Math. ( k ) ( 5 ) wherein i=(1, 2, . . . H.sub.P); wherein T.sub.s represent a sampling time; T.sub.ref represents an exponential time of the reference curve; wherein symbol r(k+i|k) means evaluating reference curve at a moment (k+i) according to thereof the moment of k and predicting the well bottom pressure according to a nonlinear model, wherein when the well bottom pressure exceeds prediction range of the model, a previous input curve (k+i|k) is utilized to predict the well bottom pressure, wherein:
{right arrow over ({circumflex over (x)})}(k+i|k)=f.sub.P[{right arrow over ({circumflex over (x)})}(k+i1),(k+i|k),(k+i1|k),(k+i2), . . . ,(k|k)](6)
(k+i|k)=g.sub.P[{right arrow over ({circumflex over (x)})}(k+i|k)](7) wherein f.sub.P is calculated according to theoretical formula of well bore hydraulic single-phase flow and multi-phase flow.

5. The method for controlling well bore pressure, as recited in claim 1, wherein utilizing an optimization algorithm to calculate the control parameter under the minimum actual well bottom pressure difference over the future period specifically comprises: optimizing prediction output values of the process in a plurality of fitting points to be closest to a reference trajectory, wherein optimization performance indexes thereof are quadratic performance indexes and are obtained by optimization method, wherein: min J p = .Math. i = 1 m ( y r ( k + i ) - y ~ M ( k + i ) ) 2 ( 8 ) y ~ M ( k + i ) = y M ( k + i ) + e ( k + i ) ( 9 ) wherein (k+i) is a (k+i)th fitting time, m is a number of the fitting points, {tilde over (y)}.sub.M(k+i) is a prediction value of the process, y.sub.M(k+i) is a model prediction output at a moment of (k+i), e(k+i) is a prediction error, y.sub.r(k+i) is a reference trajectory at the moment of (k+i), wherein an optimal parameter of real-time control is obtained by calculating a minimum value of the formulas mentioned above.

6. A method implemented with a controller coupled with memory devices having instructions code stored thereon for controlling well bore pressure, the controller including a computer equipped with capability for processing algorithms, evaluating polynomials and computing mathematical equations included with the stored instructions, wherein the instructions when executed by the computer, implement the method steps comprising: detecting a well bottom pressure, a stand pipe pressure, a vertical casing pressure, an injection flow rate and an outlet flow rate during construction process; determining presence of overflow or leakage; if there is no overflow or leakage, then fine-adjusting the wellhead casing pressure according to a difference values between the well bottom pressure, the stand pipe pressure, the casing pressure and target pressures thereof, or the slight fluctuations of the well bottom pressure, the stand pipe pressure, or the casing pressure, so as to ensure that the well bottom pressure, the stand pipe pressure, or the casing pressure are at set values, wherein adjusting amount is optimized according to a conventional model prediction control algorithm, so as to calculate a control objective parameter of a next moment; if there is overflow or leakage, then using a well bore single-phase or multi-phase flow dynamic model to simulate and calculate the overflow or leakage position and starting time of the overflow or leakage, predicting the variation over a future time period of the well bore pressure in the well drilling process, and utilizing an optimization algorithm to calculate the control parameter under a minimum of an actual well bottom pressure difference during a future period; and repeating the optimization process for the next time period after a first control parameter is selected and set; wherein an error between an actual measurement casing pressure and a prediction calculation casing pressure is a prediction error e(k+i),
wherein e(k+i)=y.sub.p(k)y.sub.M(k)(3) wherein y.sub.M (k) is an output value of a moment k; y.sub.p(k) is an actual measurement value of the moment k; (1) wherein a predicted value e(k+i) at a moment n+i in the future is estimated by a polynomial error fitting method based on values at a given moment, wherein the predicted value e(k+i) comprises an error at a moment k and a revised error, wherein during this process (L>l2>1), and when L=l2 e ( k + i ) = e ( k ) + .Math. i = 1 l 2 e l ( n ) i l = y p ( k ) - y M ( k ) + .Math. i = 1 l 2 l ( n ) i l ( 4 ) ( i = 1 , 2 , 3 , .Math. , L ) wherein e(k) is an error at the moment k; .sub.1(k) is a coefficient of a fitting polynomial; l.sub.2 is expanded orders of the fitting polynomial; (2) wherein the well bottom pressure is obtained according to exponential curve close to a reference pressure y.sub.ref, at the moment, a reference curve of the well bottom pressure is expressed as the following formula:
r(k+i|k)=y.sub.refe.sup.(iTs/Tref)(k)(5) wherein i=(1, 2, . . . H.sub.P); wherein T.sub.s represents a sampling time; T.sub.ref represents an exponential time of the reference curve; wherein symbol r(k+i|k) means evaluating reference curve at a moment (k+i) according to thereof the moment of k and predicting the well bottom pressure according to a nonlinear model, wherein when the well bottom pressure exceeds prediction range of the model, a previous input curve (k+i|k) is utilized to predict the well bottom pressure, wherein:
{right arrow over ({circumflex over (x)})}(k+i|k)=f.sub.P[{right arrow over ({circumflex over (x)})}(k+i1),(k+i|k),(k+i1|k),(k+i2), . . . ,(k|k)](6)
(k+i|k)=g.sub.P[{right arrow over ({circumflex over (x)})}(k+i|k)](7) wherein f.sub.P is calculated according to theoretical formula of well bore hydraulic single-phase flow and multi-phase flow; (3) wherein utilizing an optimization algorithm to calculate the control parameter under the minimum actual well bottom pressure difference over the future period specifically comprises: optimizing prediction output values of the process in a plurality of fitting points to be closest to a reference trajectory, wherein optimization performance indexes thereof are quadratic performance indexes and are obtained by optimization method, wherein: min J p = .Math. i = 1 m ( y r ( k + 1 ) - y ~ M ( k + i ) ) 2 ( 8 ) y ~ M ( k + i ) = y M ( k + i ) + e ( k + i ) ( 9 ) wherein (k+i) is a (k+i)th fitting time, m is a number of the fitting points, {tilde over (y)}.sub.M(k+i) is a prediction value of the process, y.sub.M(k+i) is a model prediction output at a moment of (k+i), e(k+i) is a prediction error, y.sub.r(k+i) is a reference trajectory at the moment of (k+i), wherein an optimal parameter of real-time control is obtained by calculating a minimum value of the formulas mentioned above.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) Further descriptions of the present invention are illustrated combined with the accompanying drawings and the preferred embodiments, wherein:

(2) FIG. 1 is an analysis diagram of a prediction system of a well bore pressure model of the present invention.

(3) FIG. 2 is a basic principle diagram of a method for controlling well bore pressure based on model prediction control theory and systems theory of the present invention.

(4) FIG. 3 is a flow chart for optimally controlling the prediction system of the well bore pressure model in real time.

(5) FIG. 4 is a schematic view of the method for controlling the prediction system of the pressure model.

SYMBOLS IN THE FIGS

(6) I represents an input, which is a controllable parameter such as master factors comprising density, flow rate and reheological parameter of drilling fluid and other parameters of the well bore, or a real-time variable factor comprising casing pressure;

(7) S represents system of the well bore; and

(8) O represents an output, i.e., pressure traverse of the well bore or well bottom pressure.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

Embodiment 1

(9) The present invention discloses a method for controlling well bore pressure based on model prediction control theory and systems theory, comprising steps of:

(10) detecting a well bottom pressure, a stand pipe pressure, a casing pressure, an injection flow rate and an outlet flow rate during construction process;

(11) determining presence of overflow or leakage;

(12) if there is no overflow or leakage, then fine-adjusting the wellhead casing pressure according to the slight fluctuations of the well bottom pressure, the stand pipe pressure or the casing pressure, so as to ensure that the well bottom pressure the stand pipe pressure or the casing pressure is at the set value;

(13) if there is overflow or leakage, then using a well bore single-phase or multi-phase flow dynamic model to simulate and calculate the overflow or leakage position and starting time of the overflow or leakage, predicting the variation over a future time period of the well bore pressure in the well drilling process, and utilizing an optimization algorithm to calculate the control parameter under a minimum of an actual well bottom pressure difference during a future period; and

(14) repeating the optimization process for the next time period after a first control parameter is selected and set.

(15) In the technical solution mentioned above, besides the implementing mode thereof, the single-phase or multi-phase flow dynamic model can be implemented utilizing the conventional technique in the field. Besides the implementing mode in the technical solution of the present invention, the optimal algorithm can be implemented utilizing the conventional technique in the filed.

(16) Compared with the prior art, the technical solution of the present invention achieves following technical effects as follows. The method of the present invention is capable of monitoring and predicting in real time and online pressure history of the wellhead and the well bottom for some time in the future according to the actual situation, adjusting opening degree of the wellhead throttle valve to control the casing pressure, in such a manner that the pressure of the well bottom maintains in a safe window, so as to solve the technical problem existed in the prior arts of not capable of ensuring a safe pressure control for the well bore at any time, in such a manner that the well bore pressure is controlled in an engineering permissible fluctuation range and the object of precise pressure control is achieved. Furthermore, utilizing the method of the present invention is beneficial for significantly reducing underground complex accidents during the process of oil and gas drilling, and improving exploration and exploitation benefit, and thus has great significance.

Embodiment 2

(17) According to another preferred embodiment of the present invention, working principle of the present invention and the technical solution utilized thereof are as follows.

(18) 1. During the process of controlling the well bore pressure, the well bore is treated as a large scale system for pressure controlling.

(19) During the process of well drilling, due to the uncertainty of formation pressure, the formation fluid may enter the well bore while opening the ground with supply ability, and entrance amount thereof is not only related to formation parameters but also affected by the well bottom pressure. The well bottom pressure is directly influenced by the casing pressure, and is further influenced by recurrent state and friction pressure drop. When the formation fluid enters the well bore, flow status inside the well is changed, which influences entrance flow in reverse. Thus, the well bore and the formation are interacted and coupled with each other to form a unified wholeness, and are a large scale system. In order to control the well bore pressure traverse or the well bottom pressure to be at a prospective target value, it is necessary to treat an entire well bore as a system, which is denote as S.

(20) Providing the system with a trigger, i.e., an input, denoted as I, which can be a controllable parameter such as master factors comprising density, flow rate and rheological parameter of drilling fluid and other parameters of the well bore, or a real-time variable factor comprising casing pressure, the system reacts accordingly, i.e., having an output denoting ad O of well bore pressure traverse or well bottom pressure, which is shown as in FIG. 1 of the drawings.

(21) 2. The method for controlling well bore pressure is based on a model of well bore flowing rules, so as to process model-predictive control on the well bore pressure traverse or the well bottom pressure.

(22) Although the well bore system is a fuzzy system influenced by various factors, fluid flow inside the well bore still has hydrodynamic flow characteristics of itself and corresponding theoretical calculation model. However, calculation results of the model are not only affected by inaccuracy of description of objective physical law by the model itself, but also greatly interfered by environmental factors. There may be a difference between a required control result O and an output result. Therefore, the idea of model prediction control (MPC) can be introduced into the system, wherein the well bore pressure is controlled based on prediction of law of the system, in such a manner that based on the law of the system S, the input I outputs a prospective result O, so as to ensure that the well bore pressure controlled thereof maintains in a safety limit at all times.

(23) A detailed technical solution for obtaining an optimal casing pressure to predict and control real-time online pressure of the well bore is as follows.

(24) The well bottom pressure, the stand pipe pressure, the casing pressure, the injection flow rate, the outlet flow rate and the construction technological process are monitored during the whole process, and a basic idea of model prediction control (MPC) is introduced, so as to achieve objects of processing a real-time optimal control of the well bore pressure in a circulation circle during the process of drilling, and processing a foreseeing annular pressure compensation or regulation accordingly, so as to ensure that annulus pressure traverses at each moment in one or more prospective circulation circles are all within a safe range. Basic working principle for controlling the well bottom pressure model prediction is as shown in FIG. 2 and FIG. 3 of the drawings.

(25) As shown in FIG. 2 and FIG. 3 of the drawings, during the construction process, detecting a well bottom pressure, a stand pipe pressure, a vertical casing pressure, an injection flow rate and an outlet flow rate during construction process;

(26) determining presence of overflow or leakage and determining values thereof;

(27) if there is no overflow or leakage, then fine-adjusting the wellhead casing pressure according to the slight fluctuations of the well bottom pressure, the stand pipe pressure or the casing pressure, so as to ensure that the well bottom pressure, the stand pipe pressure or the casing pressure are at a set value; and

(28) if there is overflow or leakage, then using a well bore single-phase or multi-phase flow dynamic model to simulate and calculate the overflow or leakage position and starting time of the overflow or leakage, predicting the variation over a future time period of the well bore pressure in the well drilling process, a circulation circle for example, and promptly utilizing an optimization algorithm to calculate the control parameter under a minimum of an actual well bottom pressure difference (a minimum amount of overflow and leakage) in the security condition mentioned above during a future period, such as casing pressure, displacement, and density and viscosity of the drilling fluid.

(29) Within a certain range of time, the object mentioned above is achieved by adopting different time intervals and under different control settings. After a first control parameter is selected and set, an optimization process for the next time period is repeated.

(30) As shown in FIG. 4 of the drawings, discretization time settings are adopted, and time series at a time t is shown, wherein a vertical line in the FIG. 4 shows a current time. In FIG. 4 of the drawings, an actual well bottom pressure curve before the current time and a simulation calculation curve are shown, and simulated parameters are processed with feedback compensation according to actual data. As shown in FIG. 4 of the drawings, the simulation calculation curve at the current moment does not coincide with control points. According to a difference value thereof, a reference curve is set. Calculate curves thereof so as to ensure that differences between a prediction curve and the reference curve are at a minimum value.

Embodiment 3

(31) Referring to accompanying drawings of the specification, a best mode of the present invention is as follows.

(32) A basic algorithm for the controlling method of the prediction system of the well bore pressure model is as follows.

(33) In the well bore system BHP=f(Q.sub.L,Q.sub.G,.sub.L,.sub.L,P.sub.c,Q.sub.KL,H.sub.KL,T.sub.KL,OD,ID,L, . . . ), if variable parameters are not determined to be leakage and overflow amount of the drilling fluid, distribution of the well bore pressure changes accordingly, wherein control object is set to be achieved by adjusting the casing pressure.

(34) As shown in FIG. 3 of the drawings, according to control principle of the well bore pressure model prediction, parameter relationship of the well bore pressure can be described as a form of model prediction control equation, which is expressed as follows:

(35) { x .fwdarw. = f R [ x .fwdarw. ( t ) , u ( t ) , Q KL ] y ( t ) = g R [ x .fwdarw. ( t ) ] + e y , ( 1 )

(36) wherein f.sub.R[], g.sub.R[] respectively represent well bore pressure system, a computing model thereof is calculated by theoretical formula of hydraulic single-phase flow and multi-phase flow;

(37) {right arrow over (x)}(t) represents a state vector at a moment of t, including the casing pressure;

(38) u(t) represents the casing pressure at the moment of t;

(39) y(t) represents the well bottom pressure at the moment of t; and

(40) e.sub.y represents an error of the well bottom pressure;

(41) converting the well bore continuous model established into the following discrete model:

(42) { x .fwdarw. ~ = f M [ x .fwdarw. ~ ( k - 1 ) , u ~ ( k ) , u ~ ( k - 1 ) , Q .fwdarw. ~ KL ] y ~ ( k ) = g M [ x .fwdarw. ~ ( k ) ] , ( 2 )

(43) wherein {right arrow over ({tilde over (x)})} represents a state vector at a moment of k;

(44) (k) represents the casing pressure at the moment of k;

(45) {right arrow over ({tilde over (Q)})}.sub.KL represents ground leakage or overflow vector; and

(46) {tilde over (y)}(k) represents a calculated value of the well bottom pressure at the moment of k;

(47) Time intervals of the discrete nonlinear oil-gas well reservoir model are short than controlled time intervals, so casing pressures within time intervals of two moments are capable of being obtained by processing linear interpolation on two casing pressures u(k1) and u(k) which are respectively at two adjacent time intervals of k1 moment and k moment.

(48) An object of the control algorithm is to control the well bottom pressure in accord with a reference pressure y.sub.ref. Because the actual measurement stand pipe pressure and casing pressure are influenced by noises and model dismatch, there is an error between an actual measurement stand pipe pressure and casing pressure and a prediction calculation stand pipe pressure and casing pressure, which is called a prediction error. During controlling process of the model prediction, the prediction error passes through a predictor, so as to predict error in area of future prediction and are introduced to a reference predict reference trajectory for compensating. There are various methods for predicting errors, e.g., the e(k+i) prediction error is valued as follows,
e(k+i)=y.sub.p(k)y.sub.M(k)(3)

(49) wherein y.sub.M(k) is an output value of a moment k (the stand pipe pressure, the casing pressure or the well bottom pressure); y.sub.p(k) is an actual measurement value of the moment k (the stand pipe pressure, the casing pressure or the well bottom pressure).

(50) In order to improve precision, predicted value e(k+i) at a moment n+i in the future is usually estimated by a polynomial error fitting method based on values at a given moment, wherein the predicted value e(k+i) comprises an error at a moment k and a revised error, wherein during this process (L>l2>1), and when L=l2

(51) e ( k + i ) = e ( k ) + .Math. i = 1 l 2 e l ( n ) i l = y p ( k ) - y M ( k ) + .Math. i = 1 l 2 l ( n ) i l ( 4 ) ( i = 1 , 2 , 3 , .Math. , L )

(52) wherein e(k) is an error at the moment k;

(53) .sub.1(k) is a coefficient of a fitting polynomial;

(54) l.sub.2 is expanded orders of the fitting polynomial.

(55) In order to avoid fluctuations, the well bottom pressure is obtained according to exponential curve close to a reference pressure y.sub.ref, at the moment, a reference curve of the well bottom pressure is expressed as the following formula:

(56) r ( k + i | k ) = y ref - - Ts T ref .Math. ( k ) ( 5 )

(57) wherein i=(1, 2, . . . H.sub.P);

(58) wherein T.sub.s represent a sampling time;

(59) T.sub.ref represents an exponential time of the reference curve;

(60) wherein symbol r(k+i|k) means evaluating reference curve at a moment (k+i) according to the moment of k and the well bottom pressure is usually predicted according to a nonlinear model, wherein when the well bottom pressure exceeds prediction range of the model, a previous input curve (k+i|k) is utilized to predict the well bottom pressure, wherein:
{right arrow over ({circumflex over (x)})}(k+i|k)=f.sub.P[{right arrow over ({circumflex over (x)})}(k+i1),(k+i|k),(k+i1|k),(k+i2), . . . ,(k|k)](6)
(k+i|k)=g.sub.P[{right arrow over ({circumflex over (x)})}(k+i|k)](7)

(61) wherein f.sub.P is calculated according to theoretical formula of well bore hydraulic single-phase flow and multi-phase flow.

(62) In the rolling optimization algorithm for controlling the prediction model, an optimal input curve for future control (k+i|k) is obtained by a series of steps comprising iterating, optimizing and constraining, wherein a most commonly utilized method thereof comprises step of:

(63) optimizing prediction output values of the process in a plurality of fitting points to be closest to a reference trajectory, wherein optimization performance indexes thereof are quadratic performance indexes and are solved by optimization method, wherein:

(64) 0 min J p = .Math. i = 1 m ( y r ( k + i ) - y ~ M ( k + i ) ) 2 ( 8 ) y ~ M ( k + i ) = y M ( k + i ) + e ( k + i ) ( 9 )

(65) wherein (k+i) is a (k+i)th fitting time, m is a number of the fitting points, {tilde over (y)}.sub.M(k+i) is a prediction value of the process, y.sub.M(k+i) is a model prediction output at a moment of (k+i), e(k+i) is a prediction error, y.sub.r(k+i) is a reference trajectory at the moment of (k+i),

(66) wherein an optimal parameter of real-time control is obtained by calculating a minimum value of the formulas mentioned above, an optimal opening of the throttle valve,

(67) wherein an optimal opening of the throttle valve means that the well bottom pressure maintains at a reference pressure, y.sub.ref is obtained by minimization of a formula via the optimal algorithm.

(68) Since initial casing pressure is known, a first new group of casing pressure curve is explicitly provided by algorithm, i.e., calculating according to the formula (8). Measurement results are analyzed to select a second new group of casing pressure. Then the process is repeated until an optimal control casing pressure which is in accordance with the reference well bottom pressure.

Embodiment 4

(69) On the basis of the example 3, the present invention provides another method for controlling well bore pressure based on model prediction control theory and systems theory: a method for controlling model prediction system based on PWD measured data.

(70) In order to accurately predict pressure variation in a next moment for taking precautions of precise pressure control, so as to ensure that the well bottom pressure maintains at a given range both at the current moment and in the future. The control method of the present invention introduces a basic idea for controlling model prediction in modern control theory to the well bore pressure control. The method of the present invention can be utilized for calculating well bore pressure traverse based on hydraulic theory of well bore, monitoring pressure of the well bottom in real time via a well bottom monitoring method, checking the hydraulic model in real time, predicting and calculating pressure variation of well bore annulus dynamic pressure on the basis of historical information, and determining pressure control measures to be taken. A basic idea of simple algorithm of the method is as follows.

(71) The hydraulic model calculates and analyzes the well bore pressure in real time, so as to provide a control casing pressure P.sub.C(i) at a moment i,
P.sub.C(i)=BHP.sub.Target(i)P.sub.H(i)P.sub.F(i)(10)

(72) wherein i represents to an ith moment, BHP.sub.Target(i) represents a target control value of the well bottom pressure, P.sub.H(i) is a hydrostatic fluid column pressure of the drilling fluid, and P.sub.F(i) represents an annulus friction pressure.

(73) There is an error (i) between the well bottom pressure BHP.sub.M(i) by real-time calculation and the actually measured well bottom pressure, BHP.sub.C(i)
(i)=BHP.sub.M(i)BHP.sub.C(i)(11).

(74) Since the actually measured well bottom pressure is known, calculation of the well bottom pressure of a next moment is capable of being amended and checked, in such a manner that the well bottom pressure calculated is more precise, and that both calculated and actually measured well bottom pressures at a next moment are closer to control target of well bottom pressure BHP.sub.Target:
BHP.sub.TargetBHP.sub.Predected Control(i+1)=BHP.sub.Calculated(i+1)+y(i)(12),

(75) wherein y(i)=(i)+f((i)), f((i)) is an error tendency modified function of a first i moments, and a calculation thereof can be processed utilizing model prediction control algorithm in modern control theory.

(76) Thus, well bottom pressure of a next moment can be calculated and predicted thereby, and a control equation of the control casing pressure is provided:
P.sub.C(i+1)=BHP.sub.TargetP.sub.H(i)P.sub.F(i)y(i)(13).

(77) During normal drilling process, under conditions with no variation of other duty parameters and leaving out effects of temperature of pressure on pressure of drilling fluid column and on friction, a casing pressure regulating control equation at a next moment is obtained:
P.sub.C(i+1)=P.sub.C(i)f((i))(14).

Embodiment 5

(78) On the basis of example 3 and example 4, the present invention provides another controlling the prediction system of the well bore pressure model: a hydraulic model checking method based on measured data.

(79) When there is no PWD measured data, data of a memory pressure gauge is utilized for checking the hydraulic model for drilling of a next time or checking a hydraulic model of adjoining well with basically same parameters.

(80) A main checking parameter for checking is frictional pressure loss. In general, gravity pressure drop is slightly affected by external factors, so a main factor that determines variations of the well bottom pressure is circulatory frictional pressure loss. Therefore, if well bottom pressure data corresponding to well depth (true vertical depth), actual frictional pressure loss is capable of being calculated. Correlation of the frictional pressure loss calculated by hydraulic model and the actual frictional pressure loss is fitted with changes of the well depth: f(x)=a+bx+cx.sup.2 . . . . Thus, during drilling of a next time, formula of the correlation is utilized for checking circulatory pressure loss of the hydraulic calculation with considering checking coefficients of changes of density, displacement and well depth, which is capable of basically meeting requirements for controlling the well bottom pressure.

(81) One skilled in the art will understand that the embodiment of the present invention as shown in the drawings and described above is exemplary only and not intended to be limiting.

(82) It will thus be seen that the objects of the present invention have been fully and effectively accomplished. Its embodiments have been shown and described for the purposes of illustrating the functional and structural principles of the present invention and is subject to change without departure from such principles. Therefore, this invention includes all modifications encompassed within the spirit and scope of the following claims.