欢迎您访问《智慧农业(中英文)》官方网站! English

Smart Agriculture ›› 2019, Vol. 1 ›› Issue (3): 67-76.doi: 10.12133/j.smartag.2019.1.3.201905-SA004

• 信息处理与决策 • 上一篇    下一篇

基于长短时记忆网络(LSTM)的蟹塘溶解氧估算优化方法

朱南阳1, 吴昊2, 尹达恒1, 王志强1, 蒋永年3, 郭亚1,*()   

  1. 1. “轻工过程先进控制”教育部重点实验室,江南大学物联网工程学院,江苏无锡 214122
    2. 江苏省互联网农业发展中心,江苏南京 210017
    3. 江苏中农物联网科技有限公司,江苏宜兴 214200
  • 收稿日期:2019-05-22 修回日期:2019-07-15 出版日期:2019-07-30
  • 基金项目:
    国家自然科学基金面上项目(31771680)
  • 作者简介:朱南阳(1994-),男,硕士,研究方向:水产大数据分析,Email: zhunanyang08@163.com。
  • 通信作者: 郭 亚(1977-), 男, 博士, 教授, 研究方向:传感器与仪器,系统建模与控制,农业物联网与大数据分析, 电话:0510-85910652, Email: guoy@jiangnan.edu.cn

An improved method for estimating dissolved oxygen in crab ponds based on Long Short-Term Memory

Zhu Nanyang1, Wu Hao2, Yin Daheng1, Wang Zhiqiang1, Jiang Yongnian3, Guo Ya1,*()   

  1. 1. Key Laboratory of Advanced Process Control for Light Industry (Ministry of Education), School of Internet of Things Engineering, Jiangnan University, Wuxi 214122, China
    2. Jiangsu Internet Agricultural Development Center, Nanjing 210017, China
    3. Jiangsu Zhongnong Internet of Things Technology Co., Ltd., Yixing 214200, China
  • Received:2019-05-22 Revised:2019-07-15 Online:2019-07-30
  • Foundation items:National Natural Science Foundation of China(31771680)
  • About author:Zhu Nanyang,Email: zhunanyang08@163.com
  • Corresponding author:Guo Ya, Email: guoy@jiangnan.edu.cn

摘要:

水中溶解氧含量低会影响螃蟹的成活率,保证低溶解氧时刻溶解氧的预测精度非常重要。目前,溶解氧传感器价格昂贵且易遭受腐蚀,因此通过相关变量来间接估计溶解氧浓度有重要的意义。本研究在长短时记忆网络(LSTM)模型的基础上,优化LSTM反向传播时的损失函数,提出了提高低溶解氧含量估算精度的溶解氧预测模型(LDO-LSTM)。LDO-LSTM的损失函数是在平均绝对百分比误差(MAPE)基础上,根据溶解氧值的变化趋势和溶解氧浓度大小,分别赋予不同权值的权重函数,并通过均方根误差(RMSE)和平均绝对百分比误差(MAPE)来评估LDO-LSTM和LSTM在不同范围的溶解氧估算能力。对模型的测试试验结果表明:在溶解氧高于6mg/L时,LDO-LSTM和LSTM的RMSE、MAPE差值稳定在0.1左右;在溶解氧低于6mg/L时,LDO-LSTM的RMSE值和MAPE值分别比LSTM低0.25和0.139,说明了LDO-LSTM网络不但可以保证整体溶氧预测精度,而且能够提高较低溶解氧值的估算精度。本研究对于降低水产养殖成本、提高溶解氧估算精度有着重要的作用。

关键词: 溶解氧, 长短时记忆网络, 损失函数, 平均绝对百分比误差

Abstract:

Dissolved oxygen (DO) is vital to aquaculture industry and affects the yield of aquaculture. Low DO in water can lead to death of crabs, therefore, it is important to measure DO accurately. However, the DO sensors are usually expensive and often lost function due to corrosion in water environmental and adsorption of different materials on their surface, which result in the inaccuracy in measured DO values. It is thus important to develop effective methods to estimate DO concentrations by using other environmental variables, which may reduce farmers' cost because DO sensors are not used. In this research, the collected environmental data, including temperature, pH, ammonia nitrogen, turbidity, were used to estimate DO concentrations in crab ponds. The data were preprocessed to eliminate missing values and outlier. Correlation analysis was applied to determine the relationship between environmental variables (temperature, pH, ammonia nitrogen, turbidity) and DO to show the rationale of using these four variables to forecast DO concentration. Principal component analysis was used to reduce the dimension of environmental data to reduce computation cost. For DO concentration estimation, it is more important to make the estimation of DO concentration at low values more accurate because DO concentration at low values is dangerous to crabs. This implies that estimation of DO concentrations at low or high values should be treated differently and applied different rates. Based on the Long Short-Term Memory (LSTM), a low DO concentration estimation model of Low Dissolved Oxygen Long Short-Term Memory(LDO-LSTM), which can improve the estimation accuracy of low DO values was proposed by optimizing the loss function of LSTM back propagation. The loss function of LDO-LSTM was based on the Mean Absolute Percentage Error (MAPE). According to the trend of DO, the true DO and the estimated DO values were applied weight functions. The Root Mean Square Error (RMSE) and the MAPE were used to evaluate the performance of LDO-LSTM and LSTM in DO estimation. Experimental results show that the value of RMSE and MAPE were stable at about 0.1 for LSTM and LDO-LSTM in forecasting DO when dissolved oxygen was higher than 6mg/L and the value of RMSE and MAPE of LDO-LSTM were lower than LSTM by 0.25 and 0.139. The results prove that the proposed method can not only provide desirable estimation accuracy for DO concentrations at high values but also make the estimated DO concentrations at low values more accurate. This research is expected very useful in reducing aquaculture costs and improving accuracy in forecasting DO especially at low values.

Key words: dissolved oxygen, long short-term memory, loss function, mean absolute percentage error

中图分类号: