Open Access Paper
2 February 2023 Upper computer software design for fretting signal acquisition system based on Qt
Taiping Mo, Ying Su, Yuan Tang
Author Affiliations +
Proceedings Volume 12462, Third International Symposium on Computer Engineering and Intelligent Communications (ISCEIC 2022); 124620T (2023) https://doi.org/10.1117/12.2660773
Event: International Symposium on Computer Engineering and Intelligent Communications (ISCEIC 2022), 2022, Xi'an, China
Abstract
Micro motion detection is an essential research direction in urban underground space and energy prospection. Aiming at the shortcomings of the traditional system for seismic exploration, the upper computer software of the micro motion signal acquisition system based on TCP/IP protocol is designed, which can be distributed offline acquisition and control. By formulating the communication protocol of the application layer and adding the heartbeat packet mechanism, the stable connection with the collector, data transmission and status monitoring is realized. Meanwhile the received data are stored and visualized, and the project management and task configuration are implemented by using the file reading and writing function of QT to achieve the effect of offline control. Through the test, the results show that each function can get the rapid and correct response of the lower computer, and the upper computer software of the system meets the design requirements. It has the advantages of high acquisition efficiency, reliability and convenience which has strong practicability.

1.

INTRODUCTION

“Fretting” refers to a natural vibration on the earth’s surface, which is composed of body waves and surface waves. The surface waves account for more than 70% of the fretting energy, and the dispersion phenomenon will occur when the surface waves propagate in uneven media1, while the body waves will not have dispersion, so the main object of micro-motion detection is surface waves. Micro motion detection usually uses the spatial autocorrelation method. By setting up the array, the dispersion curve of the surface wave is extracted from the collected ground signal, and then the structure under the array is obtained through inversion, which is like measuring the “pulse” of the earth2.

Due to the acceleration of urbanization, China’s urban construction has further developed into underground space, and the accompanying geological environmental pressure and impact have also increased sharply3. However, the traditional electromagnetic and seismic exploration will be disturbed by the complex urban environment to a certain extent, so that is difficult to achieve satisfactory results. The micro-motion signal has the characteristics of easy acquisition and anti-interference4. Even in a complex urban environment, it can effectively collect the required data and achieve a advantageous detection effect. With the increasing popularity of micro motion technology, it has been used in many fields, such as gob exploration, mineral exploration, track survey, etc., providing technical services for the project, and has a very high research value5,6.

At present, the equipment used for micro-motion detection in general seismic detection equipment, and there is no special micro-motion detection system. Mainstream seismic exploration projects use cables for signal transmission. Due to the complex situation of the actual exploration scene, the use of the offline control acquisition method is more suitable for the field environment and reduces the wiring cost. Therefore, the system needs to pay attention to portability, complete signal acquisition, storage and transmission, and be easy to operate and deploy. In practical work, it is often necessary to deploy multiple detectors to form an array, so the upper computer must be able to accept the connection of multiple acquisition nodes and control the nodes with offline. Technicians can arrange tasks indoors, and then professionals place and collect instruments in harsh environments meanwhile monitor the collector for ensure the correct sampling of signals. Combined with the system hardware, this paper realizes the upper computer software of micro motion signal acquisition through Qt development framework, operates multiple collectors at the same time, stably transmits data, visually processes the data for observation and analysis, and monitors the status of the collectors to ensure the normal operation of the equipment and troubleshooting.

2.

OVERALL FUNCTIONS OF THE SYSTEM

The micro-motion signal acquisition system mainly includes: the data collector and upper computer software. Establish the project through the upper computer software, set the parameters of the acquisition task, and send the task to all collectors connected to the upper computer through TCP/IP protocol. Considering that the actual environment is complex and inconvenient to assign tasks, you can set tasks in advance through a PC indoors. Then you only need to deploy the collector at the destination and start the machine to run autonomously. The equipment will start signal acquisition when the set time arrives and store the collected data in the SD card. After the task is completed, the equipment will be recycled and the data will be uploaded to the computer uniformly. The overall block diagram is as Fig.1:

Figure 1.

System structure block diagram.

00029_PSISDG12462_124620T_page_2_1.jpg

2.1

Function of Data Collector

The collector includes: power module, signal acquisition module, system control module, storage module and GPS module. The system control module is single chip microcomputer STM32, which controls and coordinates each module. The signal acquisition module includes analog signal conditioning circuit and AD conversion circuit. Equipment module and main functions are as follows:

Power module: provide stable DC power for vibration sensor, control system and each module; Control module: composed of a single chip microcomputer stm32 which is the main brain of control, coordinating each module to accomplish the task; GPS module: obtain longitude and latitude and current time; Signal acquisition module: composed of a detector, analog signal conditioning circuit and AD conversion circuit, which can convert vibration signals into electrical signals and amplify them; Storage module: store the task and its parameters, and save the collected data to the corresponding file according to the specified format; Communication module: communicate with the upper computer through WiFi or Ethernet, send the status or data of the collector to the upper computer.

