基于嵌入式互联网的远程智能喷雾控制系统设计

2018-10-19 01:04吴亚垒祁力钧程浈浈刘婠婠谢德盛ElizabethMusiu
农业工程学报 2018年20期
关键词:信号线冠层数据包

吴亚垒,祁力钧,张 豪,程浈浈,刘婠婠,谢德盛,Elizabeth Musiu



基于嵌入式互联网的远程智能喷雾控制系统设计

吴亚垒1,祁力钧1※,张 豪1,程浈浈1,刘婠婠1,谢德盛2,Elizabeth Musiu1

(1. 中国农业大学工学院,北京 100083;2. 深圳市隆瑞科技有限公司,广州 518108)

为提高设施农业植保作业智能管控能力,该文提出一种基于STM32F101和STM32F103嵌入式技术,结合4G互联网、局域WIFI通信技术及超声波靶标检测算法,能够便捷地对设施作业装备远程视频与控制的方案,达到人机分离与精准施药的目的。该系统在Eclipse和Keil-uvision4开发环境下采用Socket和多线程技术实现双向通信,以TCP通讯协议为媒介,Android端和客户端通过互联网或无线网卡转接移动路由实现远程智能喷雾控制。试验结果表明:1)Android端能够在LAN或Internet中实现智能喷雾装备的近远程控制,软件界面回传状态无卡顿、延时发生,能够准确发射控制指令,实现了对靶标间歇性施药管控;2)系统建立的双向心跳包能够在通信故障情况下迫使喷雾装备处于休眠状态,经测试,心跳包设定时间与喷雾装备休眠响应时间平均相对误差不超过5.50%;3)采用视频帧对冠层中线定位,借助超声检测算法确定风送距离参数且建立冠层体积模型。试验发现,冠层密度对体积测量结果有显著影响,但总体测量准确度可达94.67%。该研究对其他农机装备的智能化管控研究有参考意义。

喷雾;控制;设计;STM32嵌入技术;无线网络通信技术;超声波检测算法

0 引 言

近年来,随着中国农业产业结构的不断优化调整,设施农业种植面积和产量稳步提升[1]。中国已成为世界上设施栽培面积最大的国家,预计2030年中国设施栽培面积可望增至1 70万hm2。在设施农业快速发展的同时,其施药设备和技术却滞于瓶颈期[2],防治过程中不仅农药利用率低,且易导致施药人员中毒等一系列问题[3]。随着机械化与智能化的发展,将远程控制[4]与农药喷施技术[5-6]相结合对确保人员安全、降低劳动强度、克服青壮劳动力短缺及其精确靶标施药等[7-8]具有重要的实际意义。

国内外学者已经在林木果园[9-11]、田间植株[12-13]、和设施园艺[14-16]上开展了远程控制和精确靶标施药研究。姜红花等[17]将植保机械与电子控制技术及物联网技术相结合,设计了高通过性履带自走式果园自动对靶风送喷雾机。徐波等[18]基于Android平台的平板电脑,对林木进行测试,能在Wi-Fi环境下实现喷雾启停控制、参数设置等功能。刘雪美等[19]针对大田植株行距、株距较大的作物对行施药的农艺要求,设计了喷杆喷雾精确对靶施药系统。Gázquez等[20-22]研究设计了设施园艺智能施药机器人系统,在预定轨道上行走,按设定喷药量进行喷雾作业,且自动控制施药时间,自动施药避免操作者与农药过度接触带来的危害[3]。祁力钧等[23]在袁雪等[24]基础上利用GPRS通信和控制技术初步实现了对设施群内弥雾机远程控制和操作。总的来说,针对远程控制与精准施药技术研究还相对较少,技术还不成熟,系统亟需完备[25]。

本文基于嵌入式开发和4G互联网技术,旨在设计“互联网+”设施智能远程控制系统,并对该系统在北京(中国农业大学植保实验室)和深圳(深圳市隆瑞科技有限公司)之间进行了通信测试与试验验证。该系统以超声波传感器为载体,采用检测算法确定风送距离参数和建立冠层体积方程,从而根据作物需求,在特定环境下确定喷施量与喷施距离,提高农药喷雾施用效率。

1 系统架构与工作原理

本文研制了一种基于可视化人机交互模式的远程遥控作业车,整车结构紧凑,可遥控实现其在矮化果园和设施温室等狭窄场所机动灵活作业,具有响应迅速,动作执行可靠的优点。该远程施药控制系统基于C/S架构,施药系统软件由Android端、4G互联网无线网络和喷雾装备客户端组成。该系统设计的创新思想是将华为4G全网通无线网卡与内嵌花生壳服务的蒲公英路由器耦合在一起,摆脱了固定宽带网络受地域限制弊端,同时达到内网穿透的目的。用户能够借助LAN或Internet实现智能喷雾装备的近远程控制,图1为远程施药控制系统原理图。

