Portable pipeline leak detector based on ARM core microprocessor

Publisher:sumigLatest update time:2011-07-01 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Zhang Hongcai, 38th Research Institute of China Electronics Technology Group Corporation At present, the main methods for monitoring and locating oil pipeline leakage can be divided into two categories. One is to detect the wall condition of the oil pipeline, such as the detection ball inside the pipe, and the other is to rely on monitoring the state of the fluid in the oil pipeline, such as the change of pressure and flow. Commonly used methods include pressure gradient method, negative pressure wave method, flow balance method, correlation method, etc. With the rapid development of computer, communication and instrumentation technology, monitoring the state of the fluid in the oil pipeline has become easier and easier to achieve, and has gradually become the mainstream method for oil pipeline monitoring. Since these methods that rely on monitoring the state of the fluid in the oil pipeline have their own advantages and disadvantages, the current leakage monitoring of the oil pipeline is often judged by combining multiple methods. In recent years, with the emergence of high-performance, low-power processor ARM, the power consumption and volume of the signal acquisition and storage system have been continuously reduced, meeting the requirements of portability, making the development of handheld instruments possible. This paper uses the ARM core microprocessor LPC2214 to develop a related leak detector, which adopts a method that combines the negative pressure wave method and the sound wave method. Based on the correlation function detection principle, it can not only be used for oil leak detection, but also for leak detection of gas, city tap water, natural gas and other pipelines.


Related leak detection principles
1 Negative pressure wave detection
When a leak occurs, the local fluid density decreases due to the loss of fluid material at the leak, resulting in an instantaneous pressure drop and speed difference. When the pressure before the leak is used as a reference standard, the decompression wave generated during the leak is called a negative pressure wave. The wave propagates from the leak point to both ends at a certain speed, and after a certain period of time, it is transmitted to the upstream and downstream respectively. The upstream and downstream pressure sensors can capture the waveform of a specific transient pressure drop to determine the leak. The leak point can be determined based on the time difference between the upstream and downstream pressure sensors receiving the pressure signal and the propagation speed of the negative pressure wave.


The negative pressure wave method relies on a sudden pressure drop at the leak point to detect leaks. Large pipeline leaks usually have this characteristic. However, the negative pressure wave method cannot generally detect leaks that occur slowly or have already occurred. This is its limitation.


2 Acoustic wave detection
When the liquid in the pipeline leaks, due to the pressure difference between the inside and outside of the pipeline, the leaked fluid forms a vortex when it passes through the leak point to the outside of the pipeline. This vortex generates an oscillating sound wave. This sound wave can spread and diffuse back to the leak point and establish a sound field in the pipeline. The acoustic wave method uses the noise generated when the leak occurs as the signal source. The sound wave propagates along the pipeline to both ends, and the sound wave is picked up by the set sensor. After processing, it is determined whether the leak occurs and located. It can effectively overcome the defects of the negative pressure method.


In order to accurately obtain the time difference between the pressure wave and sound wave caused by the leak and propagating to the upstream and downstream sensors, it is necessary to accurately capture the corresponding characteristic points of the leak pressure wave signal sequence. Due to factors such as on-site interference and vibration of the oil pump, the collected pressure wave signal sequence is attached with a lot of noise. How to accurately extract the characteristic points of the signal from the noise is the key to positioning. This instrument adopts the correlation function analysis method. The correlation function leak detection method uses the sensor to pick up the negative pressure wave or sound wave emitted by the leak point and perform cross-correlation analysis on the negative pressure wave or sound wave signal. When there is no leak, the value of the correlation function is near zero; after a leak occurs, the value of the correlation function will change significantly; in addition, when the location of the pipeline leak point is different, the delay time of the two signals is different, and the value of the signal's correlation function will change. Therefore, according to the correlation function information of the signal, the leakage condition of the pipeline can be detected and located.


Leak point location algorithm
The working principle of pipeline leak detection technology is shown in Figure 1.

Figure 1 Working principle of the correlation function leak detection method


During the detection, the sensors are placed at both ends of the exposed pipe. The negative pressure wave signal and sound wave signal caused by the weak leakage of the underground pipe buried several meters deep are converted into electrical signals. They are sent to the amplifier input stage matching the sensor impedance through the cable, pre-amplified, pre-processed by the bandpass filter, and the frequency range of the recorded noise signal is limited by defining the high-pass (or low-pass) frequency value, thereby suppressing the interference signal. The signal is amplified by voltage, sampled and quantized by the data acquisition board, and then processed by the ARM microprocessor to obtain the time difference, and then calculate the leakage point.


Assume that a pipeline leaks at point Q, generating a negative pressure wave and acoustic wave signal with point Q as the leak source. The negative pressure wave and acoustic wave signal will propagate to both ends of the pipeline at a certain wave velocity V. The sensors installed at both ends of the pipeline A and B receive this signal at and (t+) respectively (here it is assumed that the distance between the leak point and the two sensors is La>Lb). Due to the influence of external noise at the same time, the signal sample functions measured by the sensors at both ends of A and B are A(t) and B(t) respectively, so they can be expressed as:


A(t)=f(t)+NA(t)
B(t)=f(t+τ)+NB(t)


Among them, f(t) and f(t+τ) are the source signals at A and B, and NA(t) and NB(t) are the background noises at A and B respectively. Correlation operation is performed on A(t) and B(t), that is:


In order to facilitate data processing, it is generally believed that the leakage signal and the noise signal are independent and uncorrelated, and the noise signals NA(t) and NB(t) are completely uncorrelated, then:

