Particle swarm optimization-based real-time sound wave time difference extraction method
Technical Field
The invention relates to the field of petroleum drilling and well logging, in particular to a time difference real-time extraction method of a while-drilling acoustic downhole signal acquisition and processing system.
Background
Compared with cable logging, the acoustic logging while drilling technology can effectively collect data before mud filtrate invades a stratum, is less influenced by invasion, can more objectively detect the original stratum condition, and has higher research value on stratum information. The application of the logging-while-drilling technology integrates the drilling process and the logging process, and the logging is completed in the drilling process, so that the drilling operation efficiency is improved, and the logging cost is greatly reduced. In addition, in some highly difficult logging operations, such as tests of horizontal wells and highly deviated wells, cable logging cannot complete logging work, and only logging while drilling can be selected.
The method can obtain the amplitude, frequency, time difference and other related information of fluid waves, longitudinal waves and transverse waves of the stratum by using the acoustic logging while drilling technology, the parameters are important basis for evaluating the porosity, lithology and rock mechanical elasticity of the stratum, the rock breaking pressure value of the stratum can be obtained through certain calculation, the oil and gas information of the current stratum can be accurately reflected, and the method is an effective method for oil and gas detection. Compared with other logging technologies, the acoustic logging instrument developed by the acoustic logging technology has the advantages of high logging speed, light instrument weight and the like. However, the volume of data acquired by the acoustic logging while drilling technology is large, mud pulses are used for transmission, the data transmission efficiency is extremely low, a large amount of acquired data cannot be transmitted to a ground system in real time, namely, the measured acoustic data cannot be uploaded in real time, and ground workers cannot determine whether an instrument works in a normal state or not, so that the bottom layer information cannot be extracted from the acoustic data to downhole time difference.
Original data of acoustic logging while drilling cannot be directly applied. Before application, the raw data (waveform data) must be processed accordingly to extract information that is interesting and easily accepted and applied by drilling personnel, geology personnel, oil field developers, related engineering personnel and the like. The original waveform data measured by the conventional cable acoustic logging is transmitted to the surface through a cable and then is correspondingly processed. Different from the conventional cable acoustic logging original waveform processing, the original waveform data cannot be directly transmitted to the ground and then processed due to the limitation of the transmission rate of logging-while-drilling data, the original waveform data must be processed underground, and the processing result is transmitted to the ground in real time.
The slowness extraction from the sound wave is the most basic link in the acoustic logging while drilling, and due to the complexity of the underground condition, the quality of actual logging information is difficult to guarantee, so that the waveform processing work becomes quite complicated and difficult.
The existing well-known while-drilling sound wave time difference extraction technology can be divided into three categories, namely a first wave detection method, an STC method and an artificial intelligence algorithm.
The head wave detection method is simple and convenient to implement, and many logging instruments can be implemented by hardware. However, this method has poor noise immunity, and it is difficult to use it to find the head wave arrival for a waveform in which noise is mixed with sound waves. The STC method is a method for extracting the acoustic wave slowness by utilizing correlation processing and is proposed by Kimbal et al in 1984, and the method is strong in noise resistance and high in calculation accuracy. But the calculation amount is huge, the technical difficulty is more, and the realization is difficult. The artificial intelligence algorithm adopted at present comprises a simulated annealing method, a genetic algorithm and the like, and due to the limitations of the algorithms, the algorithms are easy to fall into local minimum values, so that the algorithms are possible to be not converged, the time difference of the extracted sound waves is incorrect, and although the calculation amount of the method is small, the calculation accuracy is not high.
Forced by the limitation of transmission conditions under the condition of drilling, the slowness extraction of the acoustic logging while drilling can only be realized by hardware underground, and the accuracy of the head wave detection method is too low to be suitable for time difference extraction under the condition of drilling. Although the STC method has strong anti-noise capability and high calculation precision, the STC method has huge calculation amount and more technical difficulties and is difficult to realize underground. According to the characteristics of acoustic logging while drilling, an acoustic time difference extraction method based on particle swarm optimization is provided. The method fully utilizes the characteristics of the particle swarm optimization algorithm, has high convergence speed, can find a global optimum point, and can be used for time difference extraction of longitudinal waves and quadrupole waves of a well sound field.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a particle swarm optimization-based real-time extraction method of sound wave time difference, which combines a particle swarm optimization algorithm in an artificial intelligence algorithm with a correlation calculation method in an STC algorithm, can realize global optimization in the process of extracting the sound wave time difference and has the characteristics of quick extraction of stratum sound wave time difference and high reliability.
In order to achieve the purpose, the invention provides a particle swarm optimization-based real-time extraction method of sound wave time difference, which comprises the following steps of:
(1) giving the first wave arrival time and the range of sound wave time difference of a certain mode wave;
(2) initializing a population;
(3) calculating the fitness value of the particles;
(4) updating the historical highest fitness value of the particles and the global historical highest fitness value of the population;
(5) updating the particle speed and position;
(6) and judging whether the algorithm meets the termination condition, if so, stopping iteration, and otherwise, turning to the step (3).
The step (1) as described above for giving the range of the head wave arrival time and the acoustic wave time difference of a certain mode wave is realized by the following steps: the method comprises the steps of firstly carrying out geological modeling according to regional seismic data, adjacent well logging data and logging data, inverting information of a stratum to be drilled, then estimating the propagation speed of sound waves in the stratum according to the information of the stratum, and finally estimating the first wave arrival time and the sound wave time difference range of mode waves by combining the source distance between receivers and transmitters and the distance between the transmitters.
Initializing the population in step (2) as described above includes the following:
1) initializing the number m of particles in the population, and then setting the population consisting of m particles as X ═ X1,X2,…Xm}T;
2) Initializing iteration times t;
3) initiating particle XiIs at a position Xi=(xi1,xi2,…,xid)TWherein d is the search space dimension;
4) initiating particle XiHas a velocity of Vi=(vi1,vi2,…,vid)T;
5) Initializing an inertia factor w;
6) initializing the learning factor C1,C2;
7) Initializing the velocity V of the particle in each dimensiondIn the range of [ -V [ - ]d max,+Vd max]。
The fitness value of the particles calculated in step (3) is determined by performing correlation calculation on the data waveform, and the common correlation calculation methods include:
firstly, carrying out correlation calculation on data waveforms by a waveform similarity method;
the similarity of the multi-channel waveforms is defined as:
wherein f iskFor array waveform data, IW is the window length and M is the number of waveform channels. The similarity value ranges from 0 (full negative correlation) to 1 (full positive correlation); the similarity value between M pieces of uncorrelated noisy data is easily proved to be 1/M;
according to this calculation method, a similarity coefficient can be calculated for each determined window. Therefore, the position and the shape of the window are changed by adjusting the time parameter t and the slowness parameter s, and the corresponding similarity value is calculated, namely a series of correlation function values taking t and s as parameters are obtained;
secondly, carrying out correlation calculation on the data waveform by a cross-correlation method;
let xN(n)、yN(N) are two time series of similar waveform components of length N, the correlation coefficient between them can be defined as:
wherein the content of the first and second substances,r2N(N) represents the similarity coefficient of the waveform in two time windows with the starting position different by N points, N represents the window length, xN(i) And yN(i) Respectively representing the ith sample of the two time sequences in a time window;
thirdly, carrying out correlation calculation on the data waveform by a root stack method for N times;
the root stack equation for N times is:
Yi=Ri|Ri|N-1
wherein x isi,jThe ith sampling point data of the jth channel, i is more than or equal to 1 and less than or equal to IW, j is more than or equal to 1 and less than or equal to K, IW is the length (window length) of each channel signal, K is the total channel number, N is any positive integer (generally N is more than or equal to 4), GjIs the gain of the j-th channel, G is the gain for all channel data, wjAs a weighting factor, YiThe multi-channel signal is a one-dimensional filtering output array, and similar parts in the multi-channel signal can be output after the multi-channel signal is subjected to N times of root filtering.
Updating the historical highest fitness value of the particle and the global historical highest fitness value of the population in the step (4) as described above specifically means comparing the fitness value of each particle with the fitness value of the best position it experiences, and if better, updating the individual extreme point; the fitness value for each particle is compared to the fitness value for the best location experienced globally and if better, the global extreme point is updated.
Updating the particle velocity and position equations in step (5) as described above is:
in the formula (I), the compound is shown in the specification,
is the velocity of the particle in the d dimension in the ith iteration; rand
1,2Is [0,1 ]]A random number in between;
is the current position of particle i in the d-th dimension in the k-th iteration; pbest
idIs the position of the individual extreme point of particle i in d-dimension; gbest is the position of the global extreme point of the whole cluster in the d-th dimension.
The real-time extraction method of the sound wave time difference based on particle swarm optimization has the advantages that the particle swarm optimization algorithm is based on random search of the population and is not influenced by the size of the head wave arrival time step length and the slowness step length, sound wave time difference extraction is carried out by using the method, and the global optimal solution in the given time difference and head wave arrival time range can be obtained only by carrying out partial calculation. Traversing search of time and slowness is not needed, the calculation amount of a program is greatly reduced, and the formation acoustic wave time difference can be rapidly and accurately extracted.
Drawings
FIG. 1 is a flow chart of real-time extraction of acoustic wave time difference based on particle swarm optimization;
FIG. 2 is a diagram of an optimization process of a particle swarm optimization algorithm.
Detailed Description
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Referring to the attached figure 1, the real-time extraction method of the sound wave time difference based on particle swarm optimization comprises the following steps:
first step S101: given the range of head wave arrival times and acoustic moveout for a certain mode wave.
The method is implemented by the following steps of giving the range of the head wave arrival time and the sound wave time difference of a certain mode wave: firstly, geological modeling is carried out according to regional seismic data, adjacent well logging data and logging data, information of a stratum to be drilled is inverted, then the propagation speed of sound waves in the stratum is estimated according to the information of the stratum, and finally the range of the first wave arrival time and the sound wave time difference of mode waves is estimated by combining the source distance between receivers and transmitters and the distance between the transmitters.
Second step S102: and initializing the population.
The initialization population includes the following:
1) initializing the number m of particles in the population, and then setting the population consisting of m particles as X ═ X1,X2,…Xm}T;
2) Initializing iteration times t;
3) initialization particle XiIs at a position Xi=(xi1,xi2,…,xid)TWherein d is the search space dimension;
4) initialization particle XiHas a velocity of Vi=(vi1,vi2,…,vid)T;
5) Initializing an inertia factor w;
6) initializing a learning factor C1,C2;
7) Initialising the velocity V of the particles in each dimensiondIn the range of [ -V [ - ]d max,+Vd max]。
The third step S103: the fitness value of the particle is calculated.
The fitness value of the particle is calculated by performing correlation calculation on the data waveform, and the common correlation calculation methods include:
firstly, carrying out correlation calculation on data waveforms by a waveform similarity method;
the similarity of the multi-channel waveforms is defined as:
wherein f iskFor array waveform data, IW is the window length and M is the number of waveform channels. The similarity value ranges from 0 (full negative correlation) to 1 (full positive correlation); the similarity value between M pieces of uncorrelated noisy data is easily proved to be 1/M;
according to this calculation method, a similarity coefficient can be calculated for each determined window. Therefore, the position and the shape of the window are changed by adjusting the time parameter t and the slowness parameter s, and the corresponding similarity value is calculated, namely a series of correlation function values taking t and s as parameters are obtained;
performing correlation calculation on the data waveform by a cross-correlation method;
let xN(n)、yN(N) are two time series of similar waveform components of length N, the correlation coefficient between them can be defined as:
wherein r is2N(N) represents the similarity coefficient of the waveform in two time windows with the starting position different by N points, N represents the window length, xN(i) And yN(i) Respectively representing the ith sample of the two time sequences in a time window;
thirdly, carrying out correlation calculation on the data waveform by using a root stack method for N times;
the root stack equation for N times is:
Yi=Ri|Ri|N-1
wherein x isi,jThe ith sampling point data of the jth channel, i is more than or equal to 1 and less than or equal to IW, j is more than or equal to 1 and less than or equal to K, IW is the length (window length) of each channel signal, K is the total channel number, N is any positive integer (generally N is more than or equal to 4), GjIs the gain of the j-th channel, G is the gain for all channel data, wjAs a weighting factor, YiThe multi-channel signal is a one-dimensional filtering output array, and similar parts in the multi-channel signal can be output after the multi-channel signal is subjected to N times of root filtering.
The fourth step S104: and updating the historical highest fitness value of the particle and the global historical highest fitness value of the population.
Updating the historical highest fitness value of the particle and the global historical highest fitness value of the population specifically means comparing the fitness value of each particle with the fitness value of the best position experienced by the particle, and if the fitness value is better, updating the individual extreme point; the fitness value for each particle is compared to the fitness value for the best location experienced globally and if better, the global extreme point is updated.
The fifth step S105: the particle velocity and position are updated.
Update particle velocity and position equations as:
in the formula (I), the compound is shown in the specification,
is the velocity of the particle in the d dimension in the ith iteration; rand
1,2Is [0,1 ]]A random number in between;
is the current position of particle i in the d-th dimension in the k-th iteration; pbest
idIs the position of the individual extreme point of particle i in d-dimension; gbest is the position of the global extreme point of the whole cluster in the d-th dimension.
Sixth step S106: and judging whether the algorithm meets the termination condition, if so, stopping iteration, and otherwise, turning to the step S103.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.