图1 远程施药控制系统原理图

远程施药控制系统客户端主要由行走平台和施药系统组成,如图2所示。

1.轨道 2.行走电机 3.避障传感器 4.左右摇摆机壳 5.摄像机 6.超声波模块 7.按键板与WI-FI模块 8.上下摇摆喷头

行走平台在轨道上由大功率无刷电机驱动,平台前后各装有红外传感器检测前后方有无障碍物并作出避障动作,此平台一机多用,可用于果蔬运输。施药系统包括检测装置与喷雾执行装置:检测装置主要包括摄像机与超声波模块,摄像机负责返回视频帧信息,当视频帧中检测装置运行至冠层中心线位置处,行走电机停止;每个超声波传感器进行扫描,借助超声波检测算法对测试冠层体积进行反演和风送距离参数确定,初步确定喷施量与喷施距离,继而实现对单位面积上沉积量改变。喷雾执行装置通过自适应风机风速调整,改变风机输送距离,同时通过齿轮的啮合运动实现上下摇摆,在风力的扰动下对枝叶进行翻转,实现作物的上下端和叶背、叶面雾滴均匀沉积。该喷雾装备主要技术参数如表1所示。

表1 喷雾装备的技术参数

2 Android端系统通信优化与界面监测设计

系统APP开发基于TCP/IP协议,采用Socket和多线程技术,在Eclipse集成开发环境下采用java语言设计完成,生成APK文件,运行平台为OPPO R11。

2.1 Android端远程系统通信和IP包优化

2.1.1 Android端远程通信优化

本文远程控制基本原理是“端口映射”+“动态域名”。端口映射使得外网对于路由器(蒲公英路由器X5型)上一个特定端口的访问会被路由器转到一个指定的客户端IP(本文IP为192.168.1.107),此时路由器起到“桥”功能,使外网和喷雾装备上面的WI-FI模块(物理地址为94:BA:56:00:C9:01)联通,鉴于路由器上的外网访问IP不断被更新,有且通过花生壳动态域名设置解析IP地址,本文动态访问域名为20220787by.iask.in,可实现局域网转外网功能,从而操作人员可以通过外网控制喷雾装备。

2.1.2 Android端系统IP数据包优化

通信协议中单字符通信方式干扰较大,本文Android端与喷雾装备端数据交换采用IP包形式[26]传送控制指令,包头和包尾均为0XFF,解包机制可以对数据包精确接收及终止。IP包的数据交换格式规定为:{包头,类型位,命令位,数据位,包尾},如:{FF,温湿度显示,温湿度接收,温湿度值,FF}和{FF,风速设定,风速发送,风速值,FF},IP数据包分别采用Input Stream类和Output Stream类从流中读取与输出数据包,同时实例化socket Writer对象,以Byte打包方式将数据包发送到路由器,路由器借助花生壳服务端口映射把数据包转发给客户端串口。发送至STM32单片机的数据包利用解包机制将该包解开,并控制模块执行相关操作,最后采用flush和close方法分别刷空输出流及关闭流以释放资源。

邱占芝等[27]对数据包接收情况进行了试验验证,当试验环境空旷情况下,数据包被喷雾装备接收端稳定接收,但是当环境复杂(障碍物遮挡等情况),数据包有可能被屏蔽或遮挡,无法被接收端接收。对此,在程序中定义应答和计时变量,如timer.schedule(new MyTask(), 1000, 150),当手机端未接收到应答情况下,每隔150 ms循环发射该控制命令,直到接收应答停止。

2.2 Android端系统视频帧监测

本文在搭载远程通信的基础上,通过视频帧对果树中心线进行简单定位,为后续果树冠层体积测量提供辅助算法。考虑到试验过程中算法工效及分割难度,本算法截取底部1/8图像。在eclipse开发环境中架构opencv链接库,首先对该图像进行Ostu法二值化,算出最优阈值T后可根据式(1)将图像分成树干和背景2个部分。其次根据式(2)、(3)求解树干左右两侧行像素累加平均值,然后对其平均值作比,如果比值为1,完成此次视频帧定位。

式中为二值化图像灰度数值,T为自适应最优阈值;=1为背景(白色),=0为树干(黑色)。

式中(,)为第行第列的像素值;left为第行树干左侧的像素值;right为第行树干右侧的像素值;left为第行树干左侧的宽度;right为第行树干右侧的宽度;为图像宽度;为图像高度;为树干左侧像素平均值与右侧像素平均值的比。

2.3 Android端系统界面设计

