APP下载

基于GPS的自学习导航游弋式水质监测系统设计

2016-04-09刘星桥陈海磊朱成云江苏大学电气信息工程学院镇江22000盐城师范学院新能源与电子工程学院盐城224005

农业工程学报 2016年1期
关键词:GPS定位遥感水质

刘星桥,陈海磊,朱成云,2(.江苏大学电气信息工程学院,镇江22000;2.盐城师范学院新能源与电子工程学院,盐城224005)



基于GPS的自学习导航游弋式水质监测系统设计

刘星桥1,陈海磊1,朱成云1,2
(1.江苏大学电气信息工程学院,镇江212000;2.盐城师范学院新能源与电子工程学院,盐城224005)

摘要:针对水质监测系统单点定位测量范围有限,多点定位测量成本高的问题,设计了一种自动导航游弋式水质监测系统。首先,采用CC2530芯片作为游弋船的运动主控制器和小船的遥控控制器,其中船上的CC2530模块作为Zigbee网络的汇聚节点,遥控器中的CC2530模块作为终端节点,通过遥控器实现测量船的现场手动路线示范遥控;其次,将小船运动控制芯片,数字传感器和GPS定位模块通过485总线连接到GPRS模块,再通过GPRS网络将信息上传到服务器,服务器对水质参数信息进行解码还原存入数据库,对各测量点GPS地理信息进行存储,自学习出合理的自动导航测量路径;最后,自动方式下,根据自动导航测量路径,测量船自动运行,服务器与Android客户端进行数据交互,实现对水质信息的多点移动监测。该系统不仅增加了测量范围,也降低了测量成本,可以广泛用于水产养殖、江河管理和城市供水的水源取水口的水质安全监控。

关键词:遥感;监测;水质;GPS定位,GPRS通讯;Android客户端;CC2530

刘星桥,陈海磊,朱成云.基于GPS的自学习导航游弋式水质监测系统设计[J].农业工程学报,2016,32(01):84-90.doi:10.11975/j.issn.1002-6819.2016.01.011 http://www.tcsae.org

Liu Xingqiao, Chen Hailei,Zhu Chengyun.Design of self-learning cruising type water quality monitoring system based on GPS[J].Transactions of the Chinese Society of Agricultural Engineering(Transactions of the CSAE), 2016, 32(01): 84-90.(in Chinese with English abstract)doi:10.11975/j.issn.1002-6819.2016.01.011 http://www.tcsae.org

0 引言

目前,中国的水产养殖业正处于蓬勃发展期[1]。随着养殖规模的不断扩张,养殖水体的自然承载能力已日趋饱和,养殖模式正逐渐从传统的粗放型养殖向现代的集约化工厂化养殖转变[2]。水质监测作为水产养殖中的一个重要环节,也逐渐的由人工的凭经验的定性检测向在线实时监测发展。

在国外,一些国家通过先进的传感器技术,数据融合技术和互联网技术建立了信息平台,实现农业生态环境的自动监测,确保农业生态环境的可持续发展[3-6]。最近,出现了使用仿生机器鱼实现在水中游弋监测水质环境[7]。

随着技术的发展,国内水质监测的手段也有的很大的进步。如袁琪[8]等开发的以89C51为控制核心的水质自动监测系统,可以在现场实时监测多个水参数;蔡强[9]等研究的基于CAN(controller area network)总线的在线监控系统,提高了采集数据的可靠性,同时通过短信的方式实现了远程的监测;黄建清[10]等研究了把MPS430单片机和nRF905射频芯片相结合构建了一个无线传感网络,解决了现场布线困难的问题,提升了监测系统的覆盖范围。李慧[11]等研究了基于Android平台的水质远程监控系统,使用户摆脱了工位固定的苦恼,实现了随时随地查看水质状况的功能。

近几年,无线远程监测[12-15]已成为一种趋势,而移动测量[16-19]也开始进入了研究范围。就目前来说,大部分的监测系统都是固定式测量系统,单点测量范围有限,所以往往采用多点分布的方式。多点测量能够较为准确测出水质情况,但是成本较高,普通养殖户还难以接受。为了满足以低成本准确地获得大面积水域的水质信息的要求,本文提出了一种基于GPS和GPRS的游弋式测量系统设计方案。以单点移动式测量代替多点分布式测量,通过无线传输将采集的水质信息以及采集点的地理位置信息传送至上位机。

