计算机应用   2017, Vol. 37 Issue (4): 1202-1206  DOI: 10.11772/j.issn.1001-9081.2017.04.1202 0

### 引用本文

LI Ning, LI Gang, DENG Zhongliang. Application of improved grey wolf optimizer algorithm in soil moisture monitoring and forecasting system[J]. Journal of Computer Applications, 2017, 37(4): 1202-1206. DOI: 10.11772/j.issn.1001-9081.2017.04.1202.

### 文章历史

Application of improved grey wolf optimizer algorithm in soil moisture monitoring and forecasting system
LI Ning, LI Gang, DENG Zhongliang
School of Electronic Engineering, Beijing University of Posts and Telecommunications, Beijing 100876, China
Abstract: Focusing on the issues of high cost, high susceptibility to damage and low prediction accuracy of soil moisture monitoring and forecasting system, the soil moisture monitoring based on non-fixed wireless sensor network and improved grey wolf algorithm optimization neural network was designed and implemented. In the proposed soil moisture monitoring system, non-fixed and plug-in sensor bluetooth network was used to collect moisture data, and high-precision multi-source location access fusion method was used for wide-area outdoor high-precision positioning. In terms of algorithms, focusing on the issue that Grey Wolf Optimizer (GWO) algorithm easily falls into local optima in its later iterations, an improved GWO algorithm based on rearward explorer mechanism was proposed. Firstly, according to the fitness value of the population, the explorer type was added to the original individual types of the algorithm. Secondly, the search period of population was divided into three parts: active exploration period, cycle exploration period and population regression period. Finally, the unique location updating strategy was used for the explorer during the different period, which made the algorithm more random in the early stage and keep updating in the middle and late stages, thus strengthening the local optimal avoidance ability of the algorithm. The algorithm was tested on the standard functions and applied to optimize the neural network prediction model of soil moisture system. Based on the datasets obtained from the experimental plot No. 2 in a city, the experimental results show that the relative error decreases by about 4 percentage points compared with the direct neural network prediction model, and decreases by about 1 to 2 percentage points compared with the traditional GWO algorithm and Particle Swarm Optimization (PSO). The proposed algorithm has smaller error, better local optimal avoidance ability, and improves the prediction quality of soil moisture.
Key words: soil moisture forecasting system    Grey Wolf Optimizer (GWO) algorithm    neural network    high precision multi-source positioning    sensor network
0 引言

1 土壤墒情监测预测系统

 图 1 土壤墒情监测预测系统 Figure 1 Soil moisture monitoring and forecasting system
1.1 数据采集子系统与信息传输子系统

1.2 定位子系统

 图 2 定位子系统 Figure 2 Positioning subsystem
1.3 数据综合处理子系统

2 土壤墒情预测模型 2.1 问题描述