简洁易用是本文Android端系统界面设计理念。作业界面包括工作参数显示、指令输入和消息提示,分别用于显示和设置喷雾设备的喷雾参数及反馈状态信息;该系统界面可获取设施内实时数据并采用数据可视化技术[17],监测温湿度实时数据参量变化,若不满足喷雾环境温湿度则终止此次作业,同时视频插件嵌套到控制界面,多线程实时监测作物体积参数及喷雾装备在线工作状态等情况[28];同时考虑到Android端系统视频帧监测算法对于背景复杂的现场有局限性,为保证喷雾质量,通过代码在界面生成浅蓝色标记线,辅助视频帧进行中线定位。各个Activity直接用Intent函数进行转换,主要UI界面设计如图3所示。

图3 UI界面设计

Fig.3 UI interface design

3 嵌入式硬件开发与软件优化设计

3.1 嵌入式硬件开发

本文嵌入式硬件电路以STM32主芯片为核心,主要分为按键板(图4a)和控制板(图4b)电路,按键板与控制板采用RS-485通信协议接口,可实现多点通信且RS-485接口具有良好抗噪干扰性,长距离传输等优点[29]。按键板较控制板芯片多12个引脚,主要用于连接超声波传感器和温湿度引脚;该按键板主要发送和回传指令,通过矩阵键盘扫描,串口中断等完成对控制板信号发送,通过WIFI模块完成数据包指令的回传,包括温湿度、电压、风速及超声波检测算法等数值。控制板上面包括电源降压、电机驱动、避障限位、流量及风速设定等功能模块。电源降压模块分别给电机驱动部分和控制部分供电。传感器模块主要是避障和限位模块进行信号反馈,间接调控电机驱动模块启停。

1.USB转WIFI模块 2.测距1信号线 3.测距2信号线 4.测距3信号线 5.测距4信号线 6.通信信号线 7.STM32F103单片机 8.程序烧录串口 9.温湿度信号线 10.RS485信号线

1.USB to WIFI module 2.Ranging 1 signal line 3.Ranging 2 signal line 4.Ranging 3 signal line 5.Ranging 4 signal line 6.Communication signal line 7.STM32F103 MCU 8. Program burning serial port 9. Temperature and humidity signal line 10. RS485 signal line

a. 喷雾装备系统按键板PCB设计

a. Spray equipment system key board PCB design

1.电源线 2.RS485通讯线 3.STM32F101单片机 4.程序烧录串口 5.上下摇摆信号线 6.风机信号线 7.左右摇摆信号线 8.避障信号线 9.限位信号线 10.行走信号线 11.测距5信号线 12.水泵信号线 13.测距6信号线

1.Power cable 2.RS485 communication cable 3.STM32F101 MCU 4.Program burning serial port 5.Up and down swing signal line 6.Fan signal line 7.Left and right swing signal line 8.Obstacle avoidance signal line 9.Limit signal line 10.Travel signal line 11.Ranging 5 signal line 12.Pump signal line 13.Ranging 6 signal line

b. 喷雾装备系统控制板PCB设计

b. Spray equipment system control board PCB design

图4 喷雾装备系统硬件电路设计

Fig.4 Spray equipment system hardware circuit design

3.2 嵌入式软件优化设计

3.2.1 软件心跳包对故障的响应优化设计

软件系统故障发生较频繁,如手机APP异常关闭,网络连接故障,喷雾装备骤停等事故。为此,大部分采用TCP自身心跳包机制[30],如SO_KEEPALIVE函数,默认120 min心跳频率,仅用于保活,但无法判断喷雾装备的断电、故障、网线及逻辑层等断线事故,对于喷雾装备的作业安全存在隐患。其次,send或者receive也可判定掉线,但在长连接下,有可能长时间都没有数据往来,中间节点故障难以预测,仅用于维持长连接,保活。本文自行优化心跳包可以对故障及时处理,提升作业安全水平。心跳检测步骤如图5所示:1)Android和喷雾装备客户端每隔5 s发送一次无效的IP数据包给服务器,且发包时各启动一个超时定时器timeAPP-;2)两端接收到检测包,应该回复应答指令;3)如果双方均收到应答包,线路连接正常,超时定时器被reset;4)如果双方的超时定时器超时,没有响应应答,表明故障发生,双方作业终止,并实时在Android界面提示连接故障等反馈信息,通知施药人员处理。

图5 心跳包检测机制原理图

3.2.2 超声检测风送距离参数确定

本文依托超声波传感器测量喷头到冠层的送风距离,根据气流场携带雾滴能力特性的能力对软件部分进行设计。根据牛顿第二运动定律

式中F为喷头轴线方向受力,N;air为空气作用力,N;为雾滴质量,kg;a为雾滴加速度,m/s2。当a趋于0,气流不再有向前的驱动力,当气流速度趋于2 m/s[31],根据行业标准定义为气流的输送距离,此段位移定义为风送距离[32],便于调整设定对应的出风口风速参数。

3.2.3 超声检测冠层体积系统设计