2.2

Function of Upper Computer Software

The software structure of the upper computer is shown in Fig.2. There can be multiple tasks in a project, each task has its parameter settings, and each collector participating in the task has a different IP address. Among them, all the devices connected to the current task is operated with instruction interaction function at the same time.

Figure 2.

Upper computer software structure diagram.

00029_PSISDG12462_124620T_page_3_1.jpg

Engineering management enables the collector to collect signals offline so that there is no need to connect lines in a complex environment. After the collection, the data is recycled. In order to distinguish the purpose, place and time of each signal acquisition, the user needs to open or create a new project after the upper computer software is opened, and then create a new task in the project. The parameter settings of each task are independent of each other. Upload the data to the corresponding collector through the project name and task name, so as not to be confused by multiple acquisitions.

The upper computer software is connected with multiple collectors through Ethernet, and carries out command interaction and data transmission. The connection adopts the request-response mode. When the upper computer needs the collector to upload data, it will send a data request before the collector respond and send data, as well as sending tasks, querying equipment status and other instructions.

The data of the corresponding task of the collector be uploaded to the PC, while displaying the transmission progress, and saving it as a file after transmission. If the transmission is interrupted due to unexpected circumstances, the data can be uploaded again. For the stored historical collection data, it provides the function of viewing the data of local storage files. You can view the data collected in the past after a long time, and display the data in the form of charts.

3.

SOFTWARE DESIGN OF UPPER COMPUTER

After comparing MFC, Qt, WPF and other software development frameworks, the upper computer adopts Qt as the software development framework. Qt is a software development framework based on C++, which has excellent cross-platform characteristics. It can be exploited on one system and used on multiple systems. Qt great encapsulation mechanism makes Qt highly modular. In addition, Qt contains rich APIs for network, database, multithreading and other aspects of development7,8.

3.1

Operation Process

Fig.3 (a) is the software operation flow chart of the upper computer before collection. After the task is issued, take the collector to the destination for data collection. After the collection is completed, connect each collector to the same LAN as the PC through the switch, router, or WiFi. Then upload the data through the process of Fig.3 (b) to achieve the collection task.

Figure 3.

Upper computer software structure diagram.

00029_PSISDG12462_124620T_page_4_1.jpg

3.2

Interface Design

Fig.4 shows the operation interface of the upper computer software. The left side is the visualization of projects and tasks, which are automatically generated after the new projects and tasks are created. In the middle is the core component, where QStackedWidget is placed, which is called the stack window control and is to store widgets in the stack. Each widget has an index. You can select an index to display a certain layer and switch the interface at any time9. The core component is used to display the connected device status, graph, and other information. Presently, two devices are connected, and “ready” is displayed when the connection is successful. On the upper side of the interface are the menu bar and toolbar. Users can operate the project or equipment by clicking the icon in the toolbar or the option in the menu bar, then the middle core components will switch and display the required content accordingly.

Figure 4.

Upper computer interface.

00029_PSISDG12462_124620T_page_4_2.jpg

3.3

Engineering Management

QFile class is used in QT for the file operation. The default supported format is UTF-8. If the read file is in other formats, the read file format needs to be specially set10. Before using QFile class to operate files, you need to import header files into the program. To create an object of QFile class, you must open the file and call the open() member method before using QFile to read and write files. The project name, user name, creation time and other basic information related to the project are saved into a text file. To facilitate the operation of adding, deleting, modifying and querying, the database is used for storage.

Database is a warehouse that organizes, stores and manages data according to the data structure. SQLite database engine embedded in the application is selected in this design. It has no server and does not need a separate server process to run the management database. SQLite emphasizes efficiency, reliability, independence and simplicity, which is suitable for providing local data storage for a single application. Tasks and devices have a many-to-many relationship. A task can have multiple devices, and a device can also have multiple tasks. Usually, the many-to-many relationship needs to be realized through the intermediate table, which adds two foreign keys to associate two-dimensional tables. However, since the collector only needs to save the last byte of the IP address, two tables are enough to save all information. In the task table, there is configuration information such as task ID, task name, and sampling time. The device table has two columns of information: task ID and device IP. You can query the device IP through the task ID to connect. Through the operation of text files and database, the state of the project can be saved and restored, and then the corresponding equipment can be connected.

The established projects and tasks are displayed using TreeView, which is a tree control, usually used to make tree menus. Add the project to the primary node of the tree control, add each task to the secondary node, and each connected device is a tertiary node, which can shrink and expand at any time, and visually display the ownership relationship between the project, task and device.

3.4

