In the process of oil well exploitation, in order to understand the oil production capacity of the oil well and grasp the production dynamics, measuring the liquid level of the oil well is a regular task. Therefore, real-time monitoring of the measured liquid level and the ability to quickly measure, analyze and store data are particularly important.
However, for the dynamic level measurement of oil wells, manual handheld devices, sensors and rangefinders must be tested at the oil well site. In addition, the computing power of the rangefinder and the lack of storage resources are solved by using the increasingly mature cloud computing technology. Cloud computing is a technology that accesses non-local computing services (including data processing, storage, and information services) through the network. Its computing facilities are not local but in the network, and users do not need to care about their specific location. Embedded cloud computing has the characteristics of universal components and virtualization management, which can also more effectively reduce component costs, improve resource utilization, and significantly improve the overall reliability of the system. There are many problems in traditional local oil well measurement and testing, such as expensive test tools; and due to the limitations of the local test environment, it is difficult to obtain ultra-large-scale computing power; the test environment is difficult to deploy, the preparation of test resources is cumbersome, and the test accumulation is relatively scarce. These problems have restricted the progress of testing work. Cloud testing is a new test solution based on cloud computing.
To this end, this paper designs and develops an embedded cloud test system based on open control standards and with perfect communication and networking capabilities, which is applied to the dynamic liquid level measurement of oil wells. The cloud computing platform adopts Amazon's open source project Eucalyptus cloud to realize the function of cloud test monitoring center. The terminal node of the on-site embedded measurement and control server serves as the NC node in the cloud test platform. The network interface of the on-site measurement and control server uses wireless WiFi technology or TCP/IP technology to seamlessly integrate with the Internet/Intranet, achieving a "anytime, any place" test system.
With the support of embedded Linux system, it realizes the virtualization of test equipment by transplanting KVM and QEMU virtual machines, and adopts Modbus communication protocol between measurement and control nodes and measurement and control servers. The system realizes the functions of real-time testing and remote real-time measurement and control, which can effectively improve the testing efficiency of oil wells, save manpower, material and financial resources, and save precious time.
1 System Architecture
The embedded cloud test system designed in this paper consists of two parts: cloud test monitoring center and field measurement and control. The field measurement and control equipment consists of embedded measurement and control nodes and embedded cloud servers. The overall structure of measurement and control is shown in Figure 1.
This paper implements the functions of the cloud test monitoring center based on Amazon's Eucalyptus cloud platform. Eucalyptus is used to complete the global monitoring of various virtual devices and virtual machine instances, and dynamically configure the computing resources, storage resources, and network resources of the entire cluster. In the cloud test monitoring center, when there is a request command from a remote client, it can provide access services for application objects to achieve effective remote control and management. The networked measurement and control server is an important NC node in the cloud test platform. Among them, the field embedded measurement and control node completes data acquisition and control switches; for the field embedded measurement and control server, the virtualization of the equipment is realized to provide conditions for the remote use of field equipment.
2 Hardware Structure of Embedded Measurement and Control Server and Measurement and Control Node
The system hardware of the on-site embedded measurement and control server and measurement and control node is mainly divided into the following functions: core control module, network communication module, data analysis and processing module, data acquisition, relay control module, etc. The hardware structures are shown in Figure 2 and Figure 3 respectively.
1) Core control part. The S3C244OA produced by Samsung is used as the main control chip, which adopts the ARM920T core. The STM32 enhanced series chip STM 32F103VET6 microprocessor with ARM Cortex-M3 core.
2) Signal conditioning circuit. This circuit is designed to condition the sound signal collected by the microphone. Its purpose is to send the sound signal analog quantity to the 16-bit high-resolution 4-channel analog serial input A/D converter ADS8341 after simple signal conditioning, and send the converted digital quantity to the main controller.
3) Network part. It includes Ethernet interface and WIFI network module. The external Ethernet module uses DM9000E 100M network transmission module; the WIFI network module uses Marvell 88w8686 wifi network transmission module based on SPI interface; any of these modules can establish data communication between the embedded measurement and control server and the cloud test system network.
4) Peripheral interface circuits. Including: power supply circuit, clock circuit, reset circuit, JTAG interface circuit, NandFlash/NorFlash selection circuit, serial port circuit, Ethernet interface.
On-site measurement and control completes the data acquisition, signal conditioning and relay control of sound and pressure signals. The sound signal and pressure signal acquisition module and relay driver module are the basic modules for measurement and control. The serial port RS485 module is the main communication interface for the measurement and control node to interact with the embedded measurement and control server.
3 Software Design
This article uses the embedded Linux operating system. The bootloader is transplanted to U-boot-1.1.6.tar.gz, and the Linux kernel version is 2.6.25.8.
3.1 Virtualization Technology
3.1.1 KVM virtual machine technology
KVM (Kernel-based Virtual Machine) is a virtual machine based on the Linux kernel. It is a new open source virtual machine technology. In the KVM model, each virtual machine is a standard process managed by the Linux scheduler. A normal Linux process has two operating modes: kernel and user. KVM adds a third mode: client mode (with its own kernel and user modes). KVM consists of two parts: one is the device driver that manages virtual hardware, which uses the string device /dev/kvm as the management interface; the other is the user space component that simulates the hardware, which is a qemu process that needs to be modified. [page]
3.1.2 Porting KVM to ARM architecture platform
This article uses the KVM virtualization solution to implement virtualization on the ARM processor hardware architecture platform, that is, device virtualization, to provide conditions for remote use of on-site devices. In KVM, a virtual machine can be created by opening the device node "/dev/kvm". Here, the Linux kernel with the KVM module needs to be modified to support the ARM architecture. Although KVM provides a common interface that can be used by all user space emulators, QEMU is the only tool that can execute this data.
3.1.3 Compiling QEMU
QEMU has emulation technology that supports ARM host and client environments. In the QEMU emulation environment, attempts to make KVM effective are ignored, so QEMU needs to be modified to enable KVM to run. QEMU is a user-level and system-level emulator. It is run as a user-space application in the KVM context. It cooperates with the user operating system, sends messages to kernel modules and simulates I/O and other devices. QEMU can be enabled to support KVM by editing QEMU's configuration and runtime parameters. When cross-compiling, in addition to paying attention to the cross-compile settings, you also need to modify the kernel and set KVM parameters.
3.1.4 Create and run a virtual machine
Eucalyptus implements basic and simple virtual machine management functions. Its main goal is to make basic virtualization management API-based. It is easy to use and easy to expand. Users can use the euca 200ls tool to create images, and after uploading, they can run instances through the command line. View the running status of the instance, stop, and restart your own instance. You can also view the uploaded images through the web interface, prohibit the images you uploaded, and modify your own information. It can also be used as a place for users to store files and data. The created image and the running virtual machine are shown in Figure 4.
The box part in Figure 4 shows the kernel number, image number, IP address and running instance of the virtual machine, and successfully runs and logs into the virtual machine instance.
3.2 Data collection and bathymetric calculation
Data acquisition is the basis of the measurement and control system. It is completed by the field measurement and control node with STM32F103 microprocessor as the core, and the collected sound signals are sent to the field embedded measurement and control server, which uses ModBus protocol for communication. The cloud test monitoring center processes the sound signal data through a series of procedures such as de-wiring, coupling wave extraction, liquid surface echo extraction, FFT transformation, etc., and finally obtains the depth of the oil well liquid level.
3.3 ModBus communication protocol and protocol stack migration
This article uses the Modbus communication protocol that fully complies with industrial standards. The Modbus communication protocol has 15 common function codes such as read holding register (0x03) and read input register (0x04), which can fully meet the requirements of industrial applications.
The Modbus protocol supports three transmission modes: Modbus RTU/ASCII/TCP. Its transplantation can be completed based on the serial port or network port, so as to realize the processing of MobusRTU/ASCII or Mobus TCP frames. This is closely related to the specific application scenario of the protocol stack, the processor platform used, and the hardware interface. This paper adopts the Modbus RTU transmission mode for communication between field embedded measurement and control devices. The Commun layer in the ModBus host protocol and the Port layer in the slave protocol both connect the physical layer link of Modbus with the hardware driver of the specific platform. This layer essentially completes the reception of data frames on different links. Each function code operation function in Modbus is platform-independent. The application finds the function pointer by parsing the function code in the data frame and finally executes the function code function. The Mbm.c and mb.c files provide a calling interface for user applications and uniformly manage different transmission modes of Modbus (RTU, ASCII, TCP).
Modbus RTU is a transmission mode of Modbus data frames on a serial link. The main steps of RTU-based Modbus migration are as follows:
1) 232/485 interface driver. Complete the writing of serial port related functions in the Commun layer of the host protocol and the port layer of the slave protocol portserial.c, including serial port initialization, data sending, data receiving, interrupt processing, etc.
2) Timer function. In the mbm.c of the host protocol, threads are used for timers; in the port layer porttimer.c of the slave protocol, the writing of timer-related functions is completed, including timer initialization, timer enable and disable, timeout interrupt function, etc.
The field measurement and control system uses Modbus RTU data frames for transmission. The design uses the multi-tasking environment provided by the operating system to create Modbus RTU service tasks to manage and respond to data frames.
According to actual needs, users can delete unnecessary function codes or add custom function codes. The protocol is very customizable and extensible. The correspondence between the function codes and Modbus addresses used in this design is shown in Table 1. In the program, data can be read and written according to the function codes corresponding to Table 1.
4 System Testing
The cloud test system designed by the method proposed in this paper has been tested in more than 30 wells in Huabei Oilfield, including various well conditions, and the sound velocity, time and depth are obtained. The sound velocity ranges from 335 to 343 m/s, and the depth error ranges from 1.0 to 3.0 m. The node is accessed remotely through the browser to start data collection, and the results are shown in Table 2.
The field test results show that the error between the obtained sound signal waveform and the depth measurement value of the dynamic liquid level of the oil well is small, which meets the actual application needs.
5 Conclusion
Based on cloud testing technology, this paper designs and implements a networked embedded cloud measurement and control system. With the support of the open source Linux system, remote data collection, real-time testing and remote real-time monitoring are realized through networked sensors and virtualization technologies. The collected sound signals are filtered and the depth measurement algorithm eliminates the noise caused by the harsh environment on site and obtains the corresponding waveform curves of the collar wave and liquid surface echo. The waveform obtained in the test results of the North China Oilfield is also ideal. In the field networked embedded measurement and control system, the system provides multiple interfaces to realize the remote maintenance of intelligent measurement and control nodes. The main controller with S3C2440A as the core is used as the field embedded measurement and control server. Through the RS485 hardware interface and the ModBus communication protocol, it monitors multiple field embedded measurement and control nodes with STM32F103 as the core main controller. With the support of the Linux operating system, the virtualization of the equipment is completed through KVM and QEMU, providing conditions for the remote use of field equipment. On the Linux and μC/OS-II operating systems, the Modbus host protocol stack and slave protocol stack that meet the industrial standards are transplanted respectively, and the response and processing of Modbus RTU data frames are realized based on the multi-threaded and multi-tasking environment, realizing multi-channel, intelligent and networked control of system terminal equipment.
The actual operation results show that the intelligent cloud measurement and control node is stable and reliable, cost-effective, and has strong versatility and adaptability. The embedded cloud test system and related technologies can also be applied to other networked measurement and control systems, and have broad application prospects in various hot areas of cloud test development.
Previous article:STM32 Relearning - SPI in the Eyes of Engineers
Next article:Design and Application of Embedded System Based on S3C44B0 in Electronic Police
Recommended ReadingLatest update time:2024-11-16 07:39
- Popular Resources
- Popular amplifiers
- Siemens PLC from Beginner to Mastery with Color Illustrations (Yang Rui)
- Research on a multi-master implementation method of Modbus protocol
- A review of learning-based camera and lidar simulation methods for autonomous driving systems
- Teach you to learn 51 single chip microcomputer-C language version (Second Edition) (Song Xuefeng)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- How to modify the AT32F4xx SRAM space size
- About software testing of commercial appliances
- EEWORLD University ---- Operating System Harbin Institute of Technology
- TMS320C6000 C/C++ Runtime Environment Notes
- [IoT indoor environment monitor based on ESP32-S2-Kaluga-1] Development environment experience-Arduino
- Analysis of chip failure steps and failure problems
- How to pull up the 5V power supply inverter with OD output to 24V output
- [RISC-V MCU CH32V103 Evaluation] Using USART2
- 【GD32E231 DIY Contest】Snake Game
- msp432 record 1-gpio usage