人工测量方法采用Wheaton和Albrigo冠层体积测量法[33]。总结前人研究基础上,本文设计了“圆柱体积求和法”用于测量冠层体积。超声波传感器等间距安装在桅杆上,各传感器离地面的高度及传感器间距都可根据实际对象进行调节,所谓圆柱体积求和法是将果树冠层看成是个圆柱组成,其体积即为个圆柱体积之和(为超声波传感器数目),通过公式(5)可计算出果树冠层体积,其测量原理如图6所示。

注:Dn第n个超声波传感器探测到的传感器与果树冠层的距离,m;Dc为超声波传感器与果树中心线(作物行中心线)之间的距离,m;Ds为超声波传感器之间的间距,m。

式中V为果树冠层体积,m3。

传感器1和测量结果不一定是最低与最高冠层处的半径,即以下和以上冠层体积将可能会被漏算或多算,但对于冠层来说,漏算和多算的体积在本研究作中忽略处理。本文选取6个超声波传感器,等间距25 cm装配,此外在视频帧辅助作用下进行冠层模型中心线定位,得到检测距离,利用本文设计的“圆柱体积求和法”计算果树冠层体积,测量结束,初步得到施药量,后续在检测距离的基础上实时确定风速。

4 试验结果与分析

4.1 IP数据包与远程通信测试试验

为了验证IP数据包能够实现通信,将图4a中的程序烧录信号线JTMS,JTCK,GND与ULink2相连接,上电操作,在keil-vision4界面开启在线调试功能;开启喷雾装备,等待启动灯常亮,手机端点击按钮指令,在软件界面watch窗口中,可以实时查看变量,观察电脑端IP数据的接收状态,图7a中接收到的通信协议为喷头转动控制指令,图7b中接收到的通信协议为风机速度控制指令,结果表明,Android发送的控制指令能被喷雾装备准确接收。

为了验证Android和喷雾装备能够实现局域网和远程互联网通信,利用“Ping”命令可以检查网络是否连通,测试网络时延,可很好地判定网络故障。“Ping”是Windows下用户使用的发送ICMP回送请求的命令,在Unix和Linux下也有这个命令;ping也属于一个通信协议,其应用格式为:Ping空格IP地址。在中国农业大学植保机械实验室和深圳市隆瑞科技有限公司分别进行通信验证。在默认情况下,仅发送4个数据包,通过这个命令自定义发送个数,有助于衡量网络速度,如图7c和7d分别为局域网和远程互联网内Ping 指令结果。本文发送12个数据包,分别ping -n 12 192.168.1.107和ping -n 12 20220787by.iask.in,并未出现丢包问题且平均时间分别为5和79 ms,能实现双向通信。

图7 IP数据包与远程通信测试结果

4.2 心跳包故障检测试验

为验证心跳包机制的稳定性和可控性,采用PC396秒表对Android端和装备客户端整个通信系统进行响应时间试验测试。心跳包的发射频率不能过高,易造成数据阻塞,同时由表1知,喷雾装备行进速度过快时要求响应时间较短,防止因速度过快而造成的响应距离延长,其次不同时间段网络负载情况有差异。基于以上研究,规定不同的时断开始试验,设定不同的心跳包故障检测时间,在双向通信正常的情况下分别进行响应时间的测试。试验中异常关闭Android端软件,开始记录喷雾装备到结束运动的时间,系统响应时间试验结果如表2所示。

表2 系统响应时间试验结果

注:1,2,3,4分别为08:00,12:00,16:00,20:00时间段测试系统响应时间;为一天内4个时间段系统平均响应时间;相对误差=|平均响应时间-心跳包故障检测时间|/心跳包故障检测时间×100%。

Note:1,2,3and4are the system response time of 8 o'clock, 12 o'clock, 16 o'clock, and 20 o'clock, respectively;is the average system response time of 4 time periods in a day; relative error = | Average response time-Heartbeat packet failure detection time|/heartbeat packet failure detection time×100%.

试验测试后发现,系统的心跳包机制运行稳定,可保障喷雾装备与施药作业安全,系统的响应时间平均相对误差不超过5.50%,满足实际作业故障处理要求;在一天内的不同作业时断,网络延迟程度不一,主要是傍晚以后,系统响应时间增长,可能的原因是该时断下网络负载加大造成的;由表2又知,系统平均响应时间误差随心跳包发射时间延长变化不大,表明系统的响应速度较快。

4.3 冠层体积超声算法检测试验

在中国农业大学植保机械实验室4 m×3 m区域内试验测试,如图8所示。

图8 试验区示意图

建立直角坐标系,区域布置在第一象限,坐标点标记(一个单位长度为1 m),矮化果树坐标点(2,2.4),喷雾机在作业时由坐标点(0,0)作业至(4,0)结束。试验中,本文选取矮化仿真榕树冠层模型作为研究对象,榕树冠层模型枝干数目为5,可进行枝干拆解,按照枝干拆解个数0、1、2用于表征冠层模型的稠密程度,共分为浓密、较密和稀疏3类。将放置好的模型绕坐标点(2,2.4)处等角度旋转,每60°旋转1次,共旋转6次,分别按照该操作将3类模型先后进行试验测试。试验结果如图9所示,试验现场如图10所示。