W=(w1, w2, …, wm) 为气象要素变量, X={x1, x2, …, xt}为墒情时间序列变量, 预测模型为G, 预测模型输出值为Y′, 真实墒情值为Y, 则:

 ${{Y}^{'}}=G(\mathit{\boldsymbol{W}}, X)$ (1)

 $R=\sum\limits_{i=1}^{N}{{{(Y-{{Y}^{'}})}^{2}}}$ (2)

 $\min (R)=\min (\sum\limits_{i=1}^{N}{{{({{Y}^{'}}-Y)}^{2}}})$ (3)
2.2 改进灰狼算法优化贝叶斯神经网络 2.2.1 灰狼算法的解空间搜索策略

 $\mathit{\boldsymbol{D}}=|\mathit{\boldsymbol{C}}\cdot {{x}_{p}}-{{x}_{i}}|$ (4)

 $\mathit{\boldsymbol{C}}=2{{r}_{1}}$ (5)

 图 3 个体位置更新 Figure 3 Individual location update
 $\left\{ \begin{array}{*{35}{l}} {{\mathit{\boldsymbol{D}}}_{\alpha }}=|{{\mathit{\boldsymbol{C}}}_{1}}\cdot {{x}_{\alpha }}(t)-{{x}_{\omega }}(t)| \\ {{\mathit{\boldsymbol{D}}}_{\beta }}=|{{\mathit{\boldsymbol{C}}}_{1}}\cdot {{x}_{\alpha }}(t)-{{x}_{\omega }}(t)| \\ {{\mathit{\boldsymbol{D}}}_{\delta }}=|{{\mathit{\boldsymbol{C}}}_{1}}\cdot {{x}_{\alpha }}(t)-{{x}_{\omega }}(t)| \\ {{X}_{1}}={{X}_{\alpha }}-\left| {{A}_{1}} \right|\cdot {{\mathit{\boldsymbol{D}}}_{\alpha }} \\ {{X}_{2}}={{X}_{\beta }}-\left| {{A}_{2}} \right|\cdot {{\mathit{\boldsymbol{D}}}_{\beta }} \\ {{X}_{3}}={{X}_{\delta }}-\left| {{A}_{3}} \right|\cdot {{\mathit{\boldsymbol{D}}}_{\delta }} \\ {{x}_{\omega }}(t+1)={{X}_{1}}+{{X}_{2}}+{{X}_{3}}/3 \\ \end{array} \right.$ (6)

 $\mathit{\boldsymbol{A}}=2a{{r}_{2}}-a$ (7)

2.2.2 改进灰狼算法

 ${{x}_{\varepsilon }}=random(\mathit{\boldsymbol{K}})$ (8)

2.2.3 贝叶斯正则化算法

 $MSE=\frac{1}{n}\sum\limits_{i=1}^{n}{{{({{t}_{i}}-{{p}_{i}})}^{2}}}$ (9)

 $MS{{E}^{'}}=\alpha \cdot msw+\beta \cdot MSE;msw=\frac{1}{m}\sum\limits_{i=1}^{m}{{{w}_{j}}^{2}}$ (10)

3 实验数据与结果分析 3.1 使用标准函数进行改进灰狼算法性能分析

 图 4 使用函数进行三种算法对比实验 Figure 4 Experimental results of three algorithms by test functions

3.2 使用改进灰狼算法优化墒情预测模型 3.2.1 实验数据

3.2.2 不同算法策略模型的墒情预测对比试验

 $MSE=\frac{1}{n\cdot {{y}_{i}}}\sum\limits_{i=1}^{n}{\left| {{y}_{i}}-y_{i}^{'} \right|}$ (11)

3.2.3 结果对比分析

 图 5 三种算法算法优化神经网络误差对比 Figure 5 Error comparison of three algorithms in optimizing neural network

3.2.4 改进灰狼算法优化墒情预测模型的实际应用

4 结语

 [1] SHIN Y, JUNG Y. Development of irrigation water management model for reducing drought severity using remotely sensed soil moisture footprints[J]. Journal of Irrigation & Drainage Engineering, 2014, 140 (7) : 43-48. [2] CHAROENHIRUNYINGYOS S, HONDA K, KAMTHONKIAT D, et al. Soil moisture estimation from inverse modeling using multiple criteria functions[J]. Computers & Electronics in Agriculture, 2011, 75 (2) : 278-287. [3] LENKA S K, MOHAPATRA A G. Gradient descent with momentum based neural network pattern classification for the prediction of soil moisture content in precision agriculture[C]//Proceedings of the 2005 IEEE International Symposium on Nanoelectronic and Information Systems. Piscataway, NJ: IEEE, 2015:63-66. [4] 金龙, 罗莹. 农田土壤湿度的人工神经网络预报模型研究[J]. 土壤学报, 1998, 35 (1) : 25-32. ( JIN L, LUO Y. Forecast model of farmland soil moisture by artificial neural network[J]. Acta Pedologica Sinica, 1998, 35 (1) : 25-32. ) [5] 尚松浩, 毛晓敏, 雷志栋. 冬小麦田间墒情预报的BP神经网络模型[J]. 水利学报, 2002 (4) : 60-63. ( SHANG S H, MAO X M, LEI Z D. Prediction model of field soil moisture in winter wheat based on BP neural network[J]. Journal of Hydraulic Engineering, 2002 (4) : 60-63. ) [6] LAMORSKI K, PASTUSZKA T, KRZYSZCZAK J, et al. Soil water dynamic modeling using the physical and support vector machine methods[J]. Vadose Zone Journal, 2013, 12 (4) : 1742-1751. [7] HASSAN-ESFAHANI L, TORRES-RUA A, MCKEE M. Assessment of optimal irrigation water allocation for pressurized irrigation system using water balance approach, learning machines, and remotely sensed data[J]. Agricultural Water Management, 2015, 153 : 42-50. doi: 10.1016/j.agwat.2015.02.005 [8] 尚松浩, 雷志栋, 杨诗秀. 冬小麦田间墒情预报的经验模型[J]. 农业工程学报, 2000, 16 (5) : 31-33. ( SHANG S H, LEI Z D, YANG S X. Empirical model for soil moisture forecast in winter wheat field[J]. Transactions of the Chinese Society of Agricultural Engineering, 2000, 16 (5) : 31-33. ) [9] HUANG G, ZHOU H, DING X, et al. Extreme learning machine for regression and multiclass classification[J]. IEEE Transactions on Systems, Man, and Cybernetics, Part B, 2012, 42 (2) : 513-529. doi: 10.1109/TSMCB.2011.2168604 [10] MIRJALILI S, MIRJALILI S M, LEWIS A. Grey wolf optimizer[J]. Advances in Engineering Software, 2014, 69 (3) : 46-61. [11] SENEVIRATNE S I, CORTI T, DAVIN E L, et al. Investigating soil moisture-climate interactions in a changing climate: a review[J]. Earth-Science Reviews, 2010, 99 (3/4) : 125-161. [12] BERGH F V D, ENGELBRECHT A P. A study of particle swarm optimization particle trajectories[J]. Information Sciences, 2006, 176 (8) : 937-971. doi: 10.1016/j.ins.2005.02.003