Design and Implementation of Portable Petrochemical Equipment Vibration Monitor Based on Multi-Layer Architecture

Current vibration monitors for petrochemical equipment show several problems, such as high cost, inconvenient for use, and so on. To solve these problems, this paper designed a vibration data collector and a data processing App system based on multi-layer architecture. The data communication is realized by Bluetooth. The collector collects the acceleration, the speed and displacement data of the equipment, and the data processing functions such as data storage, analysis, viewing, and uploading are realized by the mobile phone App system. This method not only can simplify the design of the collector but also can enrich the functions of the vibration monitor. Practices show that this vibration monitor has short response time for vibration measurement, works stably which can meet the actual demand for vibration measurement of petrochemical equipment.


Introduction
The normal operation of petrochemical equipment has a periodical stable vibration law. Therefore, monitoring and analyzing the equipment vibration signal has become an effective means for equipment condition monitoring and fault diagnosis [1]. Vibration monitoring mainly includes two methods: online monitoring and handheld instrument monitoring. Among them, online monitoring refers to deploying sensors at multiple measuring points, and the obtained signals are transmitted to the data processing center for processing through wired or wireless methods. This method has difficulty in wiring, excessive sensor placement, untimely information feedback, and high cost. [2,3] and other deficiencies. Hand-held vibration monitors, such as the Japanese three-vibration vibrometer, lack the functions of data storage, display and real-time analysis [4], which have problems such as single function and inconvenient use, which seriously affect the efficiency and quality of the vibration measurement work.
In view of the above problems of vibration monitoring, this paper uses a multi-layer architecture mode to design a vibration monitor based on micro-control chip and mobile app, using piezoelectric acceleration sensor, signal acquisition circuit and CC2640 micro-control chip to achieve low energy. Consumption and high reliability to collect and process vibration signals; use Bluetooth communication technology to transmit data to the mobile phone App system, and realize data storage, analysis, viewing, uploading and other data processing functions through the App system.

Demand Analysis
Long-term work of petrochemical equipment will have problems such as bearing, gear, body wear and loss of components. Vibration monitoring method can predict or diagnose early faults of equipment [5], effectively avoiding equipment under-maintenance or transition maintenance. The specific functional requirements for vibration monitoring are as follows: (1) Signal acquisition and calculation: Vibration monitoring requires three physical quantities of acceleration, velocity and displacement. The acceleration signal a(t) of the petrochemical equipment is taken point by point according to a certain time interval, and the speed signal is obtained by integrating the acceleration signal in the time domain, and the calculation formula is: Perform a time domain integral operation on the velocity signal to obtain a displacement signal. The calculation formula is: The acceleration (mm/s 2 ), velocity (mm/s) and displacement (mm) of the petrochemical plant are calculated by averaging.
(2) Data display: A set of vibration data that can display a single measurement point in real time, including acceleration, velocity and displacement.
(3) Data storage: The device vibration data can be permanently stored in batches.
(4) Data analysis: According to the preset thresholds of acceleration, speed and displacement, the over-limit alarm is realized; the acceleration waveform is recorded for a period of time, and the frequency component of the signal is analyzed by Fourier transform.
(5) Data uploading and downloading: It can choose to upload part of the data or all data of the device to the server and feedback the uploading result; it can select and download the historical vibration data of a time period from the server side, compare it with the current data, and judge the device running. status.
(6) Data viewing: The device and time interval can be selected, and the selected vibration data can be viewed in the form of a line chart and a data table.
(7) Question registration: It is possible to record device problems or non-device problems in text or photo, including device bit number, time when problems are found, problem parts and processing methods.
The non-functional requirements for vibration monitoring are as follows: (1) The frequency response range is 10Hz~10KHz; the effective range of acceleration is 0.1~199.9mm/s 2 , the effective range of speed is 0.1~119.9mm/s, and the effective range of displacement is 0.001~1.999mm.
(2) The calculation is fast and accurate, the data refresh time is less than 300ms, and the error is ±%5rdg.±3dgts.
(3) The system has low power consumption and continuous working time of more than 16 hours. It has power-off protection technology and automatically shuts down after a period of no operation.
(4) The collection terminal has low cost, the quality is less than 200g, and the volume is suitable for one-hand operation.

Overall Design
According to the above requirements analysis, using the multi-layer design mode, the overall architecture of the vibration monitor is designed as shown in Fig.1. Among them, the vibration monitor consists of two parts: the collector and the mobile APP system. The collector and the mobile phone communicate data via Bluetooth. The mobile APP system communicates with the monitoring server via a wireless network. The collector mainly realizes functions such as signal acquisition and calculation, real-time data display, data storage, and Bluetooth data communication; the mobile APP system implements functions such as data storage, data analysis, data uploading and downloading, data viewing, and problem registration.  Compared with all functions in one instrument, the monitor is divided into two parts: the collector and the mobile APP. It has the following features: (1) The collector hardware module is reduced, the board size is reduced, and the chip cost and circuit design complexity are reduced.
(2) A mobile phone can communicate with multiple collectors, and multiple collectors work at the same time without affecting each other, improving the utilization rate of mobile phones and monitoring work efficiency.
(3) Introducing the mobile APP system and communicating with the collector Bluetooth, making the overall structure of the vibration monitor more flexible, easier to maintain and function expansion.