图9 不同疏密冠层手动与检测算法自动测量对比

图10 远程喷雾控制系统图

为评估系统测量法和手动测量法对于冠层体积的检测效果,将不同靶标摆放角度处的系统测量值和手动实测值进行比较(图9),分析采样点冠层体积偏差程度和测量准确度[34],式(6)、(7)分别表述采样点中最大相对测量误差max和平均相对误差ave。

冠层体积超声算法检测试验表明:冠层的稠密程度对冠层检测系统的准确度影响较大,当冠层为浓密时,6种摆放角度下所测结果与手动测量结果平均误差不超过5.33%,最大相对误差仅为6.40%,且各测试结果没有明显的差异性;当冠层稠密程度为较密时,6种摆放角度下所测结果与手动测量结果平均误差不超过10.74%,且各测试结果有明显的波动,这与冠层不同摆放位置的孔隙度有关系;当冠层稠密程度为稀疏时,6种摆放角度下所测结果与手动测量结果最大相对误差达到50.57%,且各测试结果差异性显著,可能是冠层过于稀疏造成超声波信号丢失。可见冠层浓密程度明显影响系统测量准确度,还需要试验中不断积累经验。视频帧如果拍摄到稀疏情况,不宜用本系统进行冠层体积测量,反之树叶浓密适合用本系统进行冠层体积测量,测量准确度高达94.67%。

5 结 论

1)本文远程智能喷雾控制系统能够实现局域网和远程互联网通信,利用“Ping”命令检查网络对IP数据包的响应情况,并未出现丢包问题且平均响应时间分别为5和79 ms,能实现双向稳定通信。

2)经过试验,系统的心跳包机制运行稳定,可保障喷雾装备与施药作业安全,且响应时间平均相对误差不超过5.50%,满足实际作业故障处理要求;同时喷雾装备行进速度过快时要求响应时间较短,防止因速度过快而造成的响应距离延长;该装备系统不宜傍晚作业,系统的响应时间较长。

3)冠层稠密程度对冠层体积测量系统测量结果有显著影响。稀疏情况下冠层体积手动测量值与自动测量值间有显著差异;较密情况下次之;浓密情况下冠层体积手动测量值与自动测量值间无显著差异,适宜用本文冠层体积测量系统,最大相对误差仅为6.40%,且测量准确度高达94.67%;该方案便于改善喷施量与喷施距离,且冠层覆盖率和分布均一性将得到明显改善。

4)该远程控制与优化施药系统可实现人机分离与精准施药。通过试验可知,针对机身故障的检测及处理具有较高的可靠性,同时对于传统生产模式的改造及智能农机的推广具有潜在的应用价值。本文后续将进行冠层定心,实现精确对靶喷雾方面的研究。

[1] 冯海明. 果园和温室大棚多功能遥控作业车的研制与试验[D]. 泰安:山东农业大学,2016.

Feng Haiming. Research and Test of Multi Function Remote Control Operating Vehicle in Orchard and Greenhouse[D]. Taian: Shandong Agricultural University, 2016. (in Chinese with English abstract)

[2] 王潇楠,何雄奎,宋坚利,等. 助剂类型及浓度对不同喷头雾滴飘移的影响[J]. 农业工程学报,2015,31(22):49-55.