When the correlation function RAB(τ) reaches its peak value, the corresponding τ value coincides with the time difference between the signals detected by the two sensors. From mathematical knowledge, we know that the necessary condition for the correlation function R'AB(τ)=τ+τ0 to obtain the maximum value is that the derivative of RAB(τ) at τ0 is RAB(τ)=0. From this, we can find τ0, measure the actual length L between the two sensors and the propagation speed V of the negative pressure wave and the sound wave in the pipeline, and the location of the leakage point Q can be determined, that is:


LA=(L+S×V)/2
or
LB=(LS×V)/2

Composition of ARM detector
The leak detector developed in this paper is a new generation of embedded system based on ARM core embedded microprocessor. ARM microprocessor has low power consumption, low cost and strong performance; supports ARM/THUMB dual instruction set; equipped with rich standard software development tools and debugging environment. Moreover, ARM core is also famous for its excellent combination of high performance, small size, low power consumption, compact code density and multiple supply sources. It is currently recognized as the most advanced 32-bit embedded RISC microprocessor core. The system structure is shown in Figure 2.

Figure 2 ARM embedded system block diagram


The system design analysis is as follows:
① Data acquisition is controlled by a CPLD (complex programmable logic device). The control logic mainly includes: multiplexed address selection C0~C2, sample and hold S/H, A/D start, dual-port write enable WR, write address and interrupt request IRQ after a frame of data is full. The main timing relationship is shown in Figure 3.

Figure 3 Data acquisition timing diagram


② Use Philips' LPC2214 microprocessor to process and display the collected data. LPC2214 is a RISC microprocessor based on the ARM7 TDMI core. ARM7TDMI is a low-power, high-performance 16/32-bit core, which is most suitable for occasions that are sensitive to price and power consumption. LPC2214 expands a series of general peripheral devices based on the ARM7TDMI core: 112 general I/O ports, 4 serial ports, 2 32-bit timers, 9 external interrupts, and can achieve an operating frequency of up to 60MHz through the on-chip PLL.


③ The acquisition circuit and ARMCPU use 8KB dual-port RAM and interrupt mode to exchange acquisition data. Two buffers can be set in the RAM to work alternately. The dual-port RAM can be directly connected to the expansion bus of the ARM embedded system.


④ The design selects TI’s TLC5540 high-speed analog-to-digital conversion chip, which has 8-bit resolution and built-in sampling and holding circuits. The chip is manufactured using an improved semi-flash structure and CMOS process, which greatly reduces the number of comparators in the device. It can also maintain low power consumption while performing high-speed conversion, and the conversion rate can reach 40MB/s.


⑤ Since the embedded operating system needs to be ported, 2M Flash (SST39VF160) and 8M RAM (IS61LV25616AL) need to be expanded. The embedded operating system, application code and file system are all stored in the Flash.


⑥Use common I/O ports to expand external keyboards to form a 4×4 matrix keyboard. Corresponding to "0, 1, 2, 3, 4, 5, 6, 7, 8, 9", ".", left shift, right shift, previous page, next page and confirmation key. Realize the setting of configuration information of each measurement and control module and the switching of display screen.
⑦Select a monochrome STN graphic LCD with SED1335 controller, whose dot matrix is ​​320×240. Considering that the working voltage of LCD controller is 5V and the working voltage of main CPU is 3.3V, 74HCT164245 is used to convert the level of data bus.


Software Design
1 Operating System Selection
There are many embedded operating systems that support 32-bit ARM CPUs. Several well-known commercial embedded operating systems on the market include Vxwork, QNX, Windows CE, etc. Linux is widely used in embedded systems due to its special charm of being free and with open source code. Embedded Linux has the following characteristics:


①Linux open source and rich software resources.


②Powerful kernel, efficient and stable performance, and easy to tailor multi-tasks.


③ Complete network communication, graphics and file management mechanisms.


④Support a large number of peripheral hardware devices.


⑤Good development environment and constantly evolving development toolset.


⑥Low price effectively reduces product costs.


μClinux is a very good embedded free software, a branch of Linux 2.0/Linux 2.4, which is designed for the application of microprocessors. Since the μClinux operating system is open source, its hardware-related parts can be ported to different hardware platforms by defining some functions. It has a Linux host development environment, GNU cross-compiler support, and operating system source code, so it is very convenient to develop applications based on embedded systems.


2 Software Function Design
The software mainly includes two parts: system software and application software, as shown in Figure 4.

Figure 4 System software structure and composition diagram


ARM Bootloader completes ARM initialization, memory settings, and embedded μcLinux loading, and finally gives control to the μcLinux operating system. After that, the system runs applications under the management of μcLinux; the applications include interrupt processing, numerical calculation, keyboard processing, leakage point location and parameter display, and the display software completes the functions of driving the 320×240 dot matrix LCD module, displaying Chinese characters and chart curves, etc. Since μcLinux is a multi-tasking system, the above processing tasks can be designed as independent processes, making program design simple.

Conclusion
The instrument design mainly adopts ARM microprocessor, μcLinux operating system and numerical signal processing method, realizing high-precision signal acquisition and fast numerical analysis algorithm in embedded system. The portable leak detection and locator has achieved good results in practical application and can be used for leak detection and locating of gas, city tap water, natural gas and other pipelines.

Reference address:Portable pipeline leak detector based on ARM core microprocessor

Previous article:Design of Embedded WEB Server Based on ARM and eCos
Next article:Implementation of I2C device control method based on ARM

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号