1 系统总体设计

本系统将Zigbee通信技术、GPS卫星定位技术和GPRS通信技术相结合,实现对测量船的手动遥控、自学习、自动导航以及对多个水质参数的在线监测,其结构如图1所示。测量船分为2个部分:船体运动控制部分和信息采集部分。其中船体的运动控制部分核心芯片选用CC2530,将汇聚节点安置于船身内部,用于创建Zigbee网络和控制左右电机的启停,将终端节点作为小船的现场遥控器,通过Zigbee网络现场遥控测量船的运动,同时将CC2530汇聚节点通过485串口连接GPRS模块,接收远程的控制指令。信息采集部分又分为水质参数采集和地理信息采集,其中水质参数采集使用数字式的温度、溶解氧、pH值传感器,地理信息采集使用GPS模块和电子罗盘,将传感器和GPS模块通过485总线连接到GPRS模块,再由GPRS模块将数据传送给上位机服务器处理。服务器记录下测量船的运动轨迹和所有测量目标点位置信息后,向测量船发送指令,控制其按设定路线进行水质采集,同时,服务器将接收到的水质参数数据进行解析存入数据库,并且将数据发送给客户端。客户端则用于监视实时的水质参数变化和定位信息,也可以远程控制小船修改其运动路线。

图1 系统结构图Fig.1 System structure diagram

2 系统硬件设计

系统硬件由船体控制模块,水质参数采集模块,GPS定位模块,GPRS-DTU分组数据传输模块和电源模块5个部分组成,其框架结构图如图2所示。

2.1船体运动控制模块设计

系统以双体式模型船作为载体,选择RK-380PH-4733高速微型直流电机作为船体的动力输出,电机在12 V驱动电压下的最高转速可达15 000转以上。选用以L298N双H桥直流电机驱动芯片为核心驱动板来驱动电机,其原理图如图3所示。其中IN1、IN2为左电机驱动信号输入,IN3、IN4为右电机驱动信号输入,ENA、ENB为输入信号使能端,OUT1、OUT2为左电机驱动输出信号,OUT3、OUT4为右电机驱动输出信号,VSS接+5 V为驱动板供电,VS接12 V作为电机的驱动电压。驱动板的控制状态如表1所示。

图2 硬件结构图Fig.2 Hardware structure diagram

图3 L298N驱动电路原理图Fig.3 L298N drive circuit principle diagram

表1 控制状态表Table 1  Control status table

2.2水质参数采集模块设计

该模块由数字式的溶解氧传感器与pH值传感器构成。其中,溶解氧传感器选用的是苏州禹山传感科技公司的Y500-B型荧光法溶解氧传感器。其原理为基于物理学中特定物质对活性荧光的猝熄原理。荧光帽的外表面涂了一层黑色的隔光材料以避免日光和水中其它荧光物质的干扰,内表面涂了一层红色的荧光材料,来自一个发光二极管(LED)发出的蓝光照射在荧光帽内表面的荧光物质上,内表面的荧光物质受到激发,发出红光,通过检测红光与蓝光之间的相位差,并与内部标定值比对,从而计算出氧分子的浓度,经过温度和气压自动补偿输出最终值。pH传感器选用的是北京博海志远科技公司的PHJ-100B 型pH电极,再通过PHB-300C型变送器将输出变为485输出。

2.3GPS定位模块设计

该模块选择U-blox公司的第六代GPS模块NEO-6M,其拥有多达50个接收器通道,具备快速的搜星及循迹能力,定位精度达2.5 m。模块支持TTL串口输出,为了能够通过485总线通信,中间添加TTL转485的自转流向转换电路板。

2.4GPRS-DTU模块设计

该模块采用的是北京天同诚业公司的WG-8010-485型无线数传模块。因其具有自动连接的功能,支持永久在线,支持TCP通信协议,所以只要进行一次配置就可以长时间使用,且不易断线,发生数据丢失的情况很少。系统中通过本模块将采集信息与定位信息上传至服务器,同时实现服务器对测量船的远程控制。

3 系统软件设计

系统的软件设计由CC2530芯片控制驱动电机程序与遥控程序,服务器程序设计,Android客户端程序3个部分组成。

3.1CC2530程序设计