Wang Xiaonan, He Xiongkui, Song Jianli, et al. Effect of adjuvant types and concentration on spray drift potential of different nozzles[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2015, 31(22): 49-55. (in Chinese with English abstract)

[3] Wang Changling, He Xiongkui,WangXiaonan, et al.Testing method and distribution characteristics of spatial pesticide spraying deposition quality balance for unmanned aerial vehicle[J]. Int J Agric & Biol Eng, 2018, 11(2): 18-26.

[4] 吴亚垒,祁力钧,张亚,等. 温室弥雾机控制系统的设计[J].中国农业大学学报,2018,23(2):79-87.

Wu Yalei, Qi Lijun, Zhang Ya, et al. Research and development of the mist sprayer control system in greenhouse[J]. Journal of China Agriculture University, 2018, 23(2): 79-87. (in Chinese with English abstract)

[5] Sánchez-Hermosilla J, Rincón V J, Páez F, et al. Comparative spray deposits by manually pulled trolley sprayer and a spray gun in greenhouse tomato crops[J]. Crop Protection, 2012, 31(1): 119-124.

[6] 傅泽田,祁力钧,王秀. 农药喷施技术的优化[M]. 北京:中国农业科学技术出版社,2002.

[7] 王昌陵,宋坚利,何雄奎,等. 植保无人机飞行参数对施药雾滴沉积分布特性的影响[J]. 农业工程学报,2017,33(23):109-116.

Wang Changling, Song Jianli, He Xiongkui, et al. Effect of flight parameters on distribution characteristics of pesticide spraying droplets deposition of plant-protection unmanned aerial vehicle[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2017, 33(23): 109-116. (in Chinese with English abstract)

[8] 周良富,薛新宇,周立新,等. 果园变量喷雾技术研究现状与前景分析[J]. 农业工程学报,2017,33(23):80-92.

Zhou Liangfu, Xue Xinyu, Zhou Lixin, et al. Research situation and progress analysis on orchard variable rate spraying technology[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2017, 33(23): 80-92. (in Chinese with English abstract)

[9] Rajkishan A, Stavros G, Francisco J, et al. Estimation of fruit locations in orchard tree canopies using radio signal ranging and trilateration[J]. Computers and Electronics in Agriculture, 2016, 125(5): 160-172.

[10] 尹东富,陈树人,毛罕平,等. 基于模糊控制的棉田变量对靶喷药除草系统设计[J]. 农业机械学报,2011,42(4):179-183. Yin Dongfu, Chen Shuren, Mao Hanping, et al. Weed control system for variable target spraying based on fuzzy control[J]. Transactions of the Chinese Society for Agricultural Machinery, 2011, 42(4): 179-183. (in Chinese with English abstract)

[11] Marco B, Giovanni C, Renato V, et al. Evaluation of a Li DAR based 3D-stereoscopic vision system for crop-monitoring applications[J]. Computers and Electronics in Agriculture, 2016, 124(3): 1-13.

[12] Cross J V, Walklate P J, Murray R A, et al. Spray deposits and losses in different sized apple trees from an axial fan orchard sprayer:3.Effects of air volumetric flow rate[J]. Crop Protection, 2003, 22(2): 381-394.

[13] Llop J, Gil E, Gallart M, et al. Spray distribution evaluation of different settings of a hand-held-trolley sprayer used in greenhouse tomato crops[J]. Pest Management Science, 2016, 72(3): 505-516.

[14] 曹峥勇,张俊雄,耿长兴,等. 温室对靶喷雾机器人控制系统[J]. 农业工程学报,2010,26(增刊2):228-233.

Cao Zhengyong, Zhang Junxiong, Geng Changxing, et al. Control system of target spraying robot in greenhouse[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2010, 26(Supp.2): 228-233. (in Chinese with English abstract)

[15] 耿长兴,张俊雄,曹峥勇,等. 温室黄瓜病害对靶施药机器人设计[J]. 农业机械学报,2011,42(1):177-180.

Geng Changxing, Zhang Junxiong, Cao Zhenyong, et al. Cucumber disease toward target agrochemical application robot in greenhouse[J]. Transactions of the Chinese Society for Agricultural Machinery, 2011, 42(1): 177-180. (in Chinese with English abstract)

[16] 石建业,任生兰,马彦霞,等. 智能遥控拉移动式温室专用喷雾机的研制[J]. 农业科技与装备,2014(7):26-27.

Shi Jianye, Ren Shenglan, Ma Yanxia, et al. Design of intelligent remote control mobile spray machine for greenhouse[J]. Agricultural Scienc & Technology and Equipment, 2014(7): 26-27. (in Chinese with English abstract)

[17] 姜红花,白鹏,刘理民,等. 履带自走式果园自动对靶风送喷雾机研究[J].农业机械学报,2016,47(增刊1):189-195.

Jiang Honghua, Bai Peng, Liu Limin, et al. Caterpillar self-propelled and air-assisted orchard sprayer with automatic target spray system[J]. Transactions of the Chinese Society for Agricultural Machinery, 2016, 47(Supp.1): 189-195. (in Chinese with English abstract)

[18] 徐波,李秋洁,束义平,等. 计[J]. 农机化研究,2018,40(11):51-57.

Xu Bo, Li Qiujie, Shu Yiping, et al. Design of accurate target spray system remote controlled through WiFi[J]. Journal of Agricultural Mechanization Research, 2018, 40(11): 51-57. (in Chinese with English abstract)

[19] 刘雪美,李扬,李明,等. 喷杆喷雾机精确对靶施药系统设计与试验[J]. 农业机械学报,2016,47(3):37-44.

Liu Xuemei, Li Yang, Li Ming, et al. Design and test of Smart-targeting spraying system on boom sprayer[J]. Transactions of the Chinese Society for Agricultural Machinery, 2016, 47(3): 37-44. (in Chinese with English abstract)

[20] Gázquez J A, Novas N, Manzano-Agugliaro F. Intelligent low cost telecontrol system for agricultural vehicles in harmful environments[J]. Journal of Cleaner Production, 2016, 113(8): 204-215.

[21] Rowe D E, Malone S, Yate Q L. Automated greenhouse spray system for increased safety and flexibility[J]. Crop Science, 2000, 40(4): 1176-1179.

[22] 李良,张文爱,冯青春,等. 温室轨道施药机器人系统设计[J]. 农机化研究,2016(1):109-112.

Li Liang, Zhang Wenai, Feng Qingchun, et al. System design for rail spraying robot in greenhouse[J]. Journal of Agricultural Mechanization Research, 2016(1): 109-112. (in Chinese with English abstract)

[23] 祁力钧,杜政伟,冀荣华,等. 基于GPRS的远程控制温室自动施药系统设计[J]. 农业工程学报,2016,32(23):51-57.

Qi Lijun, Du Zhengwei, Ji Ronghua, et al. Design of remote control system for automatic sprayer based on GPRS in greenhouse[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2016, 32(23): 51-57. (in Chinese with English abstract)

[24] 袁雪,祁力钧,王虎,等. 温室摇摆式变量弥雾机喷雾参数响应面法优化[J]. 农业机械学报,2012,43(4):45-50.

Yuan Xue, Qi Lijun, Wang Hu, et al. Spraying parameters optimization of swing, automatic variables and greenhouse mistsprayer with response surface method[J]. Transactions of the Chinese Society of Agricultural Machinery, 2012, 43(4): 45-50. (in Chinese with English abstract)

[25] 李道亮,杨昊. 农业物联网技术研究进展与发展趋势分析[J]. 农业机械学报,2018,49(1):1-20.

Li Daoliang,Yang Hao. State-of-the-art review for Internet of things in agriculture[J]. Transactions of the Chinese Society for Agricultural Machinery, 2018, 49(1): 1-20. (in Chinese with English abstract )

[26] 史梦安,王志勃. 基于Android系统的TCP/IP客户端异步通信模块研究[J]. 软件导刊,2014,13(10):115-118.

Shi Mengan, Wang Zhibo. The study of TCP/IP asynchronous communication client-side module based on android[J]. Software Guide, 2014, 13(10): 115-118. (in Chinese with English abstract)

[27] 邱占芝,张庆灵,刘明. 有时延和数据包丢失的网络控制系统控制器设计[J]. 控制与决策,2006,21(6):625-630.

Qiu Zhanzhi, Zhang Qingling, Liu Ming. Controller design for networked control systems with time-delay and data packet dropout[J]. Control and Decision, 2006, 21(6): 625-630. (in Chinese with English abstract )

[28] 张猛,房俊龙,韩雨. 基于 ZigBee 和 Internet 的温室群环境远程监控系统设计[J]. 农业工程学报,2013,29(增刊1):171-176.

Zhang Meng, Fang Junlong, Han Yu. Design on remote monitoring and control system for greenhouse group based on ZigBee and internet[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2013, 29(Supp.1): 171-176. (in Chinese with English abstract)

[29] 王风云,朱建华,赵一民,等. 设施农业环境监控网络扩展[J]. 农业工程学报,2005,21(11):168-170.

Wang Fengyun, Zhu Jianhua, Zhao Yimin, et al. Bus network topology for environmental control of protect ed agriculture[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2005, 21(11): 168-170. (in Chinese with English abstract)

[30] 胡志坤,何多昌,桂卫华,等. 基于改进心跳包机制的整流远程监控系统[J]. 计算机应用,2008,28(2):363-366.

Hu Zhikun, He Duochang, Gui Weihua, et al. Remote monitoring system of rectifier based on improved heart beat mechanism[J]. Computer Application, 2008, 28(2): 363-366. (in Chinese with English abstract )

[31] 李慧,祁力钧,王沛. 悬挂式常温烟雾机气流场与雾滴沉积三维模拟与试验[J]. 农业机械学报,2014,45(4):103-109.

Li Hui, Qi Lijun, Wang Pei.3-D simulation for airflow field and droplets deposition of hanging cold sprayerr[J]. Transactions of the Chinese Society for Agricultural Machinery, 2014, 45(4): 103-109. (in Chinese with English abstract)

[32] 秦维彩. 单旋翼植保无人机喷雾参数优化研究[D]. 镇江:江苏大学,2017.

Qin Weicai. Research on Spraying Parameters Optimization-rotor Plant Protection UAV[D]. Zhenjiang: Jiangsu University, 2017. (in Chinese with English abstract)

[33] 胡开群. 基于冠层体积测量的变量系统施药系统设计与研究[D]. 北京:中国农业大学,2011.

Hu Kaiqun. Design and Research of Variable-rate Spraying System Based on Canopy Volume Measurement[D]. Beijing: China Agriculture University, 2011. (in Chinese with English abstract)

[34] 李明,赵春江,李道亮,等. 日光温室黄瓜叶片湿润传感器校准方法[J]. 农业工程学报,2010,26(2):224-230.

Li Ming, Zhao Chunjiang, Li Daoliang, et al. Calibration method of leaf wetness sensor for cucumber in solar greenhouse[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2010, 26(2): 224-230. (in Chinese with English abstract)

Design and experiment of remote intelligent spray control system based on embedded internet

Wu Yalei1, Qi Lijun1※, Zhang Hao1, Cheng Zhenzhen1, Liu Wanwan1, Xie Desheng2, Elizabeth Musiu1

(1.100083,; 2.518108,)

In view of the current weak status of intelligent management and control systems for facility of agriculture and dwarfed orchards, high labor intensity and complicated spraying environment, this article proposed an embedded technology, which took STM32F101 and STM32F103 as the core and basis, combined with 4G Internet and ultrasonic target detection algorithm, and was able to remotely control agricultural machinery to achieve the purpose of human-machine separation and precise application of pesticides. The system used Socket and multi-thread technology to implement two-way communication under the Eclipse and Keil-uvision4 development environment. With TCP communication protocol as the medium, the Android and client transferred remote routing through the Internet or wireless network card to achieve remote intelligent spray control. The test results show that: 1) Android can implement near-remote control of smart spray equipment in the LAN or Internet. The software interface returns that no stagnant state or delay occurs and it can accurately transmit control commands and achieve intermittent application of the target. 2) The bidirectional heartbeat package established by the system can force the spray equipment to be dormant in the event of communication failure. After testing, the error rate of the heartbeat packet set-up time and the spray equipment dormancy response time does not exceed 5.50%. 3) Use the video frame to locate the canopy middle line, and use the ultrasonic detection algorithm to determine the wind-distance parameters and establish the canopy volume model. Through experiments, it is found that the degree of canopy denseness has a significant impact on the measured results of the canopy volume measurement system. The text measurement system should be used in dense canopy conditions, and the measurement accuracy is as high as 94.67%. 4) The remote smart spray control system in this article can realize local network and long-distance internet communication. Use “Ping” command to check the network response to IP data packets. There is no packet loss problem and the average response time is 5 and 79 ms, respectively. 5) The degree of canopy density has a significant effect on the measurement of the canopy volume measurement system. There is a significant difference between the manual and automatic measurements of the canopy volume in sparse conditions. On the contrary, there is no significant difference between the manual and automatic measurements of the canopy volume in the dense conditions, which is suitable for measuring the canopy volume in this article. In the system, the maximum relative error is only 6.4%, and the canopy coverage and distribution uniformity will be significantly improved. 6) A remote control and optimized application system available for complete Internet-based spray equipment is designed. The system can realize human-machine separation and precise application of pesticides. Through tests, it can be seen that the detection and processing of the fuselage faults has high reliability. At the same time, it has potential application value for the transformation of traditional production modes and the promotion of smart agricultural machinery. The study can also provide reference for the automation and intellectualization of other agricultural machinery equipment.

spraying; control; design; STM32 embedded technology; wireless network communication technology; ultrasonic detection algorithm

10.11975/j.issn.1002-6819.2018.20.004

TP212.9; S491

A

1002-6819(2018)-20-0028-08

2018-05-01

2018-08-01

科技部国家重点研发计划项目“现代果园智能化精细生产管理技术装备研发”(2017YFD0701400);科技部国家重点研发计划项目“地面与航空高工效施药技术及智能化装备)2016YFD0200700)”。

吴亚垒,博士生,研究方向为主要从事植保机械研究。Email:kevin_wuyalei@cau.edu.cn

祁力钧,博士,教授,研究方向为从事植保机械研究。Email:qilijun@cau.edu.cn

吴亚垒,祁力钧,张 豪,程浈浈,刘婠婠,谢德盛,Elizabeth Musiu. 基于嵌入式互联网的远程智能喷雾控制系统设计[J]. 农业工程学报,2018,34(20):28-35. doi:10.11975/j.issn.1002-6819.2018.20.004 http://www.tcsae.org

Wu Yalei, Qi Lijun, Zhang Hao, Cheng Zhenzhen, Liu Wanwan, Xie Desheng, Elizabeth Musiu. Design and experiment of remote intelligent spray control system based on embedded internet[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2018, 34(20): 28-35. (in Chinese with English abstract) doi:10.11975/j.issn.1002-6819.2018.20.004 http://www.tcsae.org

猜你喜欢
信号线冠层数据包
密度与行距配置对向日葵冠层结构及光合特性的影响
基于低空遥感的果树冠层信息提取方法研究
二维隐蔽时间信道构建的研究*
迈腾B8L 轿车灯光系统应急模式控制策略及开关监测信号线作用研究
基于激光雷达的树形靶标冠层叶面积探测模型研究
三类矩形微屏蔽线主模截止波长特性的矢量有限元计算
民用飞机飞行模拟机数据包试飞任务优化结合方法研究
冬小麦冠层-大气氨交换的季节性特征及其影响因素
C#串口高效可靠的接收方案设计
聊聊蓄电池的那点事儿小小信号线也能让蓄电池亏电