LWD (Logging WhiIe Drilling) technology is a logging method in which logging tools are installed close to the drill bit, and various information about the formation is measured immediately after the formation is drilled. It conducts drilling directional control by measuring formation dip and azimuth, bit direction, weight on bit, torque, etc., and measures resistivity, natural potential, natural gamma, density/neutron, nuclear magnetism, acoustic jet lag, etc. of the formation. LWD measures the stratum petrophysical parameters during the drilling process, and uses the data telemetry system to send the measurement results to the ground in real time for processing, forming a formation evaluation.

introduction

LWD (Logging WhiIe Drilling) technology is a logging method in which logging tools are installed close to the drill bit, and various information about the formation is measured immediately after the formation is drilled. It conducts drilling directional control by measuring formation dip and azimuth, bit direction, weight on bit, torque, etc., and measures resistivity, natural potential, natural gamma, density/neutron, nuclear magnetism, acoustic jet lag, etc. of the formation. LWD measures the stratum petrophysical parameters during the drilling process, and uses the data telemetry system to send the measurement results to the ground in real time for processing, forming a formation evaluation. Due to the limitations of the current data transmission technology, a large amount of data is still stored in the memory of the downhole instrument, and played back after tripping. The measurement results overcome the influence of a series of environmental conditions such as borehole expansion and mud intrusion. Logging while drilling can provide real-time formation and well depth information, make rapid evaluation of the formation, optimize well trajectories and geological targets, and guide drilling. Especially in difficult wells, highly deviated wells, and horizontal wells, it shows a more important role than wireline logging. The LWD system is mainly composed of two parts: the surface system and the downhole system. As shown in Figure 1.

 Design of Logging While Drilling System Based on MC9S12Q128 Single Chip Computer

The ground system includes: host computer PC, interface card, special cable, efficiency box and other accessory accessories. The main engine is equipped with the special geosteering drilling software Insite for the LWD system.

Downhole systems include: bus controller (HCIM), natural gamma measurement while drilling (DGR), resistivity measurement while drilling (EWR), neutron while drilling (CNP), rock density while drilling (SLD), Tool string vibration sensor (DDS), probe tube (PCD).

It can be seen that the LWD downhole system has a large number of sensors to measure different parameters, which consumes a lot of power. Because drilling equipment consumes a lot of manpower and material resources every time it goes down the well, and once it goes down the well, the drilling equipment will continue to work underground for a long time, and the drilling depth can reach several kilometers. It can only be powered by batteries installed near the drill bit. The power supply of the logging-while-drilling system is composed of 2 sets of lithium batteries (3.6 V) in parallel, and each set of 6 cells in series to form a 21 V DC power supply. There are certain restrictions on battery energy storage. For example, the B20 well in Bohai Oilfield uses LWD technology, and the measured well section is 2 102 ~ 3 073 km, and it works continuously for 5 days. The same is true for other oil wells that use LWD drilling technology. Some LWD sensors even have to work downhole for half a month. Therefore, reducing system power consumption is a very important issue that needs to be considered when designing a logging while drilling system.

1. The basic principles of low-power circuit design

For a typical system, its power consumption roughly satisfies: P=C×V2×f. C is the capacitive load, V is the power supply voltage, and f is the switching frequency. Power consumption is proportional to the square of the operating voltage, so the operating voltage has the greatest impact on the power consumption of the system, followed by the operating frequency. Capacitive loads also have some effects, but capacitive loads are generally uncontrollable for designers. Therefore, when designing a low-power system, you should consider reducing the operating voltage and using a low-frequency clock as much as possible without affecting system performance.

For the logging-while-drilling system, because the sensor works several kilometers underground, the temperature is extremely high, and the working space is small, so other challenges are posed in the design. At high temperatures, the performance of capacitors and other devices will be halved, so these factors are considered when selecting devices.

In addition, dynamic power management is also an effective way to reduce power consumption. Dynamic power management is currently one of the most important system power optimization techniques. It dynamically configures the system according to the performance of each module of the system, so that each functional module in the system is in the lowest power consumption state required to meet the performance requirements, thereby achieving the purpose of saving power consumption.

2. Low-power system design based on MC9S12Q128

MC9S12 series single-chip microcomputer is a 16-bit single-chip microcomputer with CPU12 core as the core, referred to as S12 series. The typical S12 bus speed is 8 MHz, up to 25 MHz. Its I/O and CPU can run under different clocks. CPU power consumption can be controlled by the control bit of the switch status register. MC9S12Q128 adopts 5 V power supply externally, the maximum current is 5 mA during normal operation, and less than 1 mA in low power consumption mode, which provides favorable conditions for designing low power consumption systems.

2.1 Power supply

For MC9S12Q128, its external power supply voltage is 5 V, and the I/O port is also designed according to the logic level of 5 V power supply, so that the interface circuit can be directly connected to the TTL standard level device when in use. These interface circuits should also have low power consumption, otherwise it will cause the use of low voltage to reduce power consumption on the one hand, and the use of additional interface circuits on the other hand to increase the power consumption of the system. The chip uses 2.5 V to supply power, and the low-voltage power supply ensures the low power consumption of the chip. The internal 5 V to 2.5 V of the chip is converted by the internal voltage adjustment module.

Since the sensor system is powered by a battery, the actual battery has the following nonlinear characteristics:

① The output voltage gradually drops during the discharge process, and when it is lower than a certain threshold voltage, the battery is exhausted and stops working;

②The effective energy of the battery is related to the discharge current;

③The battery has a self-recovery effect, that is, the battery can recover part of the charge during the non-power supply period, thereby increasing its effective amount.

According to the above characteristics of batteries, a strategy for scheduling tasks based on battery status is proposed; for multi-battery-driven devices, the following various battery scheduling and management technologies are proposed:

◆Static scheduling. Use each battery in turn in a certain order, and each battery has a fixed working time.

◆Dynamic scheduling. By detecting the output voltage or discharge current of the battery, the state of the battery is determined, thereby determining the switching time and sequence between the batteries.

2.2 Clock frequency

From the perspective of low power consumption, a lower frequency is required; however, in order to quickly respond to external events in real-time applications, a faster system clock is required. The MC9S12Q128 internal bus rate can reach up to 25 MHz, which is a minimum instruction cycle of 40 ns. MC9S12Q128 integrates a complete energy-saving oscillator circuit. If an external oscillator circuit is connected, the clock synthesis register (SYNR) and clock divider register (REFDV) need to be configured. The clock frequency generated by the phase-locked loop is obtained by the following formula:

PLLCLK=2×OSCCLK×(SYNR+1)/(REFDV+1) Among them, OSCCLK is the external crystal oscillator frequency.

After testing, when the phase-locked loop circuit is applied, the current will increase by about 5 mA under the condition of 21 V voltage supply. This design selects an external crystal oscillator of 16 MHz, and the bus frequency is the default 8 MHz. Under the premise of ensuring that the system performance is not affected, the system power consumption is reduced.

2.3 Low power consumption software control

The working mode of MC9S12Q128 supports various requirements of ultra-low power consumption in an advanced way through the intelligent operation management of the module and the combination of CPU status. MC9S12Q128 supports 3 kinds of low power consumption modes-stop mode, pseudo stop mode and wait mode. The S bit in the CPU condition code register CCR is the STOP instruction prohibition bit. If you want to enter the STOP mode, this bit should be set to 0.

Stop mode: When PSTP=0 in the CLKSEL register, the CPU executes the STOP instruction to stop all clocks and crystal oscillators, so that the chip enters a completely static mode. The CPU can be awakened from this mode by reset or external interrupt.

Pseudo stop mode: When PSTP in the CLKSEL register is 1, the CPU executes the STOP instruction to enter the pseudo stop mode. In this mode, the real-time clock interrupt and watchdog module are still working, and other peripherals are turned off. This mode consumes more current than the stop mode, but shortens the time required to wake up the CPU.

Waiting mode: The CPU enters the waiting mode after executing the WAI instruction. In this mode, the CPU does not execute instructions, the internal data bus and address bus are closed, and all peripherals are in an active state.

2.4 Peripheral low power consumption management

Logging while drilling system sensors mainly include CPU and peripheral circuits, power supply, UART communication, RTC, voltage current and temperature sensors, Flash storage, bus communication part and bus interface part. Among them are the Flash module, voltage, current and temperature measurement modules, RTC and communication circuits that consume more power. Some modules do not need to work in some periods, so dynamic power management can be achieved to achieve the purpose of saving power consumption.

The enhanced P-channel MOS switch tube VP0300L is used to control the power supply of the above modules, and the power supply of the modules is cut off without power supply, achieving the effect of energy saving. Turn off the corresponding communication bus between the module and the MCU before turning off the power supply of each module to avoid damage to the interface.

Flash module: When not reading or writing the memory, the power of the memory can be turned off to save power consumption. When reading and writing, the corresponding I/O port of the MCU sends out a high level at the same time, and the switch is closed. The switch can be turned off after reading and writing. Flash is read and written once every 1 minute. SW_FL is connected to the I/O of Q128. When SW_FL is set high, the SW_FL terminal voltage is not less than VCC, the switch tube is disconnected, and the power supply is stopped. When SW_FL is set low, the SW_FL terminal voltage is less than VCC, and the switch tube is turned on.

Temperature, voltage, current, power monitoring modules: 3 detection modules collect once every 1 minute. One switch is applied to the three modules, and the switch is closed during detection to supply power to the three sensors to make them work. After the acquisition is over, turn off the switch to reduce power consumption.

Time management module and 1553 communication module: When there is no signal on the bus, the MCU cuts off the power of the two modules to reduce power consumption. When the bus has a signal, the MCU is awakened first, and then the MOS switch is used to close the switch to supply power to the two modules. Two modules share one switch.

2.5 System low power consumption control process

The low power consumption control process of the system is shown in Figure 2.

Design of Logging While Drilling System Based on MC9S12Q128 Single Chip Computer

Concluding remarks

MC9S12Q128 with its excellent performance and extremely low power consumption characteristics, so that developers have a lot of leeway to design high-performance low-power systems. Practice has proved that the logging-while-drilling system with MC9S12Q128 as the core has the same battery life as the imported system.

Imported logging-while-drilling equipment generally works downhole for 300 hours. After field testing, the self-developed logging-while-drilling equipment based on MC9S12Q128 can continuously work downhole for more than 200 hours, which can fully meet the power consumption requirements of various horizontal wells for sensors. It is foreseeable that in the near future, the power consumption of domestically-made MWD systems will become lower and lower, reaching the international level.

The Links:   G190EG02-V0 G150XTN06A