Communication

For the consideration of data reliability, the communication between the collector and the host computer in this data acquisition system is realized through TCP protocol. The transmission control protocol (TCP) is a connection-oriented, reliable and byte stream-based transport layer communication protocol, which is defined by IETF RFC 79311. TCP/IP defines how network devices connect to the network and how to transmit, which is an end-to-end network transmission protocol. TCP/IP is divided into four layers, namely the application layer, transmission layer, network layer and network interface layer, as shown in Table 1.

Table 1.

TCP/IP examples of layer protocols.

Application layerHTTP,TELENET,FTPSNMP,TFTP,NTP
Transport layerTCPUDP
Network layerIP,ICMP,IGMP
Network interface layerHDLC,PPP

From the application layer to the network interface layer of TCP/IP protocol family, a header containing the necessary information of this layer will be added to the data in each layer, and the last Ethernet frame is shown in Table 2. At the receiving end, the unsealing operation is the opposite of that at the sending end.

Table 2.

Ethernet data frame.

Ethernet headerIP headerTCP headerApplication dataEthernet tail

Network interface layer defines the transmission of the media, which is related to hardware, such as whether to use cable or optical fiber, what format to encode, how to express and flow data on the media, etc. If you want to transmit data from one host to another through an IP address, you need to route to the destination correctly. Network layer is to deal with the transmission routing problem of data packets in the network. In the transmission process, some factors may trigger transmission errors and packet losses. If a reliable transmission is required, TCP protocol is used, which ensures reliable transmission through acceptance confirmation and retransmission mechanism. TCP/IP protocol is responsible for transmitting application data to application software. How to parse and use application data is defined by the application layer itself.

The format of application data in the system:

  • a) Magic Number: used to determine the unique identifier of the secondary system message, set to 0xa0b0.

  • b) Msgsrc: the last byte of the IP of the message source (the first three bytes of IP are set as fixed values)

  • c) Linktype: connection type, convenient for future expansion of 4G, Bluetooth and other connections

  • d) Opt: operation code, indicating what the message wants to do.

  • e) Pktsize: the size of this package. If there are additional parameters or data in this message, the data size will be assigned to Pktsize in bytes, and it will be 0 in other times.

  • f) Totalsize: if the additional parameters of the message are large and need to be transmitted in segments, it will be full size number, otherwise equal to Pktsize.

  • g) Checksum: checksum to ensure the integrity and accuracy of data.

  • h) Data: data or parameters to be transferred.

After the collector is successfully connected to the upper computer, a heartbeat packet will be sent every second. The heartbeat packet mainly contains the status information of the collector, such as the current collection status, remaining time, etc., and simultaneously tells the upper computer that the connection is normal. If the upper computer does not receive the heartbeat packet of the collector after 5 seconds, it will be marked with a red warning to remind the user to check the device and connection.

Socket is a network operation interface provided by a group of operating systems to programmers. We don’t need to realize the details of layer-by-layer encapsulation and parsing in TCP/IP protocol. The upper computer can easily access TCP/IP through socket after binding the IP address and port number, so as to communicate with the collector.

In this system, the upper computer is the client and the collector is the server. The device connection is encapsulated into a class. Each device connection object will create its own socket and have its own threads, which is multithreading. The multithreading system can send tasks to multiple devices and upload collector data at the same time.

3.5

Data Visualization

QChart library is a curve chart module for Qt graphics and image development. QChart implements various curves, pie charts, bar charts, line charts, etc. The official also provides demos of various styles and usages of QChart for us to quickly learn and use. In the upper computer, we take the sampling point as the abscissa and the amplitude of the signal as the ordinate to draw the curve. We can enlarge and narrow the range of the abscissa to see the size and change of the signal more clearly, or observe the data as a whole, and save the data file on the PC to view at any time.

4.

EXPERIMENTAL VERIFICATION

The actual fretting signal is so complex and uncontrollable that in order to test the accuracy of data transmission, a signal generator is used to generate sine waves instead of fretting signals for acquisition test.

On the one hand, the fretting signal is generated by natural phenomena such as changes in weather, wind speed, air pressure and waves, on the other hand, it is generated by human daily activities and work such as vehicles, machines, pedestrians, etc. The signal frequency generated by natural phenomena belongs to low-frequency signal is less than 1Hz, and the latter signal frequency is greater than or equal to 1Hz. Therefore, this test uses the signal generator to generate a sine wave with a frequency of 10Hz and an amplitude of 0.5mv to replace the fretting signal, Set the acquisition duration to 10 minutes and the sampling frequency to 1000Hz.

A new project and task are created after preparing a switch to connect the two collectors to the same LAN as the PC. The task parameters are set which as Fig.5:

Figure 5.

Parameters setting.

00029_PSISDG12462_124620T_page_6_1.jpg

