APP下载

基于物联网的联合智能控制系统设计

2018-09-12江渝川何国斌

现代电子技术 2018年18期
关键词:物联网

江渝川 何国斌

摘 要: 過去的基于单片机的大棚温度控制系统,通过单片机控制温度模块、继电器模块实现对大棚内温度的检测,由于其未采用温度控制设备,造成温度控制的振荡频率大、响应速率慢的弊端。设计基于物联网的大棚温度联合智能控制系统。其基于物联网感知层、应用层和网络层的基础框架,采用分布式模块化设计方式设计系统总体架构,总体结构包括温度采集模块、网络传输模块以及远程控制模块,三个模块协同运行实现温度信号的采集、变换、存储以及监控。通过联合智能模糊PID控制器在远程控制模块中联合处理大棚内的温度信息,联合智能模糊PID控制器对系统静态误差进行实时调整减弱静态误差和振荡频率,再采用模糊PID算法调整回路输出结果,控制系统稳定性和响应速率。系统软件部分采用C5409A XDS510 Emulator仿真器对大棚室内温度控制的程序进行编写、接口控制以及编译连接等操作,共同对程序的编译进行加载,实现大棚内温度的自主控制。实验结果表明,所设系统可显著提升降低温度控制时的振荡频率和响应用时。

关键词: 物联网; 联合智能控制; 大棚温度控制; 模糊PID控制器; 振荡频率降低; 响应用时缩短

中图分类号: TN915?34; TP277 文献标识码: A 文章编号: 1004?373X(2018)18?0084?04

Design of joint intelligent control system based on IoT

JIANG Yuchuan1, HE Guobin2

(1. School of Computer Engineering, Chongqing College of Humanities, Science & Technology, Chongqing 401524, China;

2. School of Computer and Information Science, Southwest University, Chongqing 400715, China)

Abstract: Since the past greenhouse temperature control system based on the single chip microcomputer (SCM) realizes the indoor temperature detection of greenhouse by using the SCM to control the temperature module and relay module, large oscillation frequency and slow response rate of temperature control are caused due to lack of temperature control equipment. Therefore, a greenhouse temperature joint intelligent control system based on Internet of Things (IoT) is designed. On the basis of the IoT foundation framework of the perception layer, application layer and network layer, the overall architecture of the system is designed by adopting the distributed modularized design pattern. The overall structure is composed of the temperature acquisition module, network transmission module and remote control module. The three modules operate coordinately to realize acquisition, transformation, storage and monitoring of temperature signals. The joint intelligent fuzzy PID controller is used to jointly process indoor temperature information of greenhouse in the remote control module, so that the static error of the system is adjusted in real time to reduce the static error and oscillation frequency. The fuzzy PID algorithm is used to adjust the output result of the loop, and control the stability and response rate of the system. For the software part of the system, the C5409A XDS510 Emulator is adopted to perform operations such as program compiling, interface control, and compilation connection for indoor temperature control of greenhouse, so as to cooperatively upload the program compilation, and realize autonomous control of greenhouse temperature. The experimental results show that the designed system can significantly improve the oscillation frequency when the controlled temperature is decreased and shorten the system′s response time.

Keywords: IoT; joint intelligence control; greenhouse temperature control; fuzzy PID controller; oscillation frequency reduction; response time shortening

物联网技术是近些年发展的高新技术,被广泛用于各种行业,一些专家学者在物联网发展的基础上已经对温度的控制取得了一些研究成果[1],但对大棚温度的控制效果不明显,本文在此基础上对大棚温度的控制采取进一步研究。传统基于单片机的大棚温度控制系统,通过单片机控制温度模块、继电器模块实现对大棚内温度的检测,由于其未采用温度控制设备,造成温度控制的振荡频率大、响应速率慢的弊端。面对该问题,本文设计基于物联网的大棚温度联合智能控制系统,以提高大棚温度控制效果。

1 基于物联网的大棚温度联合智能控制系统

物联网为由感知层、应用层和网络层共同构成的基础性结构框架,不同层次间的功能互不影响,同时数据可以进行互通,属于工作效率较高的底层结构[2],其架构如图1所示。

本文系统包括温度采集模块、网络传输模块以及远程控制模块三部分[3],三个功能模块分别与物联网中的数据感知层、网络层和应用层相对应[4]。温度采集模块中的无线网络采集器将温度传感器获取的温度信息由原始的模拟信号转变为数字信号,再将其传输到网络传输模块后采用GPRS网关对温度信息进行保护,远程控制模块以GPRS网关为连接实现用户直接对大棚内温度的控制。