CC2530的开发环境为IAR Embedded Workbench选用的是ZigBee Pro协议栈,用C/C++语言对协议栈中的用户应用层进行编写。将CC2530汇聚节点的P0.0、P0.1、P0.6、P0.7分别接驱动板的IN1、IN2、IN3、IN4作为电机的信号输入源,将模拟PWM波信号输入L298N来驱动电机的正反转,根据驱动板的控制状态表编写程序实现测量船的前进、后退、左转、右转,同时通过调节PWM波的占空比来调节电机的转速。系统将船速分为3个等级:低速、中速和高速。正常运行采用中速,转弯时采用低速。通过接收终端节点发送的控制指令和GPRS-DTU发来的指令做出对应的动作从而实现对船体的现场控制与远程控制。

遥控主要是通过CC2530终端节点的按键事件来触发数据发送程序,将相应的运动控制指令与目标点设定指令发送给汇聚节点。

3.2服务器程序设计

服务器是整个系统的中枢,它既要记录测量船的运动轨迹,计算出自动导航路径,又要定时发送采集传感器查询指令,记录水质参数的历史数据,还要与客户端之间进行数据交互。服务器以Visual Studio 2010为开发平台,使用VB.NET语言编写[20-21]。其运行界面如图4所示。

图4 服务器界面Fig.4 Server interface

3.2.1Winsock通讯程序

服务器与下位机和客户端之间的数据传输都是采用SCOKET方式,使用VB中的Winsock控件实现[22]。Winsock通信大致可分为以下几个步骤:打开侦听端口,侦听端口请求;同意请求,建立连接,关闭侦听;接收数据;检查端口是否异常,如出现异常则关闭端口再重新打开侦听。

3.2.2GPS定位计算程序

GPS模块需要接收的是推荐最小定位信息(recommended minimum specific,RMC)和地面速度信息(track made good and ground speed,VTG)[23-26]。其中,RMC用于获取经纬度,VTG用于获取速度和方向。因为水塘面积有限,所以可以把球面近似成平面,当确定目标点后,就需要根据当前点与目标点计算出直线距离和磁北方向角,在与当前船头磁北角对比求出转向角。两点间距离的计算公式为:

式中a为两点的纬度差,°;b为两点的经度差,°;LAT1、LAT2为两点的纬度,°;r为地球半径,km。

方向角计算公式为:

式中X、Y分别为两点间直线在纬线和经线上的投影。

3.2.3自学习导航路径获取设计

服务器定时接收GPS位置信息,记录测量船运动路线,当接收目标点设定指令后,记录下目标点位置,建立目标点查询表。系统以最短路径采集全部目标点为原则设计了小船的路径规划图,如图5所示。进入自动导航状态后,系统按此路径路进行导航,当测量船到达一个目标点后,停泊测量同时查询表格获取下一个目标点的地理信息。

图5 路径规划图Fig.5 Path planning diagram

3.2.4采集信息计算程序

服务器向传感器发送查询指令后,传感器返回的数据是按一定的数据格式的,在服务器接收到数据后需要提取有效数据进行计算,还原出真实值。其中溶解氧的计算是先求出氧分子的浓度,其值为百分数以32bit浮点数表示,所以首先要将浮点数转换为十进制数,转换公式为:

其中,第31bit为符号位,为0则表示正数,反之为负数,其读数值用s表示;第30~23 bit为幂数,其读数值用e表示;第22~0 bit共23 bit作为系数,视为二进制纯小数,用x表示。然后经过温度,气压和盐度补偿后计算出溶氧值,补偿公式为:式中X1,X2分别为温度盐度补偿系数和气压补偿系数,计算公式如下:

式中A1=-173.429 2,A2=249.633 9,A3=143.348 3,A4=-21.849 2,B1=-0.033 096,B2=0.014 259,B3=-0.001 700,T=273.15+t,Phmg=pressure×760/101.325,Logu=8.107 65-(1 750.286/(235+t)),pressure为气压值,T为绝对温度(K),t为摄氏温度(℃);S为盐度(mg/L),纯净水中,S=0。

pH传感器返回的值以2个字节的十六进制数表示,可直接通过将十六进制转换为十进制计算出pH的值。3.3 Android客户端设计

安卓客户端主要用于监测实时水质参数与位置信息,同时可以代替遥控器手动控制测量船的运动,其操作界面如图6所示。

