劉星橋,陳海磊,朱成云,2(.江蘇大學(xué)電氣信息工程學(xué)院,鎮(zhèn)江22000;2.鹽城師范學(xué)院新能源與電子工程學(xué)院,鹽城224005)
?
基于GPS的自學(xué)習(xí)導(dǎo)航游弋式水質(zhì)監(jiān)測(cè)系統(tǒng)設(shè)計(jì)
劉星橋1,陳海磊1,朱成云1,2
(1.江蘇大學(xué)電氣信息工程學(xué)院,鎮(zhèn)江212000;2.鹽城師范學(xué)院新能源與電子工程學(xué)院,鹽城224005)
摘要:針對(duì)水質(zhì)監(jiān)測(cè)系統(tǒng)單點(diǎn)定位測(cè)量范圍有限,多點(diǎn)定位測(cè)量成本高的問(wèn)題,設(shè)計(jì)了一種自動(dòng)導(dǎo)航游弋式水質(zhì)監(jiān)測(cè)系統(tǒng)。首先,采用CC2530芯片作為游弋船的運(yùn)動(dòng)主控制器和小船的遙控控制器,其中船上的CC2530模塊作為Zigbee網(wǎng)絡(luò)的匯聚節(jié)點(diǎn),遙控器中的CC2530模塊作為終端節(jié)點(diǎn),通過(guò)遙控器實(shí)現(xiàn)測(cè)量船的現(xiàn)場(chǎng)手動(dòng)路線示范遙控;其次,將小船運(yùn)動(dòng)控制芯片,數(shù)字傳感器和GPS定位模塊通過(guò)485總線連接到GPRS模塊,再通過(guò)GPRS網(wǎng)絡(luò)將信息上傳到服務(wù)器,服務(wù)器對(duì)水質(zhì)參數(shù)信息進(jìn)行解碼還原存入數(shù)據(jù)庫(kù),對(duì)各測(cè)量點(diǎn)GPS地理信息進(jìn)行存儲(chǔ),自學(xué)習(xí)出合理的自動(dòng)導(dǎo)航測(cè)量路徑;最后,自動(dòng)方式下,根據(jù)自動(dòng)導(dǎo)航測(cè)量路徑,測(cè)量船自動(dòng)運(yùn)行,服務(wù)器與Android客戶端進(jìn)行數(shù)據(jù)交互,實(shí)現(xiàn)對(duì)水質(zhì)信息的多點(diǎn)移動(dòng)監(jiān)測(cè)。該系統(tǒng)不僅增加了測(cè)量范圍,也降低了測(cè)量成本,可以廣泛用于水產(chǎn)養(yǎng)殖、江河管理和城市供水的水源取水口的水質(zhì)安全監(jiān)控。
關(guān)鍵詞:遙感;監(jiān)測(cè);水質(zhì);GPS定位,GPRS通訊;Android客戶端;CC2530
劉星橋,陳海磊,朱成云.基于GPS的自學(xué)習(xí)導(dǎo)航游弋式水質(zhì)監(jiān)測(cè)系統(tǒng)設(shè)計(jì)[J].農(nóng)業(yè)工程學(xué)報(bào),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
目前,中國(guó)的水產(chǎn)養(yǎng)殖業(yè)正處于蓬勃發(fā)展期[1]。隨著養(yǎng)殖規(guī)模的不斷擴(kuò)張,養(yǎng)殖水體的自然承載能力已日趨飽和,養(yǎng)殖模式正逐漸從傳統(tǒng)的粗放型養(yǎng)殖向現(xiàn)代的集約化工廠化養(yǎng)殖轉(zhuǎn)變[2]。水質(zhì)監(jiān)測(cè)作為水產(chǎn)養(yǎng)殖中的一個(gè)重要環(huán)節(jié),也逐漸的由人工的憑經(jīng)驗(yàn)的定性檢測(cè)向在線實(shí)時(shí)監(jiān)測(cè)發(fā)展。
在國(guó)外,一些國(guó)家通過(guò)先進(jìn)的傳感器技術(shù),數(shù)據(jù)融合技術(shù)和互聯(lián)網(wǎng)技術(shù)建立了信息平臺(tái),實(shí)現(xiàn)農(nóng)業(yè)生態(tài)環(huán)境的自動(dòng)監(jiān)測(cè),確保農(nóng)業(yè)生態(tài)環(huán)境的可持續(xù)發(fā)展[3-6]。最近,出現(xiàn)了使用仿生機(jī)器魚實(shí)現(xiàn)在水中游弋監(jiān)測(cè)水質(zhì)環(huán)境[7]。
隨著技術(shù)的發(fā)展,國(guó)內(nèi)水質(zhì)監(jiān)測(cè)的手段也有的很大的進(jìn)步。如袁琪[8]等開(kāi)發(fā)的以89C51為控制核心的水質(zhì)自動(dòng)監(jiān)測(cè)系統(tǒng),可以在現(xiàn)場(chǎng)實(shí)時(shí)監(jiān)測(cè)多個(gè)水參數(shù);蔡強(qiáng)[9]等研究的基于CAN(controller area network)總線的在線監(jiān)控系統(tǒng),提高了采集數(shù)據(jù)的可靠性,同時(shí)通過(guò)短信的方式實(shí)現(xiàn)了遠(yuǎn)程的監(jiān)測(cè);黃建清[10]等研究了把MPS430單片機(jī)和nRF905射頻芯片相結(jié)合構(gòu)建了一個(gè)無(wú)線傳感網(wǎng)絡(luò),解決了現(xiàn)場(chǎng)布線困難的問(wèn)題,提升了監(jiān)測(cè)系統(tǒng)的覆蓋范圍。李慧[11]等研究了基于Android平臺(tái)的水質(zhì)遠(yuǎn)程監(jiān)控系統(tǒng),使用戶擺脫了工位固定的苦惱,實(shí)現(xiàn)了隨時(shí)隨地查看水質(zhì)狀況的功能。
近幾年,無(wú)線遠(yuǎn)程監(jiān)測(cè)[12-15]已成為一種趨勢(shì),而移動(dòng)測(cè)量[16-19]也開(kāi)始進(jìn)入了研究范圍。就目前來(lái)說(shuō),大部分的監(jiān)測(cè)系統(tǒng)都是固定式測(cè)量系統(tǒng),單點(diǎn)測(cè)量范圍有限,所以往往采用多點(diǎn)分布的方式。多點(diǎn)測(cè)量能夠較為準(zhǔn)確測(cè)出水質(zhì)情況,但是成本較高,普通養(yǎng)殖戶還難以接受。為了滿足以低成本準(zhǔn)確地獲得大面積水域的水質(zhì)信息的要求,本文提出了一種基于GPS和GPRS的游弋式測(cè)量系統(tǒng)設(shè)計(jì)方案。以單點(diǎn)移動(dòng)式測(cè)量代替多點(diǎn)分布式測(cè)量,通過(guò)無(wú)線傳輸將采集的水質(zhì)信息以及采集點(diǎn)的地理位置信息傳送至上位機(jī)。
本系統(tǒng)將Zigbee通信技術(shù)、GPS衛(wèi)星定位技術(shù)和GPRS通信技術(shù)相結(jié)合,實(shí)現(xiàn)對(duì)測(cè)量船的手動(dòng)遙控、自學(xué)習(xí)、自動(dòng)導(dǎo)航以及對(duì)多個(gè)水質(zhì)參數(shù)的在線監(jiān)測(cè),其結(jié)構(gòu)如圖1所示。測(cè)量船分為2個(gè)部分:船體運(yùn)動(dòng)控制部分和信息采集部分。其中船體的運(yùn)動(dòng)控制部分核心芯片選用CC2530,將匯聚節(jié)點(diǎn)安置于船身內(nèi)部,用于創(chuàng)建Zigbee網(wǎng)絡(luò)和控制左右電機(jī)的啟停,將終端節(jié)點(diǎn)作為小船的現(xiàn)場(chǎng)遙控器,通過(guò)Zigbee網(wǎng)絡(luò)現(xiàn)場(chǎng)遙控測(cè)量船的運(yùn)動(dòng),同時(shí)將CC2530匯聚節(jié)點(diǎn)通過(guò)485串口連接GPRS模塊,接收遠(yuǎn)程的控制指令。信息采集部分又分為水質(zhì)參數(shù)采集和地理信息采集,其中水質(zhì)參數(shù)采集使用數(shù)字式的溫度、溶解氧、pH值傳感器,地理信息采集使用GPS模塊和電子羅盤,將傳感器和GPS模塊通過(guò)485總線連接到GPRS模塊,再由GPRS模塊將數(shù)據(jù)傳送給上位機(jī)服務(wù)器處理。服務(wù)器記錄下測(cè)量船的運(yùn)動(dòng)軌跡和所有測(cè)量目標(biāo)點(diǎn)位置信息后,向測(cè)量船發(fā)送指令,控制其按設(shè)定路線進(jìn)行水質(zhì)采集,同時(shí),服務(wù)器將接收到的水質(zhì)參數(shù)數(shù)據(jù)進(jìn)行解析存入數(shù)據(jù)庫(kù),并且將數(shù)據(jù)發(fā)送給客戶端。客戶端則用于監(jiān)視實(shí)時(shí)的水質(zhì)參數(shù)變化和定位信息,也可以遠(yuǎn)程控制小船修改其運(yùn)動(dòng)路線。
圖1 系統(tǒng)結(jié)構(gòu)圖Fig.1 System structure diagram
系統(tǒng)硬件由船體控制模塊,水質(zhì)參數(shù)采集模塊,GPS定位模塊,GPRS-DTU分組數(shù)據(jù)傳輸模塊和電源模塊5個(gè)部分組成,其框架結(jié)構(gòu)圖如圖2所示。
2.1船體運(yùn)動(dòng)控制模塊設(shè)計(jì)
系統(tǒng)以雙體式模型船作為載體,選擇RK-380PH-4733高速微型直流電機(jī)作為船體的動(dòng)力輸出,電機(jī)在12 V驅(qū)動(dòng)電壓下的最高轉(zhuǎn)速可達(dá)15 000轉(zhuǎn)以上。選用以L298N雙H橋直流電機(jī)驅(qū)動(dòng)芯片為核心驅(qū)動(dòng)板來(lái)驅(qū)動(dòng)電機(jī),其原理圖如圖3所示。其中IN1、IN2為左電機(jī)驅(qū)動(dòng)信號(hào)輸入,IN3、IN4為右電機(jī)驅(qū)動(dòng)信號(hào)輸入,ENA、ENB為輸入信號(hào)使能端,OUT1、OUT2為左電機(jī)驅(qū)動(dòng)輸出信號(hào),OUT3、OUT4為右電機(jī)驅(qū)動(dòng)輸出信號(hào),VSS接+5 V為驅(qū)動(dòng)板供電,VS接12 V作為電機(jī)的驅(qū)動(dòng)電壓。驅(qū)動(dòng)板的控制狀態(tài)如表1所示。
圖2 硬件結(jié)構(gòu)圖Fig.2 Hardware structure diagram
圖3 L298N驅(qū)動(dòng)電路原理圖Fig.3 L298N drive circuit principle diagram
表1 控制狀態(tài)表Table 1 Control status table
2.2水質(zhì)參數(shù)采集模塊設(shè)計(jì)
該模塊由數(shù)字式的溶解氧傳感器與pH值傳感器構(gòu)成。其中,溶解氧傳感器選用的是蘇州禹山傳感科技公司的Y500-B型熒光法溶解氧傳感器。其原理為基于物理學(xué)中特定物質(zhì)對(duì)活性熒光的猝熄原理。熒光帽的外表面涂了一層黑色的隔光材料以避免日光和水中其它熒光物質(zhì)的干擾,內(nèi)表面涂了一層紅色的熒光材料,來(lái)自一個(gè)發(fā)光二極管(LED)發(fā)出的藍(lán)光照射在熒光帽內(nèi)表面的熒光物質(zhì)上,內(nèi)表面的熒光物質(zhì)受到激發(fā),發(fā)出紅光,通過(guò)檢測(cè)紅光與藍(lán)光之間的相位差,并與內(nèi)部標(biāo)定值比對(duì),從而計(jì)算出氧分子的濃度,經(jīng)過(guò)溫度和氣壓自動(dòng)補(bǔ)償輸出最終值。pH傳感器選用的是北京博海志遠(yuǎn)科技公司的PHJ-100B 型pH電極,再通過(guò)PHB-300C型變送器將輸出變?yōu)?85輸出。
2.3GPS定位模塊設(shè)計(jì)
該模塊選擇U-blox公司的第六代GPS模塊NEO-6M,其擁有多達(dá)50個(gè)接收器通道,具備快速的搜星及循跡能力,定位精度達(dá)2.5 m。模塊支持TTL串口輸出,為了能夠通過(guò)485總線通信,中間添加TTL轉(zhuǎn)485的自轉(zhuǎn)流向轉(zhuǎn)換電路板。
2.4GPRS-DTU模塊設(shè)計(jì)
該模塊采用的是北京天同誠(chéng)業(yè)公司的WG-8010-485型無(wú)線數(shù)傳模塊。因其具有自動(dòng)連接的功能,支持永久在線,支持TCP通信協(xié)議,所以只要進(jìn)行一次配置就可以長(zhǎng)時(shí)間使用,且不易斷線,發(fā)生數(shù)據(jù)丟失的情況很少。系統(tǒng)中通過(guò)本模塊將采集信息與定位信息上傳至服務(wù)器,同時(shí)實(shí)現(xiàn)服務(wù)器對(duì)測(cè)量船的遠(yuǎn)程控制。
系統(tǒng)的軟件設(shè)計(jì)由CC2530芯片控制驅(qū)動(dòng)電機(jī)程序與遙控程序,服務(wù)器程序設(shè)計(jì),Android客戶端程序3個(gè)部分組成。
3.1CC2530程序設(shè)計(jì)
CC2530的開(kāi)發(fā)環(huán)境為IAR Embedded Workbench選用的是ZigBee Pro協(xié)議棧,用C/C++語(yǔ)言對(duì)協(xié)議棧中的用戶應(yīng)用層進(jìn)行編寫。將CC2530匯聚節(jié)點(diǎn)的P0.0、P0.1、P0.6、P0.7分別接驅(qū)動(dòng)板的IN1、IN2、IN3、IN4作為電機(jī)的信號(hào)輸入源,將模擬PWM波信號(hào)輸入L298N來(lái)驅(qū)動(dòng)電機(jī)的正反轉(zhuǎn),根據(jù)驅(qū)動(dòng)板的控制狀態(tài)表編寫程序?qū)崿F(xiàn)測(cè)量船的前進(jìn)、后退、左轉(zhuǎn)、右轉(zhuǎn),同時(shí)通過(guò)調(diào)節(jié)PWM波的占空比來(lái)調(diào)節(jié)電機(jī)的轉(zhuǎn)速。系統(tǒng)將船速分為3個(gè)等級(jí):低速、中速和高速。正常運(yùn)行采用中速,轉(zhuǎn)彎時(shí)采用低速。通過(guò)接收終端節(jié)點(diǎn)發(fā)送的控制指令和GPRS-DTU發(fā)來(lái)的指令做出對(duì)應(yīng)的動(dòng)作從而實(shí)現(xiàn)對(duì)船體的現(xiàn)場(chǎng)控制與遠(yuǎn)程控制。
遙控主要是通過(guò)CC2530終端節(jié)點(diǎn)的按鍵事件來(lái)觸發(fā)數(shù)據(jù)發(fā)送程序,將相應(yīng)的運(yùn)動(dòng)控制指令與目標(biāo)點(diǎn)設(shè)定指令發(fā)送給匯聚節(jié)點(diǎn)。
3.2服務(wù)器程序設(shè)計(jì)
服務(wù)器是整個(gè)系統(tǒng)的中樞,它既要記錄測(cè)量船的運(yùn)動(dòng)軌跡,計(jì)算出自動(dòng)導(dǎo)航路徑,又要定時(shí)發(fā)送采集傳感器查詢指令,記錄水質(zhì)參數(shù)的歷史數(shù)據(jù),還要與客戶端之間進(jìn)行數(shù)據(jù)交互。服務(wù)器以Visual Studio 2010為開(kāi)發(fā)平臺(tái),使用VB.NET語(yǔ)言編寫[20-21]。其運(yùn)行界面如圖4所示。
圖4 服務(wù)器界面Fig.4 Server interface
3.2.1Winsock通訊程序
服務(wù)器與下位機(jī)和客戶端之間的數(shù)據(jù)傳輸都是采用SCOKET方式,使用VB中的Winsock控件實(shí)現(xiàn)[22]。Winsock通信大致可分為以下幾個(gè)步驟:打開(kāi)偵聽(tīng)端口,偵聽(tīng)端口請(qǐng)求;同意請(qǐng)求,建立連接,關(guān)閉偵聽(tīng);接收數(shù)據(jù);檢查端口是否異常,如出現(xiàn)異常則關(guān)閉端口再重新打開(kāi)偵聽(tīng)。
3.2.2GPS定位計(jì)算程序
GPS模塊需要接收的是推薦最小定位信息(recommended minimum specific,RMC)和地面速度信息(track made good and ground speed,VTG)[23-26]。其中,RMC用于獲取經(jīng)緯度,VTG用于獲取速度和方向。因?yàn)樗撩娣e有限,所以可以把球面近似成平面,當(dāng)確定目標(biāo)點(diǎn)后,就需要根據(jù)當(dāng)前點(diǎn)與目標(biāo)點(diǎn)計(jì)算出直線距離和磁北方向角,在與當(dāng)前船頭磁北角對(duì)比求出轉(zhuǎn)向角。兩點(diǎn)間距離的計(jì)算公式為:
式中a為兩點(diǎn)的緯度差,°;b為兩點(diǎn)的經(jīng)度差,°;LAT1、LAT2為兩點(diǎn)的緯度,°;r為地球半徑,km。
方向角計(jì)算公式為:
式中X、Y分別為兩點(diǎn)間直線在緯線和經(jīng)線上的投影。
3.2.3自學(xué)習(xí)導(dǎo)航路徑獲取設(shè)計(jì)
服務(wù)器定時(shí)接收GPS位置信息,記錄測(cè)量船運(yùn)動(dòng)路線,當(dāng)接收目標(biāo)點(diǎn)設(shè)定指令后,記錄下目標(biāo)點(diǎn)位置,建立目標(biāo)點(diǎn)查詢表。系統(tǒng)以最短路徑采集全部目標(biāo)點(diǎn)為原則設(shè)計(jì)了小船的路徑規(guī)劃圖,如圖5所示。進(jìn)入自動(dòng)導(dǎo)航狀態(tài)后,系統(tǒng)按此路徑路進(jìn)行導(dǎo)航,當(dāng)測(cè)量船到達(dá)一個(gè)目標(biāo)點(diǎn)后,停泊測(cè)量同時(shí)查詢表格獲取下一個(gè)目標(biāo)點(diǎn)的地理信息。
圖5 路徑規(guī)劃圖Fig.5 Path planning diagram
3.2.4采集信息計(jì)算程序
服務(wù)器向傳感器發(fā)送查詢指令后,傳感器返回的數(shù)據(jù)是按一定的數(shù)據(jù)格式的,在服務(wù)器接收到數(shù)據(jù)后需要提取有效數(shù)據(jù)進(jìn)行計(jì)算,還原出真實(shí)值。其中溶解氧的計(jì)算是先求出氧分子的濃度,其值為百分?jǐn)?shù)以32bit浮點(diǎn)數(shù)表示,所以首先要將浮點(diǎn)數(shù)轉(zhuǎn)換為十進(jìn)制數(shù),轉(zhuǎn)換公式為:
其中,第31bit為符號(hào)位,為0則表示正數(shù),反之為負(fù)數(shù),其讀數(shù)值用s表示;第30~23 bit為冪數(shù),其讀數(shù)值用e表示;第22~0 bit共23 bit作為系數(shù),視為二進(jìn)制純小數(shù),用x表示。然后經(jīng)過(guò)溫度,氣壓和鹽度補(bǔ)償后計(jì)算出溶氧值,補(bǔ)償公式為:式中X1,X2分別為溫度鹽度補(bǔ)償系數(shù)和氣壓補(bǔ)償系數(shù),計(jì)算公式如下:
式中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為絕對(duì)溫度(K),t為攝氏溫度(℃);S為鹽度(mg/L),純凈水中,S=0。
pH傳感器返回的值以2個(gè)字節(jié)的十六進(jìn)制數(shù)表示,可直接通過(guò)將十六進(jìn)制轉(zhuǎn)換為十進(jìn)制計(jì)算出pH的值。3.3 Android客戶端設(shè)計(jì)
安卓客戶端主要用于監(jiān)測(cè)實(shí)時(shí)水質(zhì)參數(shù)與位置信息,同時(shí)可以代替遙控器手動(dòng)控制測(cè)量船的運(yùn)動(dòng),其操作界面如圖6所示。
Android客戶端的開(kāi)發(fā)環(huán)境為AndroidSDK+JAVAJDK8+ Eclipse10[27-31]。其編程步驟為首先在AndroidManifest.xml文件中注冊(cè)允許聯(lián)網(wǎng),然后在activity_main.xml進(jìn)行界面布局,這里采用的是線性布局。最后在Main_Activity.java文件中進(jìn)行程序編寫。其流程圖如圖7所示。按下啟動(dòng)鍵開(kāi)始接收信息,按下其它鍵則是控制測(cè)量船的運(yùn)動(dòng)。
圖6 Android客戶端界面Fig.6 Android client interface
圖7 Android程序流程圖Fig.7 Android program flow diagram
本系統(tǒng)在江蘇省揚(yáng)中現(xiàn)代漁業(yè)養(yǎng)殖試驗(yàn)基地的一片四大家魚養(yǎng)殖水面中進(jìn)行試驗(yàn),試驗(yàn)中首先用遙控器控制測(cè)量船沿設(shè)計(jì)的路線在長(zhǎng)方形池塘中航行,按計(jì)劃設(shè)定12個(gè)目標(biāo)點(diǎn),然后轉(zhuǎn)換為自動(dòng)模式,讓船尋找目標(biāo)點(diǎn)不斷逼近,到達(dá)目標(biāo)點(diǎn)后測(cè)量該點(diǎn)附近的水質(zhì)參數(shù),停泊一段時(shí)間(如2 min)后啟動(dòng)尋找下一個(gè)目標(biāo)點(diǎn)。系統(tǒng)可以實(shí)時(shí)獲取溫度、溶解氧、pH值和測(cè)量點(diǎn)對(duì)應(yīng)的經(jīng)緯度等信息。在本系統(tǒng)的遠(yuǎn)程監(jiān)測(cè)下,對(duì)該區(qū)域進(jìn)行了一個(gè)小時(shí)的游弋式測(cè)量(2015年7月18號(hào)),部分測(cè)量數(shù)據(jù)如表2所示。對(duì)測(cè)得的經(jīng)緯度與設(shè)定點(diǎn)經(jīng)緯度進(jìn)行對(duì)比,如表3所示。
表2 溫度、溶氧、pH、經(jīng)緯度數(shù)據(jù)Table 2 Temperature, dissolved oxygen, pH, latitude and longitude data
表3 自動(dòng)導(dǎo)航位置比較表Table 3 Automatic navigation position comparison table
從表2中可以看出,在相近的時(shí)間段內(nèi)同一水面的不同位置,水溫有1.5℃左右的變化,溶氧量有1 mg/L左右的變化,pH值基本不變。比較測(cè)量點(diǎn)的環(huán)境差別發(fā)現(xiàn),溶氧含量低的地方有樹木遮擋,離岸較近,水面相對(duì)比較平靜并且在遠(yuǎn)離換水口的那一側(cè),而含量高的地方,水面波動(dòng)較大,且離換水口較近,這一變化符合水中溶解氧水平分布的規(guī)律。從表3中可以看出,測(cè)量船的運(yùn)行軌跡與設(shè)定軌跡基本一致,導(dǎo)航位置和設(shè)定位置之間的誤差小于2 m。
本文開(kāi)發(fā)的基于GPS和GPRS的自學(xué)習(xí)路徑導(dǎo)航游弋式遠(yuǎn)程監(jiān)測(cè)系統(tǒng),能夠根據(jù)手動(dòng)遙控測(cè)量船示范航行學(xué)習(xí)其運(yùn)動(dòng)軌跡,遠(yuǎn)程導(dǎo)航測(cè)量船按軌跡尋找逼近目標(biāo)點(diǎn)。同時(shí),可通過(guò)安卓手機(jī)客戶端實(shí)時(shí)獲取測(cè)量點(diǎn)的溫度、溶氧、pH值等信息,并通過(guò)手機(jī)遠(yuǎn)程修正航線。系統(tǒng)以略高于固定式單點(diǎn)定位測(cè)量系統(tǒng)的成本,實(shí)現(xiàn)了多點(diǎn)移動(dòng)測(cè)量的功能,大大提高了測(cè)量范圍,增強(qiáng)了水質(zhì)監(jiān)測(cè)的機(jī)動(dòng)性,適用于水產(chǎn)養(yǎng)殖、自來(lái)水廠和突發(fā)性污染水域的水質(zhì)監(jiān)測(cè)。
[參考文獻(xiàn)]
[1]高亮亮,李道亮,陳英義,等.水產(chǎn)養(yǎng)殖監(jiān)管物聯(lián)網(wǎng)應(yīng)用系統(tǒng)建設(shè)與管理研究[J].山東農(nóng)業(yè)科學(xué),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]曾洋泱,匡迎春,沈岳,等.水產(chǎn)養(yǎng)殖水質(zhì)監(jiān)控技術(shù)研究現(xiàn)狀及發(fā)展趨勢(shì)[J].漁業(yè)現(xiàn)代化,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]袁琦,儲(chǔ)春華,翁紹捷.基于AT89C51水產(chǎn)養(yǎng)殖環(huán)境參數(shù)自動(dòng)監(jiān)測(cè)系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn)[J].農(nóng)業(yè)網(wǎng)絡(luò)信息,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]蔡強(qiáng),王譽(yù)樹,郭冬蓮,等.基于CAN總線的水產(chǎn)養(yǎng)殖水質(zhì)在線監(jiān)控系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn)[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]黃建清,王衛(wèi)星,姜晟,等.基于無(wú)線傳感器網(wǎng)絡(luò)的水產(chǎn)養(yǎng)殖水質(zhì)監(jiān)測(cè)系統(tǒng)開(kāi)發(fā)與試驗(yàn)[J].農(nóng)業(yè)工程學(xué)報(bào),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]李慧,劉星橋,李景,等.基于物聯(lián)網(wǎng)Android平臺(tái)的水產(chǎn)養(yǎng)殖遠(yuǎn)程監(jiān)控系統(tǒng)[J].農(nóng)業(yè)工程學(xué)報(bào),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]宦娟,劉星橋,程立強(qiáng),等.基于ZigBee的水產(chǎn)養(yǎng)殖水環(huán)境無(wú)線監(jiān)控系統(tǒng)設(shè)計(jì)[J].漁業(yè)現(xiàn)代化,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的水產(chǎn)養(yǎng)殖環(huán)境無(wú)線監(jiān)控系統(tǒng)的設(shè)計(jì)[J].傳感器與微系統(tǒng),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]史兵,趙德安,劉星橋,等.基于無(wú)線傳感網(wǎng)絡(luò)的規(guī)模化水產(chǎn)養(yǎng)殖智能監(jiān)控系統(tǒng)[J].農(nóng)業(yè)工程學(xué)報(bào),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]蔣建明,史國(guó)棟,李正明,等.基于無(wú)線傳感器網(wǎng)絡(luò)的節(jié)能型水產(chǎn)養(yǎng)殖自動(dòng)監(jiān)控系統(tǒng)[J].農(nóng)業(yè)工程學(xué)報(bào),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òng)水質(zhì)監(jiān)測(cè)系統(tǒng)[D].浙江大學(xué),2011.Li Feifei.Remote Control Type Mobile Water Quality Monitoring System[D].Hangzhou: Zhejiang University, 2011.(in Chinese with English abstract)
[17]金英連,王斌銳,嚴(yán)天宏.自主湖水環(huán)境監(jiān)測(cè)船的運(yùn)動(dòng)控制系統(tǒng)設(shè)計(jì)[J].計(jì)算機(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]王衛(wèi)星,高奕龍,陳彬彬,等.無(wú)人駕駛自動(dòng)導(dǎo)航水質(zhì)監(jiān)測(cè)船[J].信息技術(shù)與信息化,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]孟祥寶,黃家懌,謝秋波,等.基于自動(dòng)巡航無(wú)人駕駛船的水產(chǎn)養(yǎng)殖在線監(jiān)控技術(shù)[J].農(nóng)業(yè)機(jī)械學(xué)報(bào),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串口通信及測(cè)控應(yīng)用典型實(shí)例.北京電子工業(yè)出版社,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入門經(jīng)典.北京清華大學(xué)出版社,2011.Thearon Willis, Bryan Newsom.Visual Basic 2010 classic introduction.Tsinghua University Press, Beijing, 2011.(in Chinese with English abstract)
[22]萬(wàn)鵬.Windows Sockets控件在網(wǎng)絡(luò)通信中的程序?qū)崿F(xiàn)[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的土壤水分移動(dòng)監(jiān)測(cè)系統(tǒng)[J].農(nóng)業(yè)工程學(xué)報(bào),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軌跡數(shù)據(jù)的地圖匹配算法[J].測(cè)繪學(xué)報(bào),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/磁羅盤組合導(dǎo)航系統(tǒng)[J].儀器儀表學(xué)報(bào),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和數(shù)字羅盤的割草機(jī)器人導(dǎo)航定位方法的研究[D].鎮(zhèn)江:江蘇大學(xué),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的移動(dòng)終端應(yīng)用程序開(kāi)發(fā)與研究[J].計(jì)算機(jī)與現(xiàn)代化,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平臺(tái)的數(shù)據(jù)存儲(chǔ)技術(shù)[J].計(jì)算機(jī)系統(tǒng)應(yīng)用,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工業(yè)現(xiàn)場(chǎng)數(shù)據(jù)發(fā)送與接收平臺(tái)研發(fā)[D].南昌航空大學(xué),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用戶界面設(shè)計(jì).北京:電子工業(yè)出版社,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編程權(quán)威指南.北京:人民郵電出版社,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
作者簡(jiǎn)介:劉星橋(1960-),博士,教授,主要從事農(nóng)業(yè)電氣化與自動(dòng)化理論與自動(dòng)化設(shè)備研究。鎮(zhèn)江江蘇大學(xué)電氣信息工程學(xué)院,212013。Email:xqliu@ujs.edu.cn中國(guó)農(nóng)業(yè)工程學(xué)會(huì)會(huì)員:劉星橋(E041200581S)
基金項(xiàng)目:江蘇省農(nóng)業(yè)科技支撐項(xiàng)目(BE2013402);中國(guó)博士后科學(xué)基金資助項(xiàng)目(2014M560404);江蘇高校優(yōu)勢(shì)學(xué)科建設(shè)工程資助項(xiàng)目(PAPD,No.6-2011)
收稿日期:2015-09-06
修訂日期:2015-11-25
中圖分類號(hào):TP273;S951.2
文獻(xiàn)標(biāo)志碼:A
文章編號(hào):1002-6819(2016)-01-0084-07
doi:10.11975/j.issn.1002-6819.2016.01.011