Collector hardware design
The hardware composition of the collector is shown in Fig.2

Vibration Sensor Selection
Vibration sensors include strain gauge, piezoelectric and piezoresistive types. Strain gauge sensors have low frequency response and are difficult to meet vibration measurement requirements [6]. The difference between the piezoelectric sensor and the piezoresistive sensor is shown in Table 1. It can be seen that although the piezoelectric sensor has high output impedance, it is simpler in structure, lighter in weight and higher in sensitivity than the piezoresistive sensor [7], and has a high signal-to-noise ratio, especially affected by temperature [8], which is better. Stability. Therefore, this paper chooses piezoelectric vibration sensor, which is based on piezoelectric effect, can convert mechanical signals into electrical signals [9,10], and can adapt to the environment where the temperature fluctuation of petrochemical equipment work site is large.

Master Chip Selection
Since the collector mainly implements signal acquisition and calculation functions, the main control chip can meet the design requirements by using a microcontroller (MCU). There are many MCUs on the market, among which 32-bit MCUs are the most widely used, and the performance and cost are relatively balanced. They are often used in complex occasions such as industrial control and multimedia processing.
Considering that the collector communicates data via Bluetooth, this paper chooses CC2640 as the main control chip. The CC2640 is a wireless micro-control chip introduced by TI in the United States. It is internally embedded with a Bluetooth controller, eliminating the need to design an external Bluetooth module, reducing the size of the board. The chip contains a 32-bit ARM core with an operating voltage range of 1.8V to 3.8V and a standby current of only 1.1μA in an ultra-low power mode. It also has an ultra-low-power sensor controller that can be connected to an external sensor that operates independently of the system and can be used to connect vibration sensors. The 2.4GHz RF part of the CC2640 complies with the Bluetooth specification and increases the transmission distance of Bluetooth communication by accessing an external antenna.

Signal Acquisition Module Design
Using the BNC connector to connect the piezoelectric vibration sensor to the collector, the output signal is very weak, and the direct use will affect the accuracy of the vibration signal. In order to prevent the electrical signal from being drowned in the circuit noise, the electrical signal needs to be processed, and the signal conditioning circuit is shown in Fig.3. A filter is connected to the output of the sensor to filter out the noise frequency generated by the external environment. Due to the high impedance of the vibration sensor, the signal amplifier circuit uses the LTC6087 dual rail-to-rail CMOS amplifier for impedance change and signal amplification. The LTC6087 has extremely low bias current and noise, and has almost no influence on the vibration signal. The power supply current of each amplifier is only 1.1mA, which meets the low power consumption requirements of the vibration monitor, and uses a chip to form a twostage amplifier circuit. It also saves board space. The CS5343 analog-to-digital converter is used to perform analog-to-digital conversion and anti-aliasing filtering on the signal, which is then transmitted to the CC2640 wireless microcontroller via the I 2 S bus.

Power Module Design
The vibration monitor is powered by a lithium battery and manages the battery using the TP4057 charger chip. The lithium battery has large capacity, high energy storage efficiency and good stability, and meets the portability requirements of the vibration monitor. LTC3440 converter internal integrated topology, can provide continuous transmission function, suitable for single-cell lithium battery, BUCK-BOOST circuit based on LTC3440 design shown in Fig.4, it provides 3.3V working voltage for vibration monitor. When the S3 button is pressed, the battery supplies a voltage of about 2.6V to the SS. The LTC3440 soft start outputs voltage to the CC2640 master chip, and the program starts running. When the GPIO pin of the CC2640 is set high and the POWER LOCK receives the feedback signal from the GPIO pin, the APM2710 turns on the latch voltage to stabilize the SS at about 3.3V. At this time, the vibration monitor remains in operation. The APM2710 is a dual-channel enhancement MOS tube that is small and rugged, saving power and increasing reliability. The power section also has a circuit based on the LM2662 voltage converter that provides a negative operating voltage for the signal acquisition circuitry. Through the longterm working test of the vibration monitor, it is verified that the constant voltage source circuit is stable and effective, and can provide 3.3V and -3.3V working voltage for the system.