传输过程中接口为RS 485,可提高数据传输的效率和稳定性[5]。远程控制模块以GPRS网关为连接实现用户直接对大棚内温度的直接控制,该模块可以实现用户对历史数据的查询、温度报警数值设置以及对物联网应用层提供温度信息的处理,实现远程控制。

1.2 联合智能模糊PID控制器设计

本文系统设计联合智能模糊PID控制器在远程控制模块中处理大棚内的温度信息。模糊PID控制器在温度处理过程中极易出现静态误差,设计的联合智能模糊PID控制器在模糊PID控制器的功能基础上,对静态误差进行实时调整,具有减弱静态误差和降低振荡频率的优势,对大棚内温度的稳定起到一定的控制效果。图3为本文联合智能模糊PID温度控制原理图。

由图3可知,联合模糊智能PID控制器能够对回路输出结果进行调整[6],提高系统的稳定性和响应速率。联合智能模糊PID控制器的输出公式为:

[u(t)=KPe(t)+1TI0te(t)dt+TDde(t)dt] (1)

式中:[u(t)]表示控制器回路的输出结果;[TI]和[TD]分别为积分系数和微分系数[7];[KP]为比例系数。则经过离散化的输出结果可表示为:

[u(n)=KPe(n)+TTIi=0ne(i)+TDTe(n)-e(n-1)+ u0=uP(n)+uI(n)+uD(n)+u0] (2)

式中:[uP(n)=KPe(n)]和[uI(n)=KPTTIi=0ne(i)]分别为比例项和积分项。

1.3 软件实现

本文基于物联网的大棚温度联合智能控制系统软件的设计基于Visual DSP平台[8],该平台可实现系统的硬件编程和软件仿真。系统软件部分采用C5409A XDS510 Emulator 仿真器实现对大棚室内温度控制的程序编写、接口控制以及编译连接等操作,对中断程序[INT0]和[INT3]的执行依靠C5409A Device Simulator仿真环境。将中断向量的地址[INTM]设为0,[IMR]的中断相应设为1,即可实现对[INTM]和[IMR]的初始化[9]。基于设置的200个物联网节点、AODV构建的物联网通信协议以及RTP/AVP协议配置是大棚温度智能控制系统信息输入[10],对程序的编译实施加载,加载过程如下:

Hurrycase Set up???>

[*]The joint to build for /et

Fogyki/nucroughgkes

[*]vi?stevere to bulid for implementation comsgles

[*]Optionscards major control module

[*]U coupling internet

[*]Fancy all kinds of body first

libraryfreeSs???>

上述过程完成对大棚内温度的软件自动控制,系统软件的实现流程如图4所示。

2 实验分析

为验证本文系统的有效性,对本文基于物联网的大棚温度联合智能控制系统进行测试,实验采用Simulink线性状态的空间系统模型构建出一个动态的集成环境,借此对本文系统的有效性进行分析,该动态集成环境如图5所示。

将大棚温度的仿真模型输入到Matlab软件中,采用本文系统对大棚的温度进行联合智能温度控制,获取的温度控制方案用控制矩阵表示。实验仿真的大棚温度模型为2阶,温度信号以阶跃信号的形式被导入至仿真模型中,模型输出结果为3个支路,3个支路对应输出的内容分别为联合模糊智能PID控制器的超调量、温度控制响应时间以及温度控制数据。

图6为采用本文系统控制的大棚温度效果曲线,表1为温度控制效果的对比结果。由于本文系统处理大棚内温度时同时采用了模糊PID控制器以及联合智能模糊PID控制器,因此实验需将模糊PID控制器从中分离出来,便于观察本文系统设计的联合智能模糊控制器的性能,控制度计算公式为:

[U=Ts0T00+Ts1T01×0.5] (3)

式中:[Ts0]和[Ts1]表示应用本文系统后大棚内终端的温度值;[T00]和[T01]为理想的温度值。对比分析两个温度控制终端[T00],[T01]和[Ts0],[Ts1]。

分析图6和表1可知,本文基于物联网的大棚温度联合智能控制系统可以在较短的时间内对大棚内的温度进行准确的理想控制,且在温度控制过程中出现的超调量和振荡次数较少,结果的可信度较高。从温度控制用时分析得出,本文系统的联合智能模糊PID控制器温度控制用时为0.542 s,而模糊PID控制器的温控响应用时为4.376 s,超出本文系统的温控响应用时的8倍。因此可以说明本文系统的温度控制效果较强。

上述实验分析的大棚环境条件较粗糙,真实的温室大棚环境情况非常复杂,实验将高阶数的大棚温度数据导入模型中,获取如图7~图9所示的联合智能模糊PID控制的[KP],[KI]和[KD]的暂态特性曲线。

分析图7~图9可以看出,采用本文系统进行的大棚温度的智能控制,温度控制的响应能力显著。针对阶数高的温度数据也可以进行稳定控制且没有出现严重的振荡现象,说明本文系统的实用性较强。

3 结 论

本文设计的基于物联网的大棚温度联合智能控制系统,可显著提升大棚温度的控制效果,提升温度控制的响应能力,增强系统的实用性。

参考文献

[1] 秦琳琳,陆林箭,石春,等.基于物联网的温室智能监控系统设计[J].农业机械学报,2015,46(3):261?267.

QIN Linlin, LU Linjian, SHI Chun, et al. Implementation of IoT?based greenhouse intelligent monitoring system [J]. Transactions of the Chinese Society for Agricultural Machinery, 2015, 46(3): 261?267.

[2] BIN L, PEI C Q, TIAN J S, et al. Design and implementation of the intelligent streak camera control system based on Internet of Things [J]. Acta Photonica Sinica, 2017, 46(5): 52?57.

[3] 辛海亮,钟佩思,朱绍琦,等.基于ZigBee的物联网智能家居控制系统[J].电子技术应用,2013,39(12):79?81.

XIN Hailiang, ZHONG Peisi, ZHU Shaoqi, et al. Research of smart home furnishing control system by Internet of Things based on ZigBee [J]. Application of electronic technique, 2013, 39(12): 79?81.

[4] 苗凤娟,高玉峰,陶佰睿,等.基于物联网与太阳能光伏的智能温室监控系统设计[J].科技通报,2016,32(9):89?92.

MIAO Fengjuan, GAO Yufeng, TAO Bairui, et al. Design of modern agricultural greenhouse monitoring system based on the Internet of Things and the solar photovoltaic [J]. Bulletin of science and technology, 2016, 32(9): 89?92.

[5] 李和平,陈育新.基于物联网的矿井智能巡检机器人控制系统设计[J].机床与液压,2015,43(11):119?122.

LI Heping, CHEN Yuxin. Design of control system of intelligent mine patrol robot based on Internet of Things [J]. Machine tool & hydraulics, 2015, 43(11): 119?122.

[6] 刘屹,石博强,谭章禄.基于物联网的煤炭智能装车系统设计[J].煤炭技术,2015,34(7):226?228.

LIU Yi, SHI Boqiang, TAN Zhanglu. Design of intelligent coal loading system based on Internet of Things [J]. Coal technology, 2015, 34(7): 226?228.

[7] LI Z, WANG J, HIGGS R, et al. Design of an intelligent management system for agricultural greenhouses based on the Internet of Things [C]// Proceedings of IEEE International Conference on Computational Science and Engineering. Guangzhou: IEEE, 2017: 154?160.

[8] CHEN L. Design and implementation of remote control intelligent home system based on Internet of Things [J]. Journal of Shandong Agricultural University (Natural science edition), 2016, 38(1): 265?270.

[9] 郑丽娜.基于物联网的电源智能监控系统设计[J].电源技术,2017,41(3):493?494.

ZHENG Lina. Intelligent monitoring system of power based on Internet of Things [J]. Chinese journal of power sources, 2017, 41(3): 493?494.

[10] 孙媛.差异物联网设备下的数据分发模型仿真分析[J].计算机仿真,2016,33(3):243?246.

SUN Yuan. Simulation and analysis of data distribution model under difference Internet of Things equipment [J]. Computer simulation, 2016, 33(3): 243?246.

猜你喜欢

物联网
基于物联网的无线测温模块设计
基于物联网ZigBee技术的智能家居监控系统 
基于高职院校物联网技术应用人才培养的思考分析
如何在高校架设学生洗衣服务系统
基于无线组网的智慧公交站点信息系统研究与实践
基于LABVIEW的温室管理系统的研究与设计
论智能油田的发展趋势及必要性
中国或成“物联网”领军者