Compatible hanging method for logging downhole instrument
Technical Field
The invention relates to the technical field of communication interfaces and data transmission protocol conversion of downhole logging instruments, in particular to a device and a method for compatible hanging of downhole logging instruments.
Background
The well logging technology has developed from analog well logging, digital well logging, numerical control well logging to the stages of imaging well logging and networked imaging well logging through the development of the last hundred years. The acquisition of logging data is completed by a ground system and a matched downhole instrument. Since the logging technology enters the numerical control era, particularly the imaging logging era, downhole instruments introduced by domestic and foreign logging equipment manufacturers are connected in a bus mode and communicate with a ground system by adopting digital codes. However, the instruments associated with various systems have different communication interfaces (including instrument bus and coding mode) and data transmission protocols, and thus are not compatible and combinable for well logging. For example, the ECLIPS logging system of atlas, whose downhole instruments employ WTS instrument buses and three manchester encodings of 20.83kbps, 41.66kbps, 93.75kbps, and a custom data transfer protocol; a LOGIQ logging system of Haributton company adopts a coaxial cable 10Base-T Ethernet as a bus and corresponding codes in an underground instrument, and a data transmission protocol is a TCP/IP protocol and a self-defined application layer data structure; a SINOLOG900 logging system developed by China petrochemical Petroleum-winning Petroleum engineering company adopts a twisted-pair 10Base-T Ethernet as a bus and corresponding codes, and a data transmission protocol is a TCP/IP protocol and a self-defined application layer data structure.
One set of well logging system is often matched with dozens to dozens of underground instruments, each instrument has the value of dozens of thousands of yuan and millions of yuan, and the value of introduced instruments is even up to tens of millions of yuan, so that the investment of various domestic well logging companies on the underground instruments is very large and is counted in hundreds of millions of yuan. As the service life increases, surface systems age and upgrade and downhole tools continue to be used, requiring the tools to be hooked up to another logging system.
Alternatively, due to the unique technical features and advantages of each logging system, some wells require that a certain logging project must be measured by a certain instrument, and thus, a situation may occur in which one well is changed into several logging teams to measure different projects by using different logging systems.
After years of use and intensive research, various logging equipment manufacturers in China have mastered the introduced system quite deeply, and compatible downhole instruments and ground systems are manufactured after digestion and absorption. For example, the SL6000 system developed by the Zhongpetrochemical Shengli petroleum engineering company is compatible with the ECLIPS series instruments of the Atlas company, the ELIS system of the Zhonghai oil service company is developed by taking the ECLIPS system as a reference, and the HH-2530 system is developed by the Beijing Huanding technology company on the basis of the EXCELL-2000 system of the Harlibton company. On one hand, domestic logging professionals already master communication interfaces, data transmission protocols and processing algorithms of various logging instruments, and on the other hand, systems and matched downhole instruments are self-organized and are not in compatible connection. Although some people have realized the hitching of some instrument on other systems by modifying the downhole instrument or adding the hardware module of the surface system, they have not found the general solution of realizing the compatibility and combination logging of the downhole instrument by only one adapter and developing the corresponding software module as described in the present invention.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a device and a method for hanging a logging downhole instrument in a compatible manner.
The technical scheme is as follows:
a method for connecting logging downhole instruments in a compatible mode comprises the steps that an adapter is connected to the lower portion of a series of downhole instruments of a logging system A, an instrument bus B is established, and the lower portion of the instrument bus B is connected with series of downhole instruments of other logging systems; the adapter is internally provided with a conversion circuit and a programmable device and is used for coding command signals from the logging ground system in the coding mode of other logging systems, then sending the coded command signals to the downhole serial instruments of other logging systems, collecting instrument data of the downhole instruments of other logging systems, decoding the instrument data, recoding the coded command signals in the coding mode of the logging system A, and finally sending the coded command signals to the logging ground system.
Furthermore, the adapter packages the acquired instrument data of the downhole instruments of other logging systems and then sends the data to the logging ground system. The adapter is used for the conversion of the communication interface, including the conversion of an instrument bus and a coding mode, the upper end interface of the adapter adopts a communication interface specification A, the lower end interface adopts a communication interface specification B, and the conversion of the two communication interfaces is carried out through a circuit and a programmable device. The downhole instruments of the logging system a to which the adapter is connected adopt the communication interface specification a, while the downhole instruments of the logging system B to which it is connected adopt the communication interface specification B. The adapter is used for converting a data transmission protocol, the adapter communicates with a logging ground system by adopting a data transmission protocol A, communicates with an underground instrument of a logging system B which is hung below the adapter by adopting a data transmission protocol B, the adapter forwards data according to the protocol B or A according to the data received by the protocol A or B, and the protocol is converted by a programmable device. The logging ground system can generate an instrument string configuration command according to the model and the number of the instruments hung on the adapter, and sends the command to the adapter to inform the adapter of the information of various instruments hung on the adapter.
Furthermore, the order in which the instruments are arranged in the instrument string configuration command determines the order in which the adapter collects data to them and the order in which the data for each instrument is in the encapsulated data packet. The information in the configuration command includes the following:
ToolNum: the number of the instruments hooked below the logging adapter;
AcquireCmd: collecting commands of all instruments are hung on the adapter;
sendcmd: uploading commands of all instruments hung on the adapter;
SendCmdTime: the moment when the adapter sends the uploading command to each instrument;
DataBytes: the length of the collected data of each instrument connected with the adapter in a hanging mode;
TotalDataBytes: the total length of the data collected by the adapter-connected instrument;
SendFrames: all the collected data needs to be uploaded in several frames.
The adapter sequentially sends AcquireCmd to the underground instruments of the articulated logging system B according to the instrument sequence in the instrument string configuration command, then sends Sendcmd to the instruments according to SendcmdTime, and receives the measured data of the instruments. The adapter allocates storage space according to the TotalDataBytes, determines the storage position according to the sequence of each instrument and the DataBytes, and stores the instrument data to the corresponding position when receiving the instrument data to obtain an encapsulated data packet of the instrument data of the logging system B. The TotalDataBytes and SendFrames in the instrument string configuration command are used for uploading the encapsulated data packet once or in multiple frames; when the TotalDataBytes exceeds the maximum length of one frame of data supported by the communication protocol A, the TotalDataBytes are uploaded in multiple frames, and each frame of data has different frame numbers. When the data is uploaded in multiple frames, firstly, the frame data is spliced together according to the frame number to obtain the complete data encapsulated by the adapter, and when the complete encapsulated data packet is uploaded once, the frame number is meaningless; and splitting the received encapsulated data packet according to the instrument sequence and the DataBytes in the instrument string configuration command to obtain the measurement data of each instrument.
The invention has the beneficial technical effects that:
the invention solves the problem of compatibility and combined logging of the underground instruments originally belonging to different logging systems, so that the existing various underground instruments can be hung on another logging system adopting different communication interfaces and data transmission protocols without any change, the geological application value and the creating effect of the underground instruments are fully played, the huge investment generated by purchasing new instruments is reduced, and the service capability of the logging system is expanded.
Heretofore, there has not been a flexible, versatile method of hanging a series of instruments to other logging systems. The common method is to realize the hanging connection of a certain instrument, modify the circuit of the instrument and re-develop a programmable device, and the modified instrument can not be hung on the original logging system; or two different ground systems are assembled together, one logging team can use more instruments for construction, but the two systems still need to be matched with the series of instruments, and the combined logging of the two series of instruments cannot be realized.
Drawings
FIG. 1 is a schematic diagram of an adapter implementing a communication interface and data transfer protocol conversion
FIG. 2 is a schematic diagram of an adapter packaging instrument data usage memory
FIG. 3 is a schematic diagram of an embodiment of a SINOLOG900 system for hitching SL6000 series downhole tools;
fig. 4, schematic diagram of the adapter structure.
Detailed Description
The first embodiment is as follows:
referring to fig. 1, a device for compatible hooking of downhole logging instruments is characterized in that a logging ground system A is connected to a downhole instrument string through a cable, an instrument bus A is established at the lower end of a cable telemetering nipple, series of downhole instruments matched with the logging system A are connected below the instrument bus A, the series of downhole instruments matched with the logging system A can be hooked on the bus, digital communication is carried out with the ground system A through a coding mode A, and a data transmission protocol A is adopted for communication; the adapter is connected to the lower portion of the series of downhole instruments matched with the logging system A, and the downhole instruments belonging to other logging systems are connected to the lower portion of the adapter.
As shown in fig. 1, the lower end of the adapter establishes a tool bus B, so that downhole tools of the logging system B can be hung on the bus, forward commands to the downhole tools through a coding mode B, and receive and decode coded data of the mode B.
The adapter converts the coding mode of the underground instrument belonging to other logging systems into a coding mode A through a built-in coding conversion circuit and a programmable device. The method can communicate with a ground system through a coding mode A, and converts commands issued from the ground into coding modes of underground instruments belonging to other logging systems.
The conversion of the data transmission protocol is completed by a curing program of a programmable device in the adapter. The command issued by the logging system A is formatted according to the specified format, the adapter receives the command, takes out the command content, is re-formatted according to the specified format of the system B, and then is sent to the corresponding instrument below. The data of the system B instruments received by the adapter can be uploaded to the ground according to the specified format of the system A
The measurement control and data collection of the instrument hooked under the adapter are completed through the adapter, so that a command is issued to inform the adapter of the information of the instrument hooked by the adapter, which is called an instrument string configuration command. The command is automatically issued when the instrument string is powered on and communication with the ground system is established, and can also be issued again through a software interface. The content of the command is automatically generated by the ground system software according to the model and the number of the instruments hooked by the adapter, wherein the content generally comprises the following steps:
ToolNum: the number of the instruments hooked under the logging adapter
AcquireCmd: acquisition command of each instrument hung on adapter
Sendcmd: uploading commands of all instruments hung on adapter
SendCmdTime: time when adapter sends upload command to each instrument
DataBytes: length of collected data of each instrument connected with adapter in hanging mode
TotalDataBytes: total length of data collected by adapter-mounted instrument
SendFrames: all the collected data needs to be uploaded in several frames.
The adapter receives the instrument string configuration command, stores the information, and is used when collecting data of the attached instrument. For a logging system which is driven by time to collect, an underground instrument of the logging system automatically collects and actively uploads data, in this case, an adapter sends AcquireCmd and Sendcmd commands to each instrument which is hung downwards at regular time, and the data are uploaded after being received; for a logging system which is driven to collect by depth, at each depth point, the adapter receives a collecting command of a ground system, sends AcquireCmd and Sendcmd commands to each instrument which is hung downwards, and uploads the data after receiving the data.
The order in which the adapter sends ackirecmd to the instruments is the instrument order in the configuration command. The instrument receives the AcquireCmd command, prepares data, and transmits the data to the adapter when Sendcmd is received. Some communication interfaces allow different instruments to upload data at the same time, so the adapter sends SendCmd not in the same order as AcquireCmd, but at a time determined using SendCmdTime.
The ground system sends control commands to the instrument hung on the adapter, such as electric instrument gear shifting, density high voltage control, sound wave acquisition parameters, opening and closing of the sidewall contact device and the like, to be forwarded by the adapter, and the commands are not required to be stored in the adapter and are only forwarded once each time the commands are received. The ground system software sets flag bytes in the command content to distinguish the control command from the instrument string configuration command, and the adapter performs different processing according to the difference of the flags.
The adapter and the instruments hooked under the adapter correspond to 1 instrument for the system A, and the measurement data of the instruments are packaged in the adapter and then uploaded together. The data encapsulation is to organize the measurement data of each instrument in the memory according to the instrument sequence in the instrument string configuration command. As shown in fig. 2, the adaptor uses a piece of memory with the size of TotalDataBytes to store data of each instrument, and determines the data writing position according to the DataBytes of each instrument, so as to solve the problem that the receiving sequence is different from the arranging sequence.
Some logging systems have a data transmission protocol that specifies the maximum length of one frame of data, and when TotalDataBytes is not greater than this length, the encapsulated data can be uploaded all at once, or else, the encapsulated data is uploaded in multiple frames, that is, the SendFrames value in the string configuration command. The value is calculated by ground system software and is sent to an adapter, so that the length of data uploaded each time is the same, the requirement of the frame length is met, and the number of frames and the number of useless data uploaded are as few as possible. For example, the maximum allowed frame length is 3200 bytes, the TotalDataBytes is 4315 bytes, and the SendFrames is 2, each time 2158 bytes are uploaded, and the second frame data has 1 last useless byte. The uploaded data has frame numbers which are 1, 2 and … … respectively when the data is divided into multiple frames until SendFrames. When the multi-frame uploading is not needed, the frame number is meaningless.
In order to use the adapter and its attached downhole tool,to develop a corresponding software module, the software module is developed,are invoked by surface system software to receive and process data. When uploading in multi-frame, the adapter software module receives the uploaded data, firstly finds the frame with the frame number of 1, and then starts processing, otherwise abandons. The method comprises the steps of continuously receiving SendFrames frames from the beginning of receiving the frame No. 1, splicing the data in the SendFrames frames together, and removing the last useless data according to TotalDataBytes to obtain the encapsulated data shown in FIG. 2.
After the adapter software module obtains complete encapsulation data, the adapter software module is split according to the structure shown in fig. 2, and measurement data of each instrument is taken out and distributed to the software modules of the corresponding instruments for processing. Each attached instrument develops a software module for the instrument and is responsible for processing the data of the instrument.
Example two:
referring to fig. 3, a method for hanging a downhole logging instrument compatible, taking a single log900 logging system hanging a SL6000 series downhole instrument as an example, illustrates an embodiment of the method.
The SINOLOG900 logging system adopts a time-driven acquisition mode, a downhole instrument autonomously acquires and actively uploads data after receiving a measurement starting command of a ground system, the SL6000 logging system adopts a depth-driven data acquisition mode, the ground system sends an acquisition command to each downhole instrument at each depth point, and the downhole instruments upload data after receiving the command. In order to attach an SL6000 series downhole tool to the SINOLOG900 system, an adapter is required to send acquisition commands to the tool instead of the SL6000 surface system, and to receive their data for uploading to the surface.
As shown in fig. 3, the SINOLOG900 surface system is connected to a downhole instrument string through a cable, an instrument bus established by a telemetry sub HSL9514 of the SINOLOG is a 10Base-T twisted pair ethernet, commands and data are transmitted between the surface system and the downhole instrument by using a TCP/IP protocol and a customized application layer data structure, and the data structure is shown in table 1. The contents of the issued commands and the uploaded data are used as the data body part of the table 1, and after receiving the commands or the measured data, each instrument or the ground software module thereof analyzes and processes the commands or the measured data according to the definition thereof.
TABLE 1 application layer data structure for communication between a SINOLOG900 system and a downhole tool
Instrument ID
|
Time of day
|
Data volume length
|
Data type
|
Data body |
The SL6000 series downhole instrument adopts a so-called LDT communication interface, and comprises an LDT instrument bus and three Manchester encoding modes of 20.83kbps, 41.66kbps and 93.75 kbps. Of these, 20.83kbps was used to command the instrument, called M2 CMD; both 41.66kbps and 93.75kbps are used for upload DATA, referred to as M2DATA and M5DATA, respectively. For each acquisition, the ground system firstly sends AcquireCmd to each instrument through the M2CMD to prepare data; then, sending SendCmd through M2CMD, the instrument receiving the command uploads DATA through M2DATA or M5 DATA. The control of the instrument action is also commanded by the M2 CMD. These operations of sending commands and receiving data, which were originally performed by the surface system, are now performed by the adapter.
The HSL9520 adapter shown in fig. 3 implements the conversion of the two communication interfaces and data transfer protocols described above. The downhole instrument is used as a downhole instrument of a SINOLOG900 system, is hung on an Ethernet bus and is communicated with a ground system through an HSL 9514; the LDT instrument bus is established at the lower end and is communicated with the connected SL6000 series instruments.
Software modules for the HSL9520 and SL6000 downhole tools were developed to command them and process the received data, according to the interface specifications for the SINOLOG900 system software. The software module of the HSL9520 generates a tool string configuration command according to the model and the quantity of the attached SL6000 downhole tool and sends the command to the HSL9520 tool, the content of the received command is shown in the table 1, and the data body part of the command comprises the tool information of claim 6.
The HSL9520 stores the instrument information, sends AcquireCmd to each SL6000 instrument through M2CMD at regular time according to the instrument sequence in the configuration command, then sends Sendcmd to the instruments according to SendcmdTime, the instrument receiving the command uploads DATA through M2DATA or M5DATA, and the HSL9520 receives the DATA and packages the DATA in the manner shown in FIG. 2.
When the ground system sends a control command to the attached SL6000 instrument, the control command is actually sent to the HSL9520, the content of the command received by the ground system is shown in the table 1, the data body part is taken out, and the control command is sent to the corresponding target instrument through the M2 CMD.
The HSL9520 receives configuration commands and instrument control commands with different initials in the data body part, and uses them as flags to perform different processing, whether to save the data for collecting instrument data or to forward the data to the SL6000 instrument.
HSL9520 uploaded the packaged SL6000 instrumentation data to the surface as part of the data shown in table 1. The software module of the HSL9520 receives the data frame, takes out the data part to split according to the structure shown in fig. 2, takes out the measurement data of each instrument, and distributes the measurement data to the software module of the corresponding SL6000 instrument for processing.