After connecting the collector, start to test the command interaction function, including obtaining the equipment status, GPS information and real-time curve. All functions can operate stably. When click the issue-task icon, the status displayed on the upper computer changes from “ready” to a synchronous countdown. During this period, collectors are closed and restarted at any time and. After reconnecting, check that the task status is still counting down, indicating that the task has been in the collector storage module and has achieved the effect of offline control.

The collector starts sampling after the start time and then connects the device again later at the end time of sampling. We click upload data to view all data files and their graphs. The information displayed in the graph is consistent with the signal generated by the signal generator as shown in Fig.6:

Figure 6.

Data curve

00029_PSISDG12462_124620T_page_7_1.jpg

5.

CONCLUSION

From the perspective of promoting the portability of micro motion exploration equipment, improving the acquisition efficiency and engineering management, the micro-motion signal acquisition upper computer software is designed which is distributed offline acquisition control. Combined with the QT application software development platform, it integrates engineering management, transmission control, data processing and storage, and data visualization. The experimental results show that the upper computer can stably transmit and control multiple collectors at the same time, as well as data storage and visualization. All functions respond correctly and meet the design requirements. In the future, it can also design cloud servers and mobile apps for it to make the acquisition system more convenient and intelligent.

ACKNOWLEDGMENT

This work was supported by National Natural Science Foundation of China under Grant (61863007). Guangxi Natural Science Foundation under Grant (2020GXNSFDA238029).

REFERENCES

[1] 

Dong Yao, Gao Pengju, Jin Lu, Li Heng,XiaoJuan, “Application research of micro-motion detection in urban geological survey [J],” China Energy and Environmental Protection, 41 (12), 88 –92 (2019). Google Scholar

[2] 

Zhou Xin, Wang Wenjing, Li Yang, Meng Qingsheng, “Research and Application of Microtremor in the Geological Disaster [J],” Periodical of Ocean University of China, 51 (08), 58 –64 (2021). Google Scholar

[3] 

Han Chen, Liang Feng, “Elementary introduction to the research on the extraction of urban shallow ambient noise [J],” Geological Review, 67 (S1), 34 –36 (2021). Google Scholar

[4] 

Tian Baoqing, Ding Zhifeng, “Review and prospect prediction for microtremor survey method [J],” Progress in Geophysics, 36 (03), 1306 –1316 (2021). Google Scholar

[5] 

Gao Yanhua, Huang Suhang, Liu Dan, Li Yongbing, Gao Mengqi,Yu Lei, “Microtremor Detection Technology and Its New Progress in Engineering Application [J],” Science Technology and Engineering, 18 (23), 146 –155 (2018). Google Scholar

[6] 

Qiao Gaoqian, Xu Peifen, Long Gang, Ling Suqun, “Application of the Microtremor Profile Method in Urban Rail Transit Survey: A Case Study along Subway Line 10 in Guangzhou [J],” Science Technology and Engineering, 21 (20), 8582 –8591 (2021). Google Scholar

[7] 

Li Zhuangzhuang, Application research of micro-motion detection in urban geological survey [D], Ji Nan (2021). Google Scholar

[8] 

Li Jinming, Zhang Zhihao, “The design of the temperature and humidity monitoring system of the greenhouse based on Qt [J],” Electronic Measurement Technology, 44 (08), 135 –140 (2021). Google Scholar

[9] 

Shao Gang, Xie Shiqi, Duan Guoning, “Configurable Monitoring System Programed by Qt [J],” Industrial Control Computer, 35 (03), 69 –70 (2022). Google Scholar

[10] 

Jia Beibei, Kang Mingcai, “Software design of embedded system file transfer host computer based on QT [J],” Electronic Design Engineering, 30 (03), 122 –125+130 (2022). Google Scholar

[11] 

Diao Zijian, Zhang Shouming, “Design of a six-dimensional force sensor signal acquisition system based on TCP/IP protocol [J],” Journal of Shaanxi University of Technology(Natural Science Edition), 38 (02), 28 –33+65 (2022). Google Scholar
© (2023) COPYRIGHT Society of Photo-Optical Instrumentation Engineers (SPIE). Downloading of the abstract is permitted for personal use only.
Taiping Mo, Ying Su, and Yuan Tang "Upper computer software design for fretting signal acquisition system based on Qt", Proc. SPIE 12462, Third International Symposium on Computer Engineering and Intelligent Communications (ISCEIC 2022), 124620T (2 February 2023); https://doi.org/10.1117/12.2660773
Advertisement
Advertisement
RIGHTS & PERMISSIONS
Get copyright permission  Get copyright permission on Copyright Marketplace
KEYWORDS
Data storage

Control systems

Data acquisition

Signal detection

Software development

Telecommunications

Back to Top