Collector Software Design
The working process of the collector is shown in Fig.5. After the vibration monitor is initialized, the measuring point of a petrochemical equipment is measured. After sampling, filtering and calculation, the obtained acceleration, velocity and displacement data are displayed on the screen in real time. According to the need to select other measuring points to continue measurement, until the measurement is completed, the collector and the mobile APP system for Bluetooth communication, the mobile APP system controls the vibration monitor to transmit vibration data. If you want to record the vibration waveform operation on the measuring point, use the recording waveform function of the vibration monitor to record the vibration change of the measuring point in a period of time. After the recording is finished, the vibration waveform is also transmitted to the mobile APP system through Bluetooth.  Figure 5. Collector workflow The CC2640 has a 28KB system SRAM, the Bluetooth communication protocol occupies 14KB of SRAM, and the remaining 14KB is used to write the collector program. The program module structure is divided into five parts: control module, acquisition module, display module, Bluetooth module and data storage module. The filtering sub-module performs FIR filtering processing on the digital signal, and implements FIR filtering by using fast Fourier transform programming, thereby avoiding voltage EMCEME 2019 IOP Conf. Series: Materials Science and Engineering 782 (2020) 042001 IOP Publishing doi:10.1088/1757-899X/782/4/042001 7 drift and temperature drift problems that cannot be overcome by the hardware circuit. Due to the limited computing power of the CC2640 micro-control chip, the calculation sub-module uses the sliding averaging algorithm for the acceleration. The set of acceleration data is , , …, and the average acceleration calculation formula is: Using MATLAB for data analysis, set s to take 256 data, the calculated average acceleration is approximated to the actual acceleration, and the velocity and displacement are also calculated by this method.

Mobile APP System Design
The mobile APP system has functions such as device list, Bluetooth communication, vibration measurement, data upload, data download, data viewing, and problem registration.
The overall architecture of the Android-based mobile APP system is shown in Fig.6. It mainly includes three layers of view, control and model. The responsibilities of each layer are as follows: (1) View layer: The xml file is used to construct a visual interface, which is responsible for displaying the content of the model layer and providing a series of operable interfaces.
(2) Control layer: Contains external interfaces and internal toolkits, which are responsible for reading data from the view layer, handling user operations, and sending data to the model layer.
(3) Model layer: The data logic used to process the program, and the data is passed to the view layer to display to the user through the data access entity class.

Measuring Vibration Function Test
In order to verify the vibration measurement function, this paper selects two similar instruments on the market as comparison, and performs 200 acceleration measurements on one vibration equipment in the laboratory and one petrochemical equipment on the industrial site. The measured data are shown in Table  2 and Table 3 is shown. It can be seen that the vibration monitor designed in this paper has little difference with the data measured by similar instruments, and realizes the function of monitoring vibration. By  8 calculating the variance of the acceleration and recording the response time of the data, the vibration monitor designed in this paper has less fluctuations on the same measurement point, and is relatively stable, and the data response time is also the shortest.

Bluetooth Communication Test
In the industrial environment, there is strong signal interference. In this paper, the Bluetooth communication distance of the vibration monitor is tested repeatedly. One set of test results is shown in Table 4. When the collector and the mobile phone are within 10m, the data transmission is accurate. There will be no packet loss, and the transmission time of about 1s can be accepted. In the actual measurement, the staff holds the collector, and the mobile phone is also in a relatively close position, and the Bluetooth transmission data is stable and reliable.

Field Application Effect
Since March 2018, 40 vibration monitors have been put into use, and more than 600 petrochemical equipments have been monitored and more than 100,000 vibration data of measuring points have been stored. The staff reported the problem 107 times in two months in April and May, 91 of which found problems with the equipment, two false positives, 14 misdiagnosis cases, and the early warning success rate reached 85%, which made the fault diagnosis obvious. Effect. The specific field application effects are as follows: (1) The collector is easy to carry, and there are few abnormal phenomena such as crash, stuck, slow operation, etc., and the work is relatively stable; when the device is touched, the vibration data can be displayed in real time. (2) After using the mobile APP system, the staff can manage the devices that need to be monitored online; the mobile APP system can store data in batches, which is more efficient than manually recording data; set a unified problem level standard, and describe various aspects of the problem. Staff do not need to manually fill out work orders.
(3) The mobile APP system is easy to operate; when the amount of data is large, the system runs slower.
(4) In April and May, there was a problem with a collector button. The sensor solder joint of one collector was in poor contact, and the failure rate was 5%, which was at a low level.

Conclusion
This paper designs a petrochemical equipment vibration monitor based on multi-layer architecture mode, which is divided into two parts: collector and mobile APP system. The collector uses the piezoelectric effect of the piezoelectric vibration sensor to acquire the vibration signal, and then uses the hardware to process the signal, and the software program calculates the current acceleration, velocity and displacement of the device. The mobile APP system receives vibration data through Bluetooth, and stores, analyzes, and uploads data. From the test and application effects, the vibration monitor can better monitor the vibration signal of petrochemical equipment, and Bluetooth can stably transmit data. Now it has been applied to the petrochemical equipment work site, repeatedly discovering and warning equipment problems, and diagnosing equipment failures. Maintain equipment stability and avoid risks. In the future work, the vibration sensor process should be improved, and the MVVM mode that facilitates a large amount of data operation is used in the mobile APP system to improve the reliability of the collector and the running speed of the mobile APP system.