Android客户端的开发环境为AndroidSDK+JAVAJDK8+ Eclipse10[27-31]。其编程步骤为首先在AndroidManifest.xml文件中注册允许联网,然后在activity_main.xml进行界面布局,这里采用的是线性布局。最后在Main_Activity.java文件中进行程序编写。其流程图如图7所示。按下启动键开始接收信息,按下其它键则是控制测量船的运动。

图6 Android客户端界面Fig.6 Android client interface

图7 Android程序流程图Fig.7 Android program flow diagram

4 试验与结果分析

本系统在江苏省扬中现代渔业养殖试验基地的一片四大家鱼养殖水面中进行试验,试验中首先用遥控器控制测量船沿设计的路线在长方形池塘中航行,按计划设定12个目标点,然后转换为自动模式,让船寻找目标点不断逼近,到达目标点后测量该点附近的水质参数,停泊一段时间(如2 min)后启动寻找下一个目标点。系统可以实时获取温度、溶解氧、pH值和测量点对应的经纬度等信息。在本系统的远程监测下,对该区域进行了一个小时的游弋式测量(2015年7月18号),部分测量数据如表2所示。对测得的经纬度与设定点经纬度进行对比,如表3所示。

表2 温度、溶氧、pH、经纬度数据Table 2 Temperature, dissolved oxygen, pH, latitude and longitude data

表3 自动导航位置比较表Table 3 Automatic navigation position comparison table

从表2中可以看出,在相近的时间段内同一水面的不同位置,水温有1.5℃左右的变化,溶氧量有1 mg/L左右的变化,pH值基本不变。比较测量点的环境差别发现,溶氧含量低的地方有树木遮挡,离岸较近,水面相对比较平静并且在远离换水口的那一侧,而含量高的地方,水面波动较大,且离换水口较近,这一变化符合水中溶解氧水平分布的规律。从表3中可以看出,测量船的运行轨迹与设定轨迹基本一致,导航位置和设定位置之间的误差小于2 m。

5 结论

本文开发的基于GPS和GPRS的自学习路径导航游弋式远程监测系统,能够根据手动遥控测量船示范航行学习其运动轨迹,远程导航测量船按轨迹寻找逼近目标点。同时,可通过安卓手机客户端实时获取测量点的温度、溶氧、pH值等信息,并通过手机远程修正航线。系统以略高于固定式单点定位测量系统的成本,实现了多点移动测量的功能,大大提高了测量范围,增强了水质监测的机动性,适用于水产养殖、自来水厂和突发性污染水域的水质监测。

[参考文献]

[1]高亮亮,李道亮,陈英义,等.水产养殖监管物联网应用系统建设与管理研究[J].山东农业科学,2013,45(8):1-4.GaoLiangliang, Li Daoliang, Chen Yingyi,etal.Aquaculture regulatory iot application system construction and management research [J].Shandong agricultural science, 2013,45(8):1-4.(in Chinese with English abstract)

[2]曾洋泱,匡迎春,沈岳,等.水产养殖水质监控技术研究现状及发展趋势[J].渔业现代化,2013,40(1):40-44.ZengYangyang, KuangYingchun,ShenYue, et al.Aquaculture water quality monitoring technology research status and development trend[J].Fishery Modernization, 2013,40(1): 40-44.(in Chinese with English abstract)

[3] Joaquin G, Juan F VM, Alejandra N G, et al.Automated irrigation system using a wireless sensor network and GPRS Module[J].IEEE Transactions Ons on Instrumentation and Measurement, 2014, 63(1):166-176.

[4] Bencini L, Chiti F, Collodi G, et al.Agricultural monitoring based on wireless sensor network technology: real long life deployments for physiology and pathogens control[C].2009 3rd International Conference on Sensor Technologies and Applications, 2009,372-377.

[5] Ruiz-Garcia L, Lunadei L, Barreiro P, et al.A review of wireless sensor technologies and applications in agriculture and food industry: state of the art and current trends[J].Sensors, 2009, 9 (6): 4728-4750.

[6] Jeonghwan H, Hyun Y.Study of the ubiquitoushogfarmsystem using wireless sensor networks for environmental monitoring and facilities control sensons, 2010, 10(12):10752-10777.

[7] Ryuh Y S, Yang G H, Liu Jindong, et al.A school of robotic fish for mariculture monitoring in the sea coast[J].Journal of Bionic Engineering, 2015, 12(1): 37-46.

[8]袁琦,储春华,翁绍捷.基于AT89C51水产养殖环境参数自动监测系统设计与实现[J].农业网络信息,2012,04:13-16,20.Yuan Qi, Chu Chunhua, Weng Shaojie.Design and implementation of aquaculture environment parameter automaticmonitoring system based on AT89C51[J].Agricultural Network Information, 2012, 04: 13 -16,20.(in Chinese with English abstract)

[9]蔡强,王誉树,郭冬莲,等.基于CAN总线的水产养殖水质在线监控系统设计与实现[J].电子器件,2014,37(4):708-713.Cai Qiang, Wang Yushu, Guo Donglian, et al.Design and implementation of aquaculture water quality online monitoring system based on CAN bus[J].Journal of Electronics, 2014, 37(4): 708-713.(in Chinese with English abstract)

[10]黄建清,王卫星,姜晟,等.基于无线传感器网络的水产养殖水质监测系统开发与试验[J].农业工程学报,2013,29(4):183-190.Huang Jianqing, Wang Weixing, Jiang Cheng, et al.Development and test of aquacultural water quality monitoringsystem based on wireless sensor network [J].Transactions of the Chinese Society of Agricultural Engineering(Transactions of the CSAE), 2013,29 (4): 183-190.(in Chinese with English abstract)

[11]李慧,刘星桥,李景,等.基于物联网Android平台的水产养殖远程监控系统[J].农业工程学报,2013,29(13): 175-181.Li Hui, Liu XingQiao, Li Jing et al.Aquiculture remote monitoring system based on IOT Android platform [J].Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2013, 29(13): 175-181.(in Chinese with English abstract)

[12]宦娟,刘星桥,程立强,等.基于ZigBee的水产养殖水环境无线监控系统设计[J].渔业现代化,2012,39(1):34-39.HuanJuan, LiuXingqiao, ChengLiqiang, et al.Design of a wireless water environment monitoring system based on ZigBee in aquaculture[J].Fishery Modernization, 2012, 39(1): 34-39.(in Chinese with English abstract)

[13]陈娜娜,周益明,徐海圣,等.基于ZigBee与GPRS的水产养殖环境无线监控系统的设计[J].传感器与微系统,2011,30 (3): 108-110.Chen Nana, Zhou Yiming, Xu haisheng, et al.Design of aquaculture environment wireless monitoring system based on ZigBee and GPRS[J].Transducer and Microsystem Technologies, 2011, 30(3): 108-110.(in Chinese with English abstract)

[14]史兵,赵德安,刘星桥,等.基于无线传感网络的规模化水产养殖智能监控系统[J].农业工程学报,2011,27(9): 136-140.Shi Bing, Zhao Dean, Liu Xinqiao, et al.Intelligent monitoring system for industrialized aquaculture based on wireless sensor network.Transactions of the Chinese Society of Agricultural Engineering(Transactions of the CSAE), 2011, 27(9): 136-140.(in Chinese with English abstract)

[15]蒋建明,史国栋,李正明,等.基于无线传感器网络的节能型水产养殖自动监控系统[J].农业工程学报,2013,29(13):166-174.Jiang Jianming, Shi Guodong, Li Zhengming, et al.Energyefficient automatic monitoring system of aquaculture based on WSN.Transactions of the Chinese Society of Agricultural Engineering(Transactions of the CSAE), 2011, 27(9): 136-140.(in Chinese with English abstract)

[16]李飞飞.遥控式移动水质监测系统[D].浙江大学,2011.Li Feifei.Remote Control Type Mobile Water Quality Monitoring System[D].Hangzhou: Zhejiang University, 2011.(in Chinese with English abstract)

[17]金英连,王斌锐,严天宏.自主湖水环境监测船的运动控制系统设计[J].计算机工程,2012,38(22):240-243.Jin Linglian, Wang Binrui, Yan Tianhong.Design of independent lake water environment surveillance ship motion control system [J].ComputerEngineering, 2012, 38(22): 240-243.(in Chinese with English abstract)

[18]王卫星,高奕龙,陈彬彬,等.无人驾驶自动导航水质监测船[J].信息技术与信息化,2014,5:36-38.Wang Weixing, Gao Yilong, Chen Bingbing, et al.Unmanned automatic navigation water quality surveillance ship [J].Information Technology and Information, 2014, 5: 36-38.(in Chinese with English abstract)

[19]孟祥宝,黄家怿,谢秋波,等.基于自动巡航无人驾驶船的水产养殖在线监控技术[J].农业机械学报,2015,46(3):276-281,260.Meng Xiangbao, Huang Jiazhe, Xie Qiubo, et al.Based on an unmanned automatic cruise ship aquaculture on-line monitoring technology[J].Transactions of the Chinese Society for Agricultural Machinery, 2015, 46(3): 276-281, 260.(in Chinese with English abstract)

[20]李江全.Visual Basic.NET串口通信及测控应用典型实例.北京电子工业出版社,2012.Li Jiangquan.Visual Basic.NET serial port communication and measurement and control application of typical examples [J].Publishing House of Electronics Industry, Beijing, 2012.(in Chinese with English abstract)

[21] Thearon Willis, Bryan Newsom.Visual Basic 2010入门经典.北京清华大学出版社,2011.Thearon Willis, Bryan Newsom.Visual Basic 2010 classic introduction.Tsinghua University Press, Beijing, 2011.(in Chinese with English abstract)

[22]万鹏.Windows Sockets控件在网络通信中的程序实现[J].天津科技,2014,41(11): 13-15,17.Wan Peng.Windows Sockets control program realization in network communication[J].Tianjin Science& Technology, 2014, 41(11): 13-15, 17.(in Chinese with English abstract)

[23]邓小蕾,李民赞,武佳,等.集成GPRS、GPS、ZigBee的土壤水分移动监测系统[J].农业工程学报,2012,28(9):130-135.Deng Xiaolei, Li Mingzhan, WuJia, et al.Integration of GPRS, GPS, ZigBee soil moisture movement monitoring system [J].Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2012, 28(9): 130-135.(in Chinese with English abstract)

[24]李清泉,黄练.基于GPS轨迹数据的地图匹配算法[J].测绘学报,2010,39(2):207-212.Li Qingquan, Huang Lian.The map matching algorithm based on GPS trajectory data[J].Journal of Surveying and Mapping, 2010, 39(2): 207-212.(in Chinese with English abstract)

[25]蔡体菁,刘莹,宋军,等.嵌入式GPS/MIMU/磁罗盘组合导航系统[J].仪器仪表学报,2010,12:2695-2699.Cai Tijing, LiuYing, Song Jun, et al.The embedded GPS/MIMU/ magnetic compass integrated navigation system[J].Chinese Journal of Scientific Instrument, 2010, 12: 2695 -2699.(in Chinese with English abstract)

[26]丁毅.基于GPS和数字罗盘的割草机器人导航定位方法的研究[D].镇江:江苏大学,2005.Ding Yi.Based on GPS and Digital Compass Mowing Robot Navigation and Positioning Method Research [D].Zhenjiang: Jiangsu University, 2005.(in Chinese with English abstract)

[27]公磊,周聪.基于Android的移动终端应用程序开发与研究[J].计算机与现代化,2008,8:85-89.Gong Lei, Zhou Chong.Based on the Android mobile terminal application development and research[J].Computer and Modern, 2008, 8: 85-89.(in Chinese with English abstract)

[28]彭艳,杨欧.Android平台的数据存储技术[J].计算机系统应用,2012,21(5):192-194.PengYan, Yang Ou.The|android platform of data storage technology[J].Computer Systems & Applications, 2012, 21(5): 192-194.(in Chinese with English abstract)

[29]户伟利.Android工业现场数据发送与接收平台研发[D].南昌航空大学,2014.Hu Weili.The Development of Industry Field Data Sending and Receiving Based on Android Platform[D].Nanchang: Nan chang Hang kong University, 2014(in Chinese with English abstract)

[30] Ian G.Clifton.Android用户界面设计.北京:电子工业出版社,2014.Ian G.C.Android user interface design.Publishing House of Electronics Industry, Beijing, 2014.(in Chinese with English abstract)

[31] Bill Phillips, Brian Hardy.Android编程权威指南.北京:人民邮电出版社,2014.Phillips B, Hardy B.Authority of Android programming guide.Posts& Telecom Press, Beijing, 2014.(in Chinese with English abstract)

Design of self-learning cruising type water quality monitoring system based on GPS

Liu Xingqiao1, Chen Hailei2,Zhu Chengyun1,2
(1.School of Electrical & Information Engineering, Jiangsu University, Zhenjiang 212000, China; 2.School of New Energy and Electronic Engineering, Yancheng Teachers University, Yancheng 224005, China)

Abstract:Aquaculture involves cultivating freshwater and saltwater populations under controlled conditions, in which the high water quality plays an important role for the harvest of aquatic organisms.This paper proposes a water quality monitoring system to achieve that goal.While current water quality monitoring devices share drawbacks of small measuring range, poor mobility and high cost, the distinguished contribution of water monitoring is a self-learning navigation component, which can address the previously mentioned challenges in other systems.Our system contains a front-end water monitoring subsystem, as well as a back-end server to store and analyze the monitored data.We developed three main modules in the front-end monitoring subsystem: a water quality collection module, a vessel movement control module, and a GPS navigation module.The water quality collection module contains a PT100 temperature sensor, a fluorescence dissolved oxygen sensor, and an industrial pH meter.Those sensors are used to collect parameters related to water quality including water temperature, dissolved oxygen, and the pH value.The vessel motion control is remotely managed by a CC2530 chip, which periodically sends commands to the motion coordinator in the ship.All data from the monitoring subsystem, including the water quality parameters, vessel movement control commands, and the GPS locations, are sent to the GPRS layer, which acts as a bridge to connect the monitoring subsystem and the server.Once the server received data, it parses them and calculates the water temperature, the dissolved oxygen and PH values.Meanwhile, the server extracts the location information and computes the distance and the direction angle to the target position.We have designed a database to store the collected data in the server, and also developed an Android application so that individual users can access the data at all time and places.The user can even set measurement target and control the movement of the vessel directly by the Android client.This process is achieved by following steps: 1)the Android client sends control commands to the server; 2)the server calculates the steering angle based on the current state of vessel and location information, and sends a corresponding control command to the GPRS module; 3)the GPRS module passes the message to CC2530 chip through the RS485 serial port; 4)the chip simulates PWM waves to control the left and right motor revolution so that vessel can change direction and move freely as expected.The vessel gradually revises its path according to the received data and its current GPS location, and will move towards the final target eventually.Our system has been evaluated in a modern fishery breeding base in Yangzhong, Jiangsu Province.In the experiment, the ship was initially driven by manual control to select twelve measurement positions.After that, we utilize our self-learning system to navigate the ship to access those target positions.The ship stayesat each location for two minutes and collectswater quality parameters in the neighborhood.After an hour of testing, the errors between navigated positions and real target positions areless than 2 meters on average, and the maximum difference of dissolved oxygen value between those positions is 1 mg/L.The change of water temperature is 1.5℃, and pHvalue remains unchanged.Those results are consistent with the horizontal distribution law of water quality parameters.Compared with current state-of-arts, our system has the capability of mobile data collection, which can not only increase the measurement range but also reduce the cost.The system has significant potential in various applications such as aquaculture, river management, and hydrological monitoring.

Keywords:remote sensing; monitoring; water quality; global positioning system; GPRS communication; android app; CC2530

作者简介:刘星桥(1960-),博士,教授,主要从事农业电气化与自动化理论与自动化设备研究。镇江江苏大学电气信息工程学院,212013。Email:xqliu@ujs.edu.cn中国农业工程学会会员:刘星桥(E041200581S)

基金项目:江苏省农业科技支撑项目(BE2013402);中国博士后科学基金资助项目(2014M560404);江苏高校优势学科建设工程资助项目(PAPD,No.6-2011)

收稿日期:2015-09-06

修订日期:2015-11-25

中图分类号:TP273;S951.2

文献标志码:A

文章编号:1002-6819(2016)-01-0084-07

doi:10.11975/j.issn.1002-6819.2016.01.011

猜你喜欢

GPS定位遥感水质
关于水质监测对环境保护的意义
一月冬棚养虾常见水质浑浊,要如何解决?这9大原因及处理方法你要知晓
这条鱼供不应求!虾蟹养殖户、垂钓者的最爱,不用投喂,还能净化水质
图像识别在水质检测中的应用
基于微信平台的并行签到考勤管理系统
移动轨迹挖掘算法设计与系统实现
基于Android的多维级联定位技术的研究与实现
中国“遥感”卫星今年首秀引关注
基于遥感数据的雾物理属性信息提取
基于手机的分布式空气粉尘检测系统