基于Android平台的192道自然电位监测仪测控软件开发
Development of the Android-based measurement and control software for a 192-channel spontaneous potential monitor
通讯作者: 陈儒军(1973-),男,博士,副教授,主要从事地球物理仪器及信号处理研究工作。Email:chen.rujun@foxmail.com
责任编辑: 王萌
收稿日期: 2021-12-5 修回日期: 2022-02-17
基金资助: |
|
Received: 2021-12-5 Revised: 2022-02-17
作者简介 About authors
刘志同(1996-),男,中南大学硕士研究生,主要从事电法、电磁法仪器的研制工作。Email:
为了满足192道自然电位监测仪便携性、智能化、长时间自动监测的要求,解决现阶段电法勘探仪器的采集控制设备在人机交互性、续航能力、便携性等方面存在的不足。本文通过将蓝牙、Wifi等物联网技术与地球物理仪器相结合,设计了基于Android平台的采集控制软件。经过测试,该软件功能高效,数据传输质量好、运行稳定。在地质微生物自然电场信号检测实际应用中表现稳定,可以不间断监测超过36 h,数据采集准确度高、可视化效果好,有较强的实际应用价值。
关键词:
In order to meet the requirements of portable,intelligent and long-term automatic monitoring of 192 channel spontaneous potential monitor,the shortcomings of the acquisition and control equipment of current electrical exploration instruments in man-machine interaction,endurance and portability are solved.In this paper,the acquisition and control software based on Android platform is designed by combining Bluetooth,Wifi and other IoT technologies with geophysical instruments.After testing,the software function is efficient,the data transmission quality is good,the software runs stably.In the practical application of natural electric field signal detection of geological microorganisms, the performance is stable and can be monitored continuously for more than 36 h. The data acquisition accuracy is high, and the visualization effect is good, so it has strong practical application value.
Keywords:
本文引用格式
刘志同, 陈儒军, 崔益安, 王小杰, 王子辉, 刘瑨.
LIU Zhi-Tong, CHEN Ru-Jun, CUI Yi-An, WANG Xiao-Jie, WANG Zi-Hui, LIU Jin.
0 引言
随着智能手机的日益普及,开发基于智能手持终端的地球物理仪器采集控制软件可以充分利用移动设备的优势,降低地球物理工作者的劳动强度[6]。将新兴计算机电子技术应用到地球物理仪器中去,在很大程度上可以推动地球物理仪器的发展[7]。随着网络技术、无线传感物联、云计算、大数据等新技术的应用,地学测量仪器也将迎来新的发展机遇[8]。如已有的基于Android平台的物探测量采集辅助系统[9]和基于Android平台的地震设备维修管理系统[10]以及基于Android平台的重力垂直梯度求解软件的开发[11]。同时,利用各种无线技术发展更易于携带的仪器已经成为了趋势[12],并且已经有基于Android智能设备的地球物理仪器采集控制软件。如冯生强[13]开发的Android平台的折射/反射兼容地震仪器控制系统,文尚石等[14]研发的Android平台广域电磁接收机采集监控软件。
由于本设计应用于地质微生物自然电位监测,根据地质微生物自然电位变化缓慢、信号强度较高(可达到几十毫伏)的特点,本文设计开发了一款基于Android平台的多通道自然电位监测软件,可以对大量自然电位测量点(最多192点)按照一定时间间隔进行重复多次观测,具有充电方便、操作简单、人机交互性友好的特点。
1 自然电位监测仪无线通信方案选择
自然电位监测仪嵌入式系统集成了蓝牙模块与Wifi模块,其中蓝牙模块是由秉火科技生产的BH-HC05蓝牙串口模块。由于Android端软件人机交互性好,显示方便,故192道三维自然电位监测仪器采用Android设备蓝牙作为主设备发起搜索,仪器蓝牙作为从设备建立通信。本设计选取的Wifi模块为Anylinkin公司生产的ALK8266 Wifi模块,192道三维自然电位监测仪器采用Wifi模块AP模式与Android手机客户端构建无线局域网建立通信通道实现TCP/IP协议通信。
2 自然电位监测仪测控软件设计
2.1 软件设计框架
图1
图1
192道自然电位监测仪Android端软件框架
Fig.1
Android software framework of 192-channel spontaneous potential monitor
2.2 软件主程序流程设计
为了满足仪器无线通信和长时间自动监测的需求,软件主程序流程设计如图2所示,首先通过Android端软件实现对仪器蓝牙和热点的搜索与连接,然后发送配置和采集命令,软件就进入自动监测环节,每接收到需要的数据量就自动处理、保存、可视化。然后自动接收下一波数据,不断循环直到用户发送停止采集命令才会停止工作。
图2
3 自然电位监测仪测控软件开发及软件功能
3.1 Android 开发环境搭建
本自然电位监测仪采集软件采用Java语言开发,开发环境为Android studio 3.4+Android SDK + JDK1.8.0_181。测试手机为荣耀30, Android 10,内核4.14.116版本。
3.2 Android端软件功能开发
3.2.1 长时间自动监测
由于地质微生物单个观测点的自然电位一般随时间变化并不剧烈,信号强度也不低,观测记录比较容易,但由于是长时间的监测,对仪器的稳定性要求比较高,为保证程序能够长时间自动监测,需要对数据质量严格把控,否则一旦发生数据错误、丢失等问题,就容易在数据处理与可视化过程中出现不可预知的问题,导致程序停止运行。所以为了能够实现长时间自动监测功能,在仪器采集系统采集数据时,通过时钟在每一个二进制数据前加上4位的通道序号二进制数据,在Android端软件对数据通道号进行严格对比判断数据质量,若发现错误就自动舍弃当前的数据,避免错误的数据继续运行导致程序崩溃,同时也避免了保存坏数据结果从而影响对数据结果的二次处理。
流程图如图3 所示,主要有两种情况会影响仪器稳定性,第一种是Wifi数据无法传输,这时会进行超时等待判断,如果传输通道建立后8 s内软件无法收到数据,就可以认为是Wifi模块或采集模块异常,发送仪器复位命令重置仪器,保证监测能够顺利进行;第二种是数据传输出错,通过通道号校验发现错误并舍弃本组数据,以防止仪器系统崩溃。
图3
3.2.2 数据处理
对于自然电位监测来说,主要的干扰来自50 Hz工频干扰,192道三维自然电位监测仪器采样率最低250 Hz,最高可达1 000 Hz,原始时间序列包括整数个50 Hz干扰周期(如1 s),对测量数据进行叠加,可以增强自然电位信号,压制50 Hz干扰。通过对每个自然电位点1 s测量的数据进行求平均值运算,将50 Hz干扰过滤掉,从而得到自然电位信号。
3.2.3 数据持久化存储
192道三维自然电位监测仪器Android端采集控制软件有两种文件需要持久化存储,一个是原始数据文件,一个是结果数据文件。如图4c所示,原始数据文件(.dat文件)是循环自动生成的,采集完192道数据后,以系统时间+采样率+文件生成序号为原始数据文件名,其中文件生成序号是本次采集中自动生成的文件编号,为了方便后期对原始数据进行整理。
图4
结果数据文件(.txt文件)是在原始数据文件生成后,通过对原始数据进行解析、运算、处理,每次循环得到192个自然电位数据,长时间监测将得到多组192道数据,将这些自然电位数据存储到.txt文件中,然后导出到其他软件中进行专门分析。
3.2.4 数据可视化
Android软件数据可视化采用的是MPAndroidChart图表框架。本次设计实现了多曲线图的数据自动刷新,由于采集系统有六个内部通道,每一秒切换一次继电器,单曲线图显示的是每个外部通道1s采集的数据的平均值,每接收到新的原始数据文件两个图表就会自动刷新。
3.3 软件功能与测试
3.3.1 Android端软件页面和主程序主体流程
该应用程序可以安装在Android 8.0及以上版本的智能手机中,软件页面如图4所示,在参数设置页面进行采样率和增益的设置之后,对仪器进行校准,然后就可以进入采集数据状态,采集控制页面分为5部分:时序多曲线图、外部通道号单曲线图、数值显示区、日志信息区、按钮控制区。生成的结果可以在测量结果页面查看,结果文件主要有两种类型,一种是.dat原始数据文件,另一种是.txt结果数据文件。
3.3.2 测试结果
192道自然电位监测仪在地质微生物自然电场信号检测实际应用中,表现稳定,可以不间断监测超过36 h,数据采集准确度高,有较强的实际应用价值。经过测试,192道三维自然电位监测系统软件实现了自动长时间监测、无线(蓝牙、Wifi)通信、数据存取、数据实时可视化等预期功能(见图5)。
图5
本次测试设置采样率为250 Hz,采集完成一组192道自然电位数据时间约为32 s,每一组数据会生成一个原始数据文件,从日志信息可以看到已经接收了4 365个文件,仪器已经连续采集工作了97 h,稳定性良好。
从原始数据曲线看,可以发现较强的50 Hz工频干扰,通过数据求平均值处理后,工频干扰受到压制,获得了真实的自然电位信号(如单曲线图所示),通过与万用表直流档测量结果对比,发现本软件处理后的自然电位测量结果与万用表测量结果一致,证明采集软件功能正常,达到了预期效果。
4 结论
192道三维自然电位监测仪器对同一个自然电位电极采样间隔为32 s,可以满足地质微生物自然电场监测短时变化需求;通过测试可以看出仪器稳定性良好,可以长时间进行自然电位监测,电然电位监测数据全部保存在文本文件中,可以通过其他软件对长时变化进行专门分析。
192道三维自然电位监测系统软件具有人机交互效果好、操作简单的优点,具有无线传输、长时间监测、实时数据可视化的优势,可直接安装在Android手机上,大大提高地球物理仪器工作的灵活性和可操作性。
参考文献
Electrical response of flow,diffusion,and advection in a laboratory sand box
[J].DOI:10.2136/vzj2004.1180 URL [本文引用: 1]
Chemico-electromechanical coupling in microporous media
[J].We determine the macroscopic transport properties of isotropic microporous media by volume-averaging the local Nernst-Planck and Navier-Stokes equations in nonisothermal conditions. In such media, the excess of charge that counterbalances the charge deficiency of the surface of the minerals is partitioned between the Gouy-Chapman layer and the Stern layer. The Stern layer of sorbed counterions is attached to the solid phase, while the Gouy-Chapman diffuse layer is assumed to have a thickness comparable to the size of the pores. Rather than using Poisson-Boltzmann distributions to describe the ionic concentrations in the pore space of the medium, we rely on Donnan distributions obtained by equating the chemical potentials of the water molecules and ions between a reservoir of ions and the pore space of the medium. The macroscopic Maxwell equations and the macroscopic linear constitutive transport equations are derived in the vicinity of equilibrium, assuming that the porous material is deformable. In the vicinity of thermodynamic equilibrium, the cross-coupling phenomena of the macroscopic constitutive equations of transport follow Onsager reciprocity. In addition, all the material properties entering the constitutive equations depend only on two textural properties, the permeability and the electrical formation factor.
自然电位法在层间氧化带砂岩型铀矿的应用研究——以新疆伊犁地区洪海沟矿床为列
[J].
Application of self-potential method in sandstone uranium deposits in interlayer oxidation zone: A case study of Honghaigou deposit in Yili area,Xinjiang
[J].
基于自然电位的充填裂隙溶质运移特征试验研究
[J].
Experimental study on solute transport characteristics of filling fissure based on self-potential
[J].
地震观测仪器自动监控软件设计与实现
[J].
Design and implementation of automatic monitoring software for seismic observation instruments
[J].
音频大地电磁仪数据采集软件
[C]//
Audio magnetotelluric data acquisition software
[C]//
地球物理探测仪数据采集的新型智能化处理探究
[J].
Exploration of new intelligent processing of geophysical sounder data acquisition
[J].
基于Android平台的物探测量辅助软件平台研发
[J].
Research and development of auxiliary software platform for geophysical prospecting and measurement based on Android platform
[J].
基于 Android 平台的地震设备维修管理系统
[J].
Seismic equipment maintenance management system based on Android platform
[J].
基于Android平台的重力垂直梯度解算软件的开发[A].国家安全地球物理丛书(十一)——地球物理应用前沿
[C].
Development of gravity vertical gradient computing software based on Android platform [A].National Security Geophysics Series (11)—Frontier of Geophysical application
[C].
便携式近地表频率域电磁法仪器研究现状与发展趋势
[J].
Research status and development trend of portable near surface frequency domain electromagnetic instrument
[J].
基于Android平台的折/反射兼容地震仪器控制系统
[C]//
A folding/reflection compatible seismic instrument control system based on Android platform
[C]//
基于Android平台的广域电磁接收机采集监控软件研究与实现
[J].
Research and implementation of wide area electromagnetic receiver acquisition and monitoring software based on Android platform
[J].
/
〈 |
|
〉 |
