Disclosure of Invention
In view of the above, the invention provides a vertical drilling deviation correction control method based on particle filtering and model prediction control, which combines a particle filter with improved model prediction control to reduce the negative influence of measurement noise on deviation correction control. And analyzing deviation correction control requirements and process limitations in the vertical drilling process, and researching the size and distribution characteristics of measurement noise and process noise in the vertical drilling process so as to give mathematical description of the deviation correction control problem. Then, considering the problem that the deviation correction control precision is influenced by measurement noise in the vertical drilling process, a particle filter is introduced to improve the control precision. And finally, designing a model prediction controller to realize deviation correction and deviation correction of the drilling track, and improving model prediction control by introducing soft constraint and variable optimization weight so as to reduce adverse effects of measurement noise on the controller.
The invention provides a vertical drilling deviation rectifying control method based on particle filtering and model predictive control, which comprises the following steps of:
s101: establishing a three-dimensional stratum coordinate system, wherein the Z axis is in the direction of a plumb line, the X axis points to the east direction, the Y axis points to the north direction, and establishing a drilling track extension model in the vertical drilling process according to the deviation rectifying process and the noise distribution in the vertical drilling process;
s102: linearizing and discretizing the drilling track extension model, introducing a soft constraint condition and a variable optimization weight matrix based on the noise distribution characteristic in the vertical drilling process, constructing an improved model prediction controller, giving a drilling reference track, and inputting the reference track to the improved model prediction controller; starting a vertical drilling process, and measuring and obtaining actual drilling track parameters containing noise; the reference tracks are a reference well inclination angle, a reference azimuth angle and a reference horizontal displacement in the drilling process;
s103: introducing a particle filter, and filtering the actual drilling track parameter containing the noise to obtain the actual drilling track parameter with the noise reduced;
s104: and converting the actual drilling track parameters subjected to noise reduction into feedback input signals of the improved model prediction controller by combining a minimum curvature method and a drilling track extension model, and inputting the feedback input signals to the improved model prediction controller to form vertical drilling closed-loop control.
Further, in step S101, the drilling trajectory extension model is represented by equation (1):
in the formulas (1), (2) and (3), alpha is the inclination angle of the drilling track, beta is the azimuth angle of the drilling track, and alpha
xIs the projection component, alpha, of the angle of inclination of the drilling path in the XOZ plane
yThe projection component of the well drilling track inclination angle on the YOZ plane is shown;
the drilling speed is used;
for the horizontal X-direction component S of the drilling path
xA derivative of (a);
for horizontal Y-direction component S of drilling track
yA derivative of (a);
is alpha
xA derivative of (a);
is alpha
yA derivative of (a); omega
SRThe rate of guidance for the drilling system;
orienting the drilling system magnetic tool at an angle; r is the build-up rate of the drilling system; mu.s
xIs the component of the process noise in the X direction during the drilling process; mu.s
yIs the component of the process noise in the Y direction during drilling.
Further, in step S102, the drilling trajectory extension model is linearized and discretized, specifically as shown in equation (4):
equation (4) is a linear discretization state space equation of the drilling track extension model, wherein
And
filter estimates of the actual lateral displacement of the tool of the drilling system in the X-axis and the Y-axis with respect to said reference trajectory at time k,
and
filter estimates, ω, of the projections on the XOZ and YOZ planes of the skew angle of the actual drilling trajectory relative to the reference trajectory at time k, respectively
ex(k) And omega
ey(k) T is the sampling period for the control increment on both planes relative to the reference steering rate.
Further, in step S102, a soft constraint condition and a variable optimization weight matrix are introduced to construct an improved model predictive controller, specifically: the prediction equation of the improved model prediction controller is as follows:
Y(k)=Ξkx(k|k)+ΘkW(k) (5)
in the formula (5), xikAnd ΘkAre parameter matrices of a prediction equation; in formula (5), each matrix is represented by formula (6):
in the formula (6), p is a preset prediction step length, and c is a preset control step length; sex(k +1| k) and Sey(k +1| k) are actual lateral displacement deviations of a drilling tool of the drilling system relative to the reference track in the X axis and the Y axis at k +1 time predicted at k time respectively; alpha is alphaex(k +1| k) and αey(k +1| k) are respectively the deviations of the projection values of the well inclination angles of the actual drilling track at the k +1 moment predicted at the k moment relative to the reference track on the XOZ and YOZ planes;
introducing a soft constraint condition and a variable optimization weight matrix to obtain an optimization constraint condition of the improved model predictive controller, which is specifically shown as a formula (7):
in the formula (7), Q and R are weight matrixes of the state quantity Y (k) and the controlled quantity U (k) of the prediction equation respectively;
q is represented by formula (8):
wherein q is
sxIs a component S in the X direction
xWeight of (a), q
syIs a Y-direction component S
yWeight of a
Q,b
Q, c
QAnd d
QIs an angle weight factor; alpha is alpha
rx(m) and alpha
ry(m) is the projection value of the well skew angle of the reference track at the moment m on the XOZ and YOZ planes;
and
the deviation of the projection value of the skew angle of the actual drilling track relative to the reference track at the moment m on the XOZ and YOZ planes is obtained; omega
rx(m) and ω
ry(m) is a reference control quantity at the moment m; omega
ex(m) and ω
ey(m) is the deviation of the actual controlled variable and the reference controlled variable at the moment m;
is an estimated value of the well inclination angle at the moment k; alpha is alpha
maxIs a preset maximum soft constraint for the well inclination angle.
Further, in step S103, the particle filter is specifically a basic particle filter.
Further, in step S104, the feedback input signal specifically includes: estimation of projection values of inclination angles of actual drilling paths on XOZ and YOZ planes
Estimation of the components of the horizontal displacement of the actual drilling trajectory in the X-direction and Y-direction
In step S104, after the feedback input signal is input into the improved model predictive controller, the output signal is the facing angle of the magnetic tool
And the guidance ratio omega
SRThe final actual controlled variable is specifically as shown in formula (9):
the beneficial effects provided by the invention are as follows: a particle filter is established in the deviation correction control, so that the influence of measurement noise on the deviation correction control of the vertical drilling can be effectively reduced, and the control precision is improved; soft constraints and variable optimization weights are introduced into the model predictive controller, and the environmental adaptability of the model predictive controller is improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be further described with reference to the accompanying drawings.
Referring to fig. 1, an embodiment of the present invention provides a vertical drilling deviation rectification control method based on particle filtering and model prediction control, including the following steps:
s101: establishing a three-dimensional stratum coordinate system, wherein the Z axis is in the direction of a plumb line, the X axis points to the east direction, the Y axis points to the north direction, and establishing a drilling track extension model in the vertical drilling process according to the deviation rectifying process and the noise distribution in the vertical drilling process;
s102: linearizing and discretizing the drilling track extension model, introducing a soft constraint condition and a variable optimization weight matrix based on the noise distribution characteristic in the vertical drilling process, constructing an improved model prediction controller, giving a drilling reference track, and inputting the reference track to the improved model prediction controller; starting a vertical drilling process, and measuring and obtaining actual drilling track parameters containing noise; the reference tracks are a reference well inclination angle, a reference azimuth angle and a reference horizontal displacement in the drilling process;
s103: introducing a particle filter, and filtering the actual drilling track parameter containing the noise to obtain the actual drilling track parameter with the noise reduced;
s104: and converting the actual drilling track parameters subjected to noise reduction into feedback input signals of the improved model prediction controller by combining a minimum curvature method and a drilling track extension model, and inputting the feedback input signals to the improved model prediction controller to form vertical drilling closed-loop control.
For convenience in explaining the symbols in the following formulas, the present invention unifies the definitions as follows:
in the variables, superscript with sharp brackets is an estimated value output by the particle filter;
the superscripts in the variables without tip brackets are all actual values;
in the variables, the variables with r subscripts are reference values of given reference tracks;
in the variables, the variables with e subscripts are all deviation values of actual values relative to reference quantities;
step S101, specifically: the vertical drilling system used in actual geological drilling is shown in fig. 2 and mainly comprises a screw-guided drilling tool, a driller room, a drill rod, a drill bit, an inclinometer and a turntable. The whole vertical drilling deviation correction control process comprises the steps of measuring track parameters by an inclinometer, calculating a next control instruction, and adjusting the rotation state of a turntable and an underground screw drill tool so as to perform directional deviation correction. It is worth noting that when the rotary table and the screw drill rotate simultaneously, the system is in a composite drilling state, and the system is not inclined; only the rotating disc is stopped rotating, the system is in a directional deflecting state, and the system provides a certain deflecting rate. By adjusting the ratio of the operating times of the two states, the system can provide different build rates.
According to the above analysis, a trajectory extension model is given as a control object model starting from the viewpoint of the drill kinematics. And establishing a three-dimensional stratum coordinate system, wherein the Z axis is in the plumb line direction, the downward direction is the positive direction, the X axis points to the east direction, and the Y axis points to the north direction. With reference to fig. 3, the trajectory extension model is shown in equations (1), (2) and (3):
the overall goal of deviation control is to simultaneously adjust the inclination angle α
x,α
yAnd horizontal displacement S
x,S
yThe drilling trajectory is returned to the vertical line, that is, the state quantity is zero. The input of the system is a reference drilling track, the system is a plumb line in vertical drilling, and the adjustable parameter of the system is a guidance ratio omega
SRAngle with magnetic tool face
Determines the direction of drilling, omega
SRThe proportion of the system in a directional deflecting state in a control period to the drilling time is indicated.
Due to the harsh environment in the well, the measurement inevitably has some noise. The vertical drilling process needs to keep a lower well inclination angle, so the accuracy of deviation correction control is very sensitive to measurement noise. The inclinometer mainly uses an acceleration sensor and a fluxgate sensor for track measurement, and as a conventional sensor, measurement noise of the inclinometer mainly comes from electronic thermal noise, the noise distribution generally follows normal distribution, and the maximum measurement noise of a well angle can even reach 1.5 degrees along with the increase of the well depth. For process noise, as shown in FIG. 4, based on actual drilling process data, the process noise causes the system maximum build rate r to float between 1.4-9.2/30 m, which approximately follows a gamma (3,2) distribution that is scaled in scale and amplitude.
Because of geological drilling measurement limitation, fixed point measurement technology is often adopted in engineering, namely drilling is stopped after a certain distance is drilled, and track parameters are measured, wherein the drilling distance is generally the length of one drill rod. Meanwhile, in the vertical drilling process, in order to ensure the track quality, the drilling well inclination angle is required to be kept smaller than alphamax. Once a exceeds amaxThe drilling system should preferentially reduce the angle of the well in order to ensure the quality of the drilling trajectory. Furthermore, the steering tool whiplash capability r is limited.
Aiming at the problem of measurement noise of a non-Gaussian nonlinear process in a drilling process, the invention designs a particle filter for the measurement noise. The particle filter is based on the Monte Carlo sampling theorem, and can better solve the filtering problem under the non-Gaussian non-linear condition.
Step S103 specifically includes: the particle filters used more widely mainly include basic particle filters, particle filters based on optimization algorithms, particle filters combined with other filters. The basic particle filter is fast and easy to realize, and comprehensively estimates the actual state of the system based on the prior probability distribution and the measured value, and the precision of the basic particle filter depends on the prior knowledge or the measured value precision. Particle filtering based on particle optimization algorithms primarily adjusts the particle distribution in real time based on measurements, in order to expect that the particles can approach the late distribution region, with accuracy dependent on the measurement accuracy. Particle filters combined with other filters use a combination of two filtering algorithms to alter the particle distribution through the other filter in order to expect the particles to be able to approach the region of the postpropagation distribution with a precision that depends on the filter precision.
However, since the vertical drilling process has a small angle of inclination and the measurement noise may be as high as 1.5 °, manual experience is more important than the measurement value for the filtering problem of the vertical drilling process. This makes the basic particle filter based on a priori knowledge more advantageous. Therefore, the invention adopts a basic particle filter algorithm to design a particle filter in the vertical drilling process, and the pseudo code of the algorithm is shown in table 1.
TABLE 1 vertical drilling Process particle Filter
To verify the effectiveness of the particle filter, a numerical simulation is designed based on a vertical drilling trajectory extension model. Setting the measurement noise to obey a normal distribution vα,xk,υα,ykN (0,0.49), the maximum measurement noise is 1.5. The process noise follows a gamma distribution (10 x μ)x,k+6)~Γ(3,2),(10*μy,k+6) to Γ (3,2), i.e. with a maximum error of 4 °/30 m. Comparing the Particle Filter (PF) with the Extended Kalman Filter (EKF), the particle filter based on Particle Swarm Optimization (PSOPF), and the Extended Kalman Particle Filter (EKPF), the single filtering result is shown in fig. 5, and the results of the 100 monte carlo experiments are shown in table 2:
TABLE 2100 Monte Carlo Filter results
From the single filtering result, errors of the particle filter, the particle filter based on particle swarm optimization and the extended Kalman particle filter are far smaller than measurement noise, and the extended Kalman filter diverges because process noise is gamma distribution. As can be seen from the table I, the particle filter based on particle swarm optimization and the extended Kalman particle filter lose the priori knowledge, and the measured values with larger errors are adopted to adjust the particle distribution, so that the filtering error is increased. The basic particle filtering performance is good, and the filtering precision can be further improved through other priori knowledge in drilling, such as engineering logging data, adjacent well data and the like.
To make the controller more robust and capable of displaying process control limits, the deskew control selects a model predictive controller.
Step S102 specifically includes: first, a prediction equation of a model predictive controller needs to be designed. Based on the vertical drilling track extension model established in the
step 1, linearization and discretization are required to be carried out on the model so as to simplify the design difficulty of the controller. Oblique angle alpha of well
xAnd alpha
yDisplacement S of drilling tool in X-axis and Y-axis
xAnd S
xAs the state quantity, the guidance ratio ω
xAnd omega
yTo control the quantity (guidance ratio omega)
xAnd omega
yCan be determined by the guidance ratio omega
SRAngle with magnetic tool face
Obtained by calculation, as shown in (1). In order to guarantee the control precision, the invention outputs the filter
The feedback signal is taken as the feedback signal of the model prediction controller, and the objective factor of smaller well inclination angle in the vertical drilling process is considered
And is
Then a linear model of the trajectory extension of the vertical drilling process can be obtained:
for the reason that the measurement while drilling system in engineering does not dynamically measure the track parameters, but stops drilling once every certain distance, generally the length of a drill rod, the model cannot be directly used for controller design, discretizes the model, replaces the derivative with the difference quotient, and after arrangement, the linear discrete state space equation is as follows:
wherein
And
the lateral displacements of the drilling tool in the X-axis and the Y-axis respectively with respect to the reference trajectory,
and
the projections of the inclination angle of the real drilling track relative to the reference track on the XOZ and YOZ planes respectively, v is the drilling speed, omega
ex(k) And omega
ey(k) Is the control increment on both planes relative to the reference guidance ratio. It is worth mentioning that the reference point on the reference track is consistent with the vertical depth of the current drilling tool.
Based on the discrete state space equation, assuming p as the prediction step length and c as the control step length, the model prediction controller prediction equation can be written as:
Y(k)=Ξkx(k|k)+ΘkW(k) (6)
wherein the meaning of each matrix is:
x(k|k)=[Sex(k|k) aex(k|k) Sey(k|k) aey(k|k)]T
based on the constraint analysis in step 1, in the vertical drilling process, in order to ensure the drilling track quality, the inclination angle of the well is generally kept less than alpha as much as possiblemaxOnce the well deviation exceeds αmaxThe drilling system should preferentially reduce the angle of the well in order to ensure the quality of the drilling trajectory. Furthermore, the steering tool whiplash capability r is limited. Therefore, the deviation correction control system is aimed at by combining constraint conditionsWe choose the following optimization problem:
in the above equation, Q and R are weight matrices of the state and the controlled variable, respectively, a larger Q value can ensure that the tracking error is smaller, but may cause oscillation, and a larger R value can ensure that the controlled variable changes more smoothly. In the course of trajectory deviation correction, the well inclination angle will be close to alpha
maxTo complete the rectification more quickly, however. The inclination angle is not free from fluctuation due to the influence of measurement noise, and the extreme condition can cause the inclination angle to greatly exceed alpha
maxWhen the angle of the well
Time (omega)
maxMaximum build rate that can be provided for one cycle of the actuator), the above optimization problem has no feasible solution, resulting in model predictive controller calculation errors. To solve the problem, the invention introduces a soft constraint and a variable optimization weight, wherein the soft constraint ensures that the model predictive controller always has a feasible solution, and the variable optimization weight based on the sigmoid function is combined to exceed alpha at the inclination angle
maxThe system is made to reduce well deviation preferentially to ensure drilling track quality. The variable optimization weights are given by the following equation and shown in fig. 6:
combining soft constraints and variable optimization weights, the sort optimization problem is shown as (9):
Step S104 specifically includes: because the optimized control quantity output of the controller is a control increment relative to the reference control quantity, the actual control quantity needs to be increased by the reference control quantity on the basis of the control increment; meanwhile, according to the model predictive control law, the actual control increment should take the first value u (k) of the optimized and calculated U (k) sequence, and finally the actual control quantity is obtained as follows:
finally, numerical simulation is designed to verify the deviation rectification control method. According to field data of a vertical well, at 600m, the offset in the x direction is 8.82m, the offset in the y direction is 1.51m, the well deviation is 1.5 degrees, and the azimuth is 35.9 degrees. In order to observe the effectiveness of the soft constraint and the variable optimization weight in the method of the invention more clearly, the initial skew angle is properly changed to 5.83 degrees, and the azimuth angle is 56.6 degrees. According to the foregoing process analysis, it is assumed that the measurement noise follows Gaussian vkN (0,0.49), which means that the maximum measurement noise is around 1.4 °, the process noise follows a gamma distribution (12 x μ °)k+6) to Γ (3,2), which means that the maximum process noise is around 3.4 °/30 m. The model prediction parameters are shown in table 3, and the simulation results are shown in fig. 7 and 8.
TABLE 3 simulation parameters
The control method proposed by the present invention is compared with the basic model predictive control method and the model predictive control method with only particle filters, respectively. Compared with a basic model prediction control method, the basic model prediction control method improves the fluctuation trend of the track to a certain extent, but is difficult to stabilize the inclination angle under the condition of larger measurement noise, so that the final track still has larger horizontal position deviation. Compared with the model prediction control method only provided with the particle filter, the model prediction control method only provided with the particle filter has control calculation errors at 600m and 643m respectively, and the obtained guidance ratio exceeds 100%, has no practical significance in vertical drilling. Meanwhile, as can be seen from the inclination angle value between 720m and 820m, the inclination angle in the model predictive control method only with the particle filter is easier to exceed alpha due to the lack of variable optimization weightmaxTherefore, the drilling trajectory quality is lower than that of the method of the present invention.
The control method proposed by the present invention is compared with the basic model predictive control method and the model predictive control method with only particle filters, respectively. Compared with a basic model prediction control method, the basic model prediction control method improves the fluctuation trend of the track to a certain extent, but is difficult to stabilize the inclination angle under the condition of larger measurement noise, so that the final track still has larger horizontal position deviation. Compared with the model prediction control method only provided with the particle filter, the model prediction control method only provided with the particle filter has control calculation errors at 600m and 643m respectively, the obtained guiding rate exceeds 100%, and the method has no practical significance in vertical drilling. Meanwhile, as can be seen from the inclination angle value between 720m and 820m, the inclination angle in the model predictive control method only with the particle filter is easier to exceed alpha due to the lack of variable optimization weightmaxTherefore, the drilling trajectory quality is lower than that of the method of the present invention.
The beneficial effects of the implementation of the invention are as follows: a particle filter is established in the deviation correction control, so that the influence of measurement noise on the deviation correction control of the vertical drilling can be effectively reduced, and the control precision is improved; soft constraints and variable optimization weights are introduced into the model predictive controller, and the environmental adaptability of the model predictive controller is improved.
The features of the above-described embodiments and embodiments of the invention may be combined with each other without conflict.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.