[go: up one dir, main page]

CN110414115B - Wavelet neural network tomato yield prediction method based on genetic algorithm - Google Patents

Wavelet neural network tomato yield prediction method based on genetic algorithm Download PDF

Info

Publication number
CN110414115B
CN110414115B CN201910663789.1A CN201910663789A CN110414115B CN 110414115 B CN110414115 B CN 110414115B CN 201910663789 A CN201910663789 A CN 201910663789A CN 110414115 B CN110414115 B CN 110414115B
Authority
CN
China
Prior art keywords
model
output
value
input
neural network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201910663789.1A
Other languages
Chinese (zh)
Other versions
CN110414115A (en
Inventor
王永刚
尹义志
刘宇航
张大鹏
刘潭
姜迎春
张楠楠
邓寒冰
苗腾
袁青云
栗庆吉
陈春玲
李征明
纪建伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenyang Agricultural University
Original Assignee
Shenyang Agricultural University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenyang Agricultural University filed Critical Shenyang Agricultural University
Priority to CN201910663789.1A priority Critical patent/CN110414115B/en
Publication of CN110414115A publication Critical patent/CN110414115A/en
Application granted granted Critical
Publication of CN110414115B publication Critical patent/CN110414115B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/12Computing arrangements based on biological models using genetic models
    • G06N3/126Evolutionary algorithms, e.g. genetic algorithms or genetic programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/02Agriculture; Fishing; Forestry; Mining

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Business, Economics & Management (AREA)
  • Biophysics (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Strategic Management (AREA)
  • Human Resources & Organizations (AREA)
  • Artificial Intelligence (AREA)
  • Economics (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • General Business, Economics & Management (AREA)
  • Tourism & Hospitality (AREA)
  • Marketing (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Operations Research (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Game Theory and Decision Science (AREA)
  • Genetics & Genomics (AREA)
  • Quality & Reliability (AREA)
  • Physiology (AREA)
  • Development Economics (AREA)
  • Agronomy & Crop Science (AREA)
  • Animal Husbandry (AREA)
  • Marine Sciences & Fisheries (AREA)
  • Mining & Mineral Resources (AREA)
  • Primary Health Care (AREA)

Abstract

本发明公开了一种基于遗传算法的小波神经网络番茄产量预测方法,属于农业信息技术领域。该方法先选取一定量的参数作为输入变量,通过对这些参数进行的分类、处理和筛选并对应用遗传算法对其进行优化训练,得到适宜的数据种群。然后确定网络输入层、隐藏层和输出层的节点数,应用小波基函数取代BP神经网络隐藏层节点的激励函数,并且引入平移因子和尺度因子不断对权值进行调整,经过多次训练和迭代,使模型预测的误差不断降低,令其输出结果不断接近实测值,将误差控制在合理的范围内,提升了模型的预测精度和函数收敛性能,为预测温室内作物产量提供较为可靠理论支持。

Figure 201910663789

The invention discloses a genetic algorithm-based wavelet neural network tomato yield prediction method, which belongs to the field of agricultural information technology. This method first selects a certain amount of parameters as input variables, and obtains a suitable data population by classifying, processing and screening these parameters and applying genetic algorithm to optimize them. Then determine the number of nodes in the input layer, hidden layer and output layer of the network, apply the wavelet basis function to replace the activation function of the hidden layer nodes of the BP neural network, and introduce translation factors and scale factors to continuously adjust the weights, after many training and iterations , so that the error of the model prediction is continuously reduced, the output result is constantly close to the measured value, the error is controlled within a reasonable range, the prediction accuracy and function convergence performance of the model are improved, and a more reliable theoretical support is provided for predicting the crop yield in the greenhouse.

Figure 201910663789

Description

一种基于遗传算法的小波神经网络番茄产量预测方法A Method of Tomato Yield Prediction Based on Wavelet Neural Network Based on Genetic Algorithm

技术领域technical field

本发明属于农业信息技术领域,特别涉及一种基于遗传算法的小波神经网络番茄产量预测方法。The invention belongs to the technical field of agricultural information, in particular to a method for predicting tomato yield based on a genetic algorithm based on a wavelet neural network.

背景技术Background technique

番茄是中国北方地区设施栽培的主要蔬菜之一,北方地区日光温室内的番茄种植多采用高效轮作的栽培模式,温室的环境因子、土壤的营养含量与番茄的生理特性直接决定了番茄的产量。预测温室内的番茄产量,能够为确定适宜的种植计划,合理安排施肥量、灌溉量,及时采取除虫、除草等措施,定期采取通风、增温、补光等措施,为番茄的健康生长创造良好环境,并为温室番茄的优质高产奠定基础。前人对于番茄产量预测的研究十分广泛,但大多集中于应用作物机理模型或作物生长发育模型对温室内的番茄产量进行预测,涉及的参数相对较少,计算方法具有一定的局限性。应用遗传算法与小波神经网络结合的方式进行温室番茄产量的预测,能够依据历年的历史数据,并且通过不断修正模型中的各种参数变量完善和优化模型,提升模型预测精度,使其更加适用于北方日光温室的实际环境,具有较为广阔的应用前景。Tomatoes are one of the main vegetables cultivated in protected areas in northern China. Tomatoes in solar greenhouses in northern areas mostly adopt high-efficiency crop rotation cultivation patterns. The environmental factors of the greenhouse, the nutrient content of the soil, and the physiological characteristics of tomatoes directly determine the yield of tomatoes. Predicting the tomato yield in the greenhouse can determine the appropriate planting plan, reasonably arrange the amount of fertilization and irrigation, take measures such as insecticide and weeding in time, and regularly take measures such as ventilation, temperature increase, and supplementary light to create healthy growth for tomatoes. Good environment, and lay the foundation for high-quality and high-yield greenhouse tomatoes. Previous studies on tomato yield prediction are very extensive, but most of them focus on applying crop mechanism models or crop growth and development models to predict tomato yield in greenhouses, involving relatively few parameters, and calculation methods have certain limitations. The combination of genetic algorithm and wavelet neural network is used to predict the yield of greenhouse tomatoes, which can be based on historical data over the years, and through continuous correction of various parameter variables in the model to improve and optimize the model, improve the prediction accuracy of the model, and make it more suitable for The actual environment of the solar greenhouse in the north has a broad application prospect.

发明内容Contents of the invention

本发明提供一种基于遗传算法的小波神经网络番茄产量预测方法,可以预测北方节能日光温室内的番茄产量,能够为确定适宜的种植计划。The invention provides a genetic algorithm-based wavelet neural network tomato yield prediction method, which can predict the tomato yield in the northern energy-saving solar greenhouse and can determine a suitable planting plan.

一种基于遗传算法的小波神经网络番茄产量预测模型,其特征在于,本模型的输入变量包括以下特征参数:环境温度;环境湿度;灌溉量;氮肥投入量;磷肥投入量;钾肥投入量;CO2浓度;光照强度;A wavelet neural network tomato yield forecasting model based on genetic algorithm, it is characterized in that, the input variable of this model comprises following feature parameter: ambient temperature; Environmental humidity; Irrigation amount; Nitrogen fertilizer input amount; Phosphate fertilizer input amount; 2 concentration; light intensity;

该模型由以下步骤建立:The model is built by the following steps:

随机生成一个初始种群Xm×nRandomly generate an initial population X m×n :

n=s1×s2+s2×s3+s2+s3 (1)n=s 1 ×s 2 +s 2 ×s 3 +s 2 +s 3 (1)

其中:m为初始种群数量,n为个体长度,个体长度既代表每个个体的基因值数量,也代表一个神经网络的初始权值数量;s1为输入层节点数;s2为隐含层节点数;s3为输出层节点数;Among them: m is the initial population size, n is the individual length, and the individual length not only represents the number of gene values of each individual, but also represents the initial weight value of a neural network; s 1 is the number of nodes in the input layer; s 2 is the hidden layer The number of nodes; s 3 is the number of nodes in the output layer;

遗传算法通过计算初始种群中每个个体的输出误差值Ei,适应度值fi,并根据个体适应度值的值进行评估,选择初始种群中适应度值在预设范围A内的个体进入子种群继续进行优化训练:The genetic algorithm calculates the output error value E i and the fitness value f i of each individual in the initial population, and evaluates it according to the value of the individual fitness value, and selects the individuals whose fitness value is within the preset range A in the initial population to enter The subpopulation continues with optimization training:

Figure BSA0000186325300000021
Figure BSA0000186325300000021

Figure BSA0000186325300000022
Figure BSA0000186325300000022

在子种群中,第i个个体进行交叉或变异操作的概率为pi,根据交叉率pc和变异率pm自适应函数来判断该个体是否需要进行交叉或遗传操作:In the subpopulation, the probability that the i-th individual performs crossover or mutation operation is p i , according to the adaptive function of crossover rate p c and mutation rate p m , it is judged whether the individual needs crossover or genetic operation:

Figure BSA0000186325300000023
Figure BSA0000186325300000023

Figure BSA0000186325300000024
Figure BSA0000186325300000024

Figure BSA0000186325300000025
Figure BSA0000186325300000025

式中:kc、km均为小于1的实数,fc为要交叉的个体适应度值,fm为要变异的个体适应度值,fmax

Figure BSA0000186325300000026
分别为种群中最大适应度值和平均适应度值,
Figure BSA0000186325300000027
为种群的收敛程度;In the formula: k c and k m are real numbers less than 1, f c is the individual fitness value to be crossed, f m is the individual fitness value to be mutated, f max ,
Figure BSA0000186325300000026
are the maximum fitness value and the average fitness value in the population, respectively,
Figure BSA0000186325300000027
is the degree of convergence of the population;

剔除输入变量中偏差超过其年平均值±10%的数据,应用遗传算法对数据优化,数据动态范围≤±5%视为处理效果较好,将经过筛选与优化处理后的数据作为小波神经网络的输入数据并进行后续运算;Eliminate the data whose deviation exceeds ±10% of the annual average value in the input variables, apply genetic algorithm to optimize the data, and the data dynamic range ≤ ±5% is considered to have a good processing effect, and the filtered and optimized data is used as a wavelet neural network input data and perform subsequent calculations;

将经过上述处理后的特征参数作为小波神经网络模型的输入,温室番茄产量作为输出,其中,包括如下步骤:The characteristic parameters after the above processing are used as the input of the wavelet neural network model, and the greenhouse tomato output is used as the output, which includes the following steps:

该模型选用的母小波函数为:The mother wavelet function selected for this model is:

g(x)=cos(1.75x)exp(-x2/2) (7)g(x)=cos(1.75x)exp(-x 2 /2) (7)

将母小波函数进行尺度和平移变换构造小波基函数:Scale and translation transform the mother wavelet function to construct the wavelet basis function:

Figure BSA0000186325300000031
Figure BSA0000186325300000031

其中,aj、bj分别为第j个隐含层节点的尺度因子和平移因子;Among them, a j and b j are the scale factor and translation factor of the jth hidden layer node respectively;

yk为模型的输出:y k is the output of the model:

Figure BSA0000186325300000032
Figure BSA0000186325300000032

其中,xi(i=1,2,...,I)为输入层第i个节点的输入,yk(j=1,2,...,k)为输出层第j个节点的输出;Among them, x i (i=1, 2, ..., I) is the input of the i-th node of the input layer, y k (j = 1, 2, ..., k) is the input of the j-th node of the output layer output;

定义误差函数E为:Define the error function E as:

Figure BSA0000186325300000033
Figure BSA0000186325300000033

其中,yk为输出层第k个节点的实际输出,tk为输出层第k个节点的目标输出;Among them, y k is the actual output of the kth node of the output layer, and t k is the target output of the kth node of the output layer;

对权值、尺度因子、平移因子的调整包括:Adjustments to weights, scale factors, and translation factors include:

Figure BSA0000186325300000034
Figure BSA0000186325300000034

Figure BSA0000186325300000035
Figure BSA0000186325300000035

Figure BSA0000186325300000036
Figure BSA0000186325300000036

Figure BSA0000186325300000037
Figure BSA0000186325300000037

其中,学习速率:η(η>0),动量因子:μ(0<μ<1)。Among them, learning rate: η (η>0), momentum factor: μ (0<μ<1).

更优地,误差值以百分数表示,则适应度值处于0~1范围内,A=fi>0.667。More preferably, the error value is represented by a percentage, then the fitness value is in the range of 0-1, and A=f i >0.667.

本发明提供一种基于遗传算法的小波神经网络番茄产量预测方法,通过对数据进行的分类、处理和筛选并应用遗传算法对其进行优化训练,得到适宜的数据种群。然后确定网络输入层、隐藏层和输出层的节点数,应用小波基函数取代BP神经网络隐藏层节点的激励函数,并且引入平移因子和尺度因子不断对权值进行调整,经过多次训练和迭代,使模型预测的误差不断降低,令其输出结果不断接近实测值,可以将误差控制在合理的范围内。The invention provides a genetic algorithm-based wavelet neural network tomato yield prediction method, through classifying, processing and screening data and applying the genetic algorithm to optimize training to obtain suitable data populations. Then determine the number of nodes in the input layer, hidden layer and output layer of the network, apply the wavelet basis function to replace the activation function of the hidden layer nodes of the BP neural network, and introduce translation factors and scale factors to continuously adjust the weights. After multiple trainings and iterations , so that the error of the model prediction is continuously reduced, and the output result is continuously close to the measured value, and the error can be controlled within a reasonable range.

附图说明Description of drawings

图1为本发明提供的一种基于遗传算法的小波神经网络番茄产量预测方法的小波神经网络结构图;Fig. 1 is the wavelet neural network structural diagram of a kind of wavelet neural network tomato yield prediction method based on genetic algorithm provided by the present invention;

图2为GA-WNN模型预测效果图;Figure 2 is the prediction effect diagram of the GA-WNN model;

图3为GA-WNN模型误差百分比曲线;Figure 3 is the error percentage curve of the GA-WNN model;

图4为WNN模型预测效果图;Figure 4 is a WNN model prediction effect diagram;

图5为WNN模型误差百分比曲线;Fig. 5 is the WNN model error percentage curve;

图6为BP神经网络模型预测效果;Fig. 6 is the prediction result of BP neural network model;

图7为BP神经网络模型误差百分比曲线;Fig. 7 is BP neural network model error percentage curve;

图8为本发明提供的一种基于遗传算法的小波神经网络番茄产量预测方法的流程图。Fig. 8 is a flow chart of a method for predicting tomato yield based on genetic algorithm based on wavelet neural network provided by the present invention.

具体实施方式Detailed ways

下面结合附图,对本发明的一个具体实施方式进行详细描述,但应当理解本发明的保护范围并不受具体实施方式的限制。A specific embodiment of the present invention will be described in detail below in conjunction with the accompanying drawings, but it should be understood that the protection scope of the present invention is not limited by the specific embodiment.

番茄产量预测模型的建立过程:首先对数据进行的分类、处理和筛选并对应用遗传算法对其进行优化训练,得到适宜的数据种群。然后确定网络输入层、隐藏层和输出层的节点数,应用小波基函数取代BP神经网络隐藏层节点的激励函数,并且引入平移因子和尺度因子不断对权值进行调整,经过多次训练和迭代,使模型预测的误差不断降低,令其输出结果不断接近实测值,将误差控制在合理的范围内,其具体流程如图8所示。The establishment process of the tomato yield prediction model: firstly, classify, process and screen the data, and then apply the genetic algorithm to optimize the training to obtain a suitable data population. Then determine the number of nodes in the input layer, hidden layer and output layer of the network, apply the wavelet basis function to replace the activation function of the hidden layer nodes of the BP neural network, and introduce translation factors and scale factors to continuously adjust the weights. After multiple trainings and iterations , so that the error of the model prediction is continuously reduced, the output result is continuously close to the measured value, and the error is controlled within a reasonable range. The specific process is shown in Figure 8.

GA-WNN算法具体执行步骤:The specific execution steps of the GA-WNN algorithm:

本模型选取以下参数作为输入变量:①环境温度;②环境湿度;③灌溉量;④氮肥投入量;⑤磷肥投入量;⑥钾肥投入量;⑦CO2浓度;⑧光照强度,将番茄产量数据作为该模型的输出变量。首先,将遗传算法作为WNN算法的前置手段,对原始数据进行优化处理,得到动态范围较小(数据的动态范围≤±5%)的数据,将经过筛选与优化后的数据作为后续WNN算法的初始值。然后,应用小波函数对传统的BP神经网络进行改进,将小波函数的多分辨分析的特性与神经网络的自适应能力相结合,构造小波神经网络模型,并对其不断修正与完善,这样便极大地提升了模型的预测精度和函数收敛性能,为预测温室内作物产量提供较为可靠理论支持。This model selects the following parameters as input variables: ①Environmental temperature; ②Environmental humidity; ③Irrigation amount; ④Nitrogen fertilizer input; ⑤Phosphate fertilizer input; output variable. First, the genetic algorithm is used as the pre-means of the WNN algorithm to optimize the original data to obtain data with a small dynamic range (data dynamic range ≤ ±5%), and use the filtered and optimized data as the subsequent WNN algorithm initial value of . Then, the wavelet function is used to improve the traditional BP neural network, and the characteristics of multi-resolution analysis of the wavelet function are combined with the adaptive ability of the neural network to construct the wavelet neural network model, and it is constantly revised and perfected. Dadi has improved the prediction accuracy and function convergence performance of the model, providing more reliable theoretical support for predicting crop yields in greenhouses.

具体操作过程如下:The specific operation process is as follows:

(1)应用遗传算法对所选用的8种参数进行筛选与优化处理。首先,随机生成一个初始种群Xm×n对原始数据进行优化处理,其中m为初始种群数量(因为选取了8种变量,所以取m=8),个体长度n既代表每个个体的基因值数量,也代表一个神经网络的初始权值数量(隐藏层节点数会随着网络训练不断变化,权值数量也随之改变,最初设置8个输入层节点,5个隐藏层节点,1个输出层节点,初始权值数量为46),并且个体中的基因值与神经网络的初始权值一一对应。本研究采用实数编码方式对基因值进行编码,可避免解码过程,提高了训练效率。(1) The genetic algorithm is used to screen and optimize the selected 8 parameters. First, randomly generate an initial population X m×n to optimize the original data, where m is the initial population size (because 8 variables are selected, so m=8), and the individual length n represents the gene value of each individual The number also represents the initial weight value of a neural network (the number of hidden layer nodes will change with the network training, and the number of weight values will also change accordingly. Initially, 8 input layer nodes, 5 hidden layer nodes, and 1 output layer are set. Layer nodes, the number of initial weights is 46), and the gene values in the individual correspond to the initial weights of the neural network one by one. In this study, the gene value is encoded by the real number encoding method, which can avoid the decoding process and improve the training efficiency.

n=s1×s2+s2×s3+s2+s3 (1)n=s 1 ×s 2 +s 2 ×s 3 +s 2 +s 3 (1)

式中:n为个体长度;s1为输入层节点数;s2为隐含层节点数;s3为输出层节点数。In the formula: n is the individual length; s 1 is the number of input layer nodes; s 2 is the number of hidden layer nodes; s 3 is the number of output layer nodes.

遗传算法通过计算初始种群中每个个体的输出误差值Ei,适应度值fi,并根据个体适应度值的值进行评估,选择初始种群中适应度值较大(误差值以百分数表示,则适应度值处于0~1范围内,将fi>0.667的值视为适应度较好的数值)的个体进入子种群继续进行优化训练。The genetic algorithm calculates the output error value E i and fitness value f i of each individual in the initial population, and evaluates it according to the value of the individual fitness value, and selects the larger fitness value in the initial population (the error value is expressed as a percentage, Then the fitness value is in the range of 0 to 1, and the value of f i >0.667 is regarded as a value with better fitness) individuals enter the subpopulation to continue optimization training.

Figure BSA0000186325300000061
Figure BSA0000186325300000061

Figure BSA0000186325300000062
Figure BSA0000186325300000062

在子种群中,第i个个体被选中将进行交叉或变异操作的概率为pi,并根据交叉率pc和变异率pm自适应函数来判断该个体是否需要进行交叉或遗传操作,pc与pm的取值会根据个体适应值fi的值而改变自适应度,以此保持种群始终具有多样性。In the subpopulation, the probability that the ith individual is selected for crossover or mutation operation is p i , and according to the adaptive function of crossover rate p c and mutation rate p m to judge whether the individual needs crossover or genetic operation, p The values of c and p m will change the degree of adaptation according to the value of the individual fitness value fi , so as to keep the population always diverse.

Figure BSA0000186325300000063
Figure BSA0000186325300000063

Figure BSA0000186325300000064
Figure BSA0000186325300000064

Figure BSA0000186325300000065
Figure BSA0000186325300000065

式中:kc、km均为小于1的实数,fc为要交叉的个体适应度值,fm为要变异的个体适应度值,fmax

Figure BSA0000186325300000066
分别为种群中最大适应度值和平均适应度值,
Figure BSA0000186325300000067
为种群的收敛程度。依据以上遗传算法,对原始数据进行筛选与优化处理,剔除偏差较大(某种变量超过其年平均值±10%均视为偏差较大的值,并以此上下限约束其值,将其规定为边界值进行后续计算),应用遗传算法对数据优化,能够使数据的动态范围减小,数据动态范围≤±5%视为处理效果较好,将经过筛选与优化处理后的数据作为小波神经网络的输入数据并进行后续运算。In the formula: k c and k m are real numbers less than 1, f c is the individual fitness value to be crossed, f m is the individual fitness value to be mutated, f max ,
Figure BSA0000186325300000066
are the maximum fitness value and the average fitness value in the population, respectively,
Figure BSA0000186325300000067
is the convergence degree of the population. According to the genetic algorithm above, the original data is screened and optimized, and the large deviation is eliminated (a variable that exceeds its annual average value by ±10% is regarded as a value with a large deviation, and its value is constrained by this upper and lower limit, and its It is specified as the boundary value for subsequent calculation), and the genetic algorithm is used to optimize the data, which can reduce the dynamic range of the data, and the data dynamic range ≤ ± 5% is regarded as a good processing effect, and the data after screening and optimization are used as wavelet Input data to the neural network and perform subsequent operations.

(2)将经过上步处理与优化后的8种特征参数作为小波神经网络(WNN)模型的输入,温室番茄产量作为输出,网络的结构对于模型的预测精度、稳定性至关重要。构建模型时首先要考虑模型的结构,使其能够满足试验要求,保证模型稳定性与可靠性,然后应用误差函数分析存在的问题,继续优化模型,提升预测精度。(2) The 8 characteristic parameters processed and optimized in the previous step are used as the input of the wavelet neural network (WNN) model, and the greenhouse tomato output is used as the output. The structure of the network is very important for the prediction accuracy and stability of the model. When building a model, the structure of the model must first be considered so that it can meet the test requirements and ensure the stability and reliability of the model. Then, the error function is used to analyze the existing problems, and the model is continuously optimized to improve the prediction accuracy.

该模型选用的母小波函数为:The mother wavelet function selected for this model is:

g(x)=cos(1.75x)exp(-x2/2) (7)g(x)=cos(1.75x)exp(-x 2 /2) (7)

将母小波函数进行尺度和平移变换构造小波基函数:Scale and translation transform the mother wavelet function to construct the wavelet basis function:

Figure BSA0000186325300000071
Figure BSA0000186325300000071

其中,aj、bj分别为第j个隐含层节点的尺度因子和平移因子。yk为模型的输出:Among them, a j and b j are the scale factor and translation factor of the jth hidden layer node respectively. y k is the output of the model:

Figure BSA0000186325300000072
Figure BSA0000186325300000072

xi(i=1,2,...,I)-输入层第i个节点的输入,yk(j=1,2,...,k)-输出层第j个节点的输出。x i (i=1, 2, . . . , I)—the input of the i-th node in the input layer, y k (j=1, 2, . . . , k)—the output of the j-th node in the output layer.

通过对此模型中的权值、尺度因子、平移因子不断进行调整,提升模型的稳定性和预测精度,令此模型更加适用于实际的现场环境,并且不断完善和优化该模型。定义误差函数E为:By continuously adjusting the weights, scale factors, and translation factors in this model, the stability and prediction accuracy of the model are improved, making this model more suitable for the actual on-site environment, and the model is continuously improved and optimized. Define the error function E as:

Figure BSA0000186325300000073
Figure BSA0000186325300000073

其中,yk为输出层第k个节点的实际输出,tk为输出层第k个节点的目标输出。对权值、尺度因子、平移因子的调整包括:Among them, y k is the actual output of the kth node in the output layer, and t k is the target output of the kth node in the output layer. Adjustments to weights, scale factors, and translation factors include:

Figure BSA0000186325300000074
Figure BSA0000186325300000074

Figure BSA0000186325300000081
Figure BSA0000186325300000081

Figure BSA0000186325300000082
Figure BSA0000186325300000082

Figure BSA0000186325300000083
Figure BSA0000186325300000083

其中,学习速率:η(η>0),动量因子:μ(0<μ<1)。通过对式中的参数不断进行调整,从而提升模型的预测精度,并采用MATLAB软件进行仿真,验证模型的预测效果。Among them, learning rate: η (η>0), momentum factor: μ (0<μ<1). By continuously adjusting the parameters in the formula, the prediction accuracy of the model is improved, and MATLAB software is used for simulation to verify the prediction effect of the model.

然后通过对此模型中的GA参数、BP参数、权值、尺度因子、平移因子等参数不断进行调整,提升模型的稳定性和预测精度,令此模型更加适用于实际的现场环境,并且不断完善和优化该模型。Then, by continuously adjusting parameters such as GA parameters, BP parameters, weights, scale factors, and translation factors in this model, the stability and prediction accuracy of the model are improved, making this model more suitable for the actual on-site environment, and it is constantly improved. and optimize the model.

本次试验选用2010~2015年的数据对模型进行训练,应用2016~2018年的数据检验GA-WNN模型的实际预测效果。利用6年的数据对此网络进行训练,不断调整模型的权值、尺度因子、平移因子、学习率、动量因数和迭代次数等模型参数,经过多次对比试验结果并计算误差,不断对其进行改进与优化,得到了预测效果较好的模型,并且其误差在合理的范围内(误差百分比在5%以内),预测值与实测值相差很小,基本对温室番茄产量实现了精准预测,GA-WNN模型的预测效果如下图。结果表明,此模型预测值对实测值的跟踪效果较好,并且模型的稳定性较高,可以有效预测温室番茄产量。实验数据和试验结果对比图如下:In this experiment, the data from 2010 to 2015 were used to train the model, and the data from 2016 to 2018 was used to test the actual prediction effect of the GA-WNN model. Use 6 years of data to train this network, constantly adjust the model parameters such as weight, scale factor, translation factor, learning rate, momentum factor and iteration number, compare the test results many times and calculate the error, and constantly improve it Through improvement and optimization, a model with better prediction effect has been obtained, and its error is within a reasonable range (the error percentage is within 5%). The difference between the predicted value and the measured value is very small, and the accurate prediction of greenhouse tomato production has basically been realized. GA - The prediction effect of the WNN model is shown in the figure below. The results show that the predicted value of this model has a better tracking effect on the measured value, and the stability of the model is higher, which can effectively predict the greenhouse tomato yield. The comparison chart of experimental data and test results is as follows:

Figure BSA0000186325300000084
Figure BSA0000186325300000084

为了验证模型的预测效果,将GA-WNN模型与WNN模型、BP神经网络模型进行对比,预测效果对比情况见下表。经分析可知,采用两种模型的预测值与实际值均存在一定误差,GA-WNN模型平均相对误差为0.66%,WNN模型平均相对误差为1.02%,BP神经网络模型的平均相对误差为2.42%,GA-WNN模型预测效果较为理想。GA-WNN模型收敛速度优于WNN与BP神经网络模型,经过208步预测效果已达到最优。综上所述,通过将遗传算法、小波分析和BP神经网络进行结合构造出的GA-WNN模型的收敛速度较快、预测精度较高,实现了番茄产量的精准预测,能够为合理安排温室内的作物种类、制定灌溉和施肥等管理计划提供依据。In order to verify the prediction effect of the model, the GA-WNN model is compared with the WNN model and the BP neural network model. The comparison of the prediction effect is shown in the table below. According to the analysis, there are certain errors between the predicted value and the actual value of the two models. The average relative error of the GA-WNN model is 0.66%, the average relative error of the WNN model is 1.02%, and the average relative error of the BP neural network model is 2.42%. , the prediction effect of GA-WNN model is ideal. The convergence speed of the GA-WNN model is better than that of the WNN and BP neural network models, and the prediction effect has reached the optimum after 208 steps. In summary, the GA-WNN model constructed by combining genetic algorithm, wavelet analysis and BP neural network has a faster convergence speed and higher prediction accuracy, and realizes accurate prediction of tomato yield, which can provide a reasonable arrangement for the greenhouse. Provide a basis for crop types, irrigation and fertilization and other management plans.

Figure BSA0000186325300000091
Figure BSA0000186325300000091

本研究利用GA-WNN模型对北方日光温室内的番茄产量进行预测,综合考虑了影响温室番茄产量的因素,采用遗传算法等手段对参数进行处理并筛选,然后提取数据的特征向量作为模型输入,构建温室番茄产量预测模型,并利用小波神经网络中尺度因子与平移因子进行权值调整,提升模型的预测精度。仿真结果表明,GA-WNN模型平均相对误差为0.66%,WNN模型平均相对误差为1.02%,BP神经网络模型的平均相对误差为2.42%,GA-WNN模型预测效果优于WNN和BP神经网络模型,经过208步预测效果已达到最优,证明GA-WNN模型具有较好的实际应用价值。与传统的WNN和BP神经网络模型相比,GA-WNN模型的平均相对误差较小、精度更高、稳定性更强,更符合温室番茄产量预测,能够为温室内番茄种植决策的制定提供依据,并且对番茄种植期间所采取的灌溉、施肥、补光和通风等措施提供了一定的理论支持,并且对温室系统的改良和优化起到了促进作用。In this study, the GA-WNN model was used to predict the tomato yield in the northern solar greenhouse. The factors affecting the greenhouse tomato yield were comprehensively considered. The parameters were processed and screened by means of genetic algorithm, and then the feature vector of the data was extracted as the model input. A greenhouse tomato yield prediction model was constructed, and the scale factor and translation factor in the wavelet neural network were used to adjust the weights to improve the prediction accuracy of the model. The simulation results show that the average relative error of the GA-WNN model is 0.66%, the average relative error of the WNN model is 1.02%, and the average relative error of the BP neural network model is 2.42%. The prediction effect of the GA-WNN model is better than that of the WNN and BP neural network models , after 208 steps, the prediction effect has reached the optimum, which proves that the GA-WNN model has good practical application value. Compared with the traditional WNN and BP neural network models, the average relative error of the GA-WNN model is smaller, the accuracy is higher, and the stability is stronger. It is more in line with the forecast of greenhouse tomato production and can provide a basis for the decision-making of tomato planting in the greenhouse. , and provided some theoretical support for the irrigation, fertilization, supplementary light and ventilation measures taken during tomato planting, and played a role in promoting the improvement and optimization of the greenhouse system.

以上公开的仅为本发明的几个具体实施例,但是,本发明实施例并非局限于此,任何本领域的技术人员能思之的变化都应落入本发明的保护范围。The above disclosures are only a few specific embodiments of the present invention, however, the embodiments of the present invention are not limited thereto, and any changes conceivable by those skilled in the art shall fall within the protection scope of the present invention.

Claims (2)

1.一种基于遗传算法的小波神经网络番茄产量预测模型,其特征在于,本模型的输入变量包括以下特征参数:环境温度;环境湿度;灌溉量;氮肥投入量;磷肥投入量;钾肥投入量;CO2浓度;光照强度;1. A wavelet neural network tomato yield prediction model based on genetic algorithm, it is characterized in that, the input variable of this model comprises following feature parameter: ambient temperature; Environmental humidity; Irrigation amount; Nitrogen fertilizer input amount; Phosphate fertilizer input amount; Potassium fertilizer input amount ; CO2 concentration; light intensity; 该模型由以下步骤建立:The model is built by the following steps: 随机生成一个初始种群Xm×nRandomly generate an initial population X m×n : n=s1×s2+s2×s3+s2+s3 (1)n=s 1 ×s 2 +s 2 ×s 3 +s 2 +s 3 (1) 其中:m为初始种群数量,n为个体长度,个体长度既代表每个个体的基因值数量,也代表一个神经网络的初始权值数量;s1为输入层节点数;s2为隐含层节点数;s3为输出层节点数;Among them: m is the initial population size, n is the individual length, and the individual length not only represents the number of gene values of each individual, but also represents the initial weight value of a neural network; s 1 is the number of nodes in the input layer; s 2 is the hidden layer The number of nodes; s 3 is the number of nodes in the output layer; 遗传算法通过计算初始种群中每个个体的输出误差值Ei,适应度值fi,并根据个体适应度值的值进行评估,选择初始种群中适应度值在预设范围A内的个体进入子种群继续进行优化训练:The genetic algorithm calculates the output error value E i and the fitness value f i of each individual in the initial population, and evaluates it according to the value of the individual fitness value, and selects the individuals whose fitness value is within the preset range A in the initial population to enter The subpopulation continues with optimization training:
Figure FSB0000201115550000011
Figure FSB0000201115550000011
Figure FSB0000201115550000012
Figure FSB0000201115550000012
在子种群中,第i个个体进行交叉或变异操作的概率为pi,根据交叉率pc和变异率pm自适应函数来判断该个体是否需要进行交叉或遗传操作:In the subpopulation, the probability that the i-th individual performs crossover or mutation operation is p i , according to the adaptive function of crossover rate p c and mutation rate p m , it is judged whether the individual needs crossover or genetic operation:
Figure FSB0000201115550000013
Figure FSB0000201115550000013
Figure FSB0000201115550000014
Figure FSB0000201115550000014
Figure FSB0000201115550000015
Figure FSB0000201115550000015
式中:kc、km均为小于1的实数,fi为个体适应值;fc为要交叉的个体适应度值,fm为要变异的个体适应度值,fmax
Figure FSB0000201115550000016
分别为种群中最大适应度值和平均适应度值,
Figure FSB0000201115550000021
为种群的收敛程度;
In the formula: k c and k m are real numbers less than 1, f i is the individual fitness value; f c is the individual fitness value to be crossed, f m is the individual fitness value to be mutated, f max ,
Figure FSB0000201115550000016
are the maximum fitness value and the average fitness value in the population, respectively,
Figure FSB0000201115550000021
is the degree of convergence of the population;
剔除输入变量中偏差超过其年平均值±10%的数据,应用遗传算法对数据优化,数据动态范围的绝对值位于5%以内视为处理效果较好,将经过筛选与优化处理后的数据作为小波神经网络的输入数据并进行后续运算;Eliminate the data whose deviation exceeds ±10% of the annual average value in the input variables, apply the genetic algorithm to optimize the data, and the absolute value of the dynamic range of the data is within 5%, which is regarded as a good processing effect, and the data after screening and optimization are used as Input data of the wavelet neural network and perform subsequent operations; 将经过上述处理后的特征参数作为小波神经网络模型的输入,温室番茄产量作为输出,其中,包括如下步骤:The characteristic parameters after the above processing are used as the input of the wavelet neural network model, and the greenhouse tomato output is used as the output, which includes the following steps: 该模型选用的母小波函数为:The mother wavelet function selected for this model is: g(x)=cos(1.75x)exp(-x2/2) (7)g(x)=cos(1.75x)exp(-x 2 /2) (7) x为母小波函数的自变量,表示产量预测模型的输入变量;x is the independent variable of the mother wavelet function, which represents the input variable of the output forecasting model; 将母小波函数进行尺度和平移变换构造小波基函数:Scale and translation transform the mother wavelet function to construct the wavelet basis function:
Figure FSB0000201115550000022
Figure FSB0000201115550000022
其中,aj、bj分别为第j个隐含层节点的尺度因子和平移因子;Among them, a j and b j are the scale factor and translation factor of the jth hidden layer node respectively; yk为模型的输出:y k is the output of the model:
Figure FSB0000201115550000023
Figure FSB0000201115550000023
其中,xi(i=1,2,...,I)为输入层第i个节点的输入,yk(j=1,2,...,k)为输出层第j个节点的输出;Among them, x i (i=1, 2, ..., I) is the input of the i-th node of the input layer, y k (j = 1, 2, ..., k) is the input of the j-th node of the output layer output; 根据公式(9)可得到产量预测值,并与实际生产值进行比较,从而计算网络的预测误差,定义误差函数E为:According to the formula (9), the output prediction value can be obtained and compared with the actual production value, so as to calculate the prediction error of the network, and the error function E is defined as:
Figure FSB0000201115550000024
Figure FSB0000201115550000024
其中,yk为输出层第k个节点的实际输出,tk为输出层第k个节点的目标输出;Among them, y k is the actual output of the kth node of the output layer, and t k is the target output of the kth node of the output layer; 根据梯度下降法调整输入层到隐含层的权值Wji和隐含层到输出层的权值Wkj、尺度因子aj(n+1)、平移因子bj(n+1),公式如下:According to the gradient descent method, adjust the weight W ji from the input layer to the hidden layer and the weight W kj from the hidden layer to the output layer, scale factor a j (n+1), translation factor b j (n+1), the formula as follows:
Figure FSB0000201115550000031
Figure FSB0000201115550000031
Figure FSB0000201115550000032
Figure FSB0000201115550000032
Figure FSB0000201115550000033
Figure FSB0000201115550000033
Figure FSB0000201115550000034
Figure FSB0000201115550000034
其中,公式(11)-(14)中Wkj(n+1)、Wji(n+1)表示当前时刻权值,Wkj(n)、Wji(n)表示上一时刻权值,学习速率:η(η>0),动量因子:μ(0<μ<1)。Among them, Wkj(n+1) and Wji(n+1) in formulas (11)-(14) represent the weights at the current moment, Wkj(n) and Wji(n) represent the weights at the previous moment, learning rate: η (η>0), momentum factor: μ (0<μ<1).
2.如权利要求1所述的一种基于遗传算法的小波神经网络番茄产量预测方法,其特征在于,误差值以百分数表示,则适应度值处于0~1范围内,A=fi>0.667。2. a kind of wavelet neural network tomato yield prediction method based on genetic algorithm as claimed in claim 1, is characterized in that, error value represents with percentage, and then fitness value is in the scope of 0~1, A=f i >0.667 .
CN201910663789.1A 2019-07-13 2019-07-13 Wavelet neural network tomato yield prediction method based on genetic algorithm Expired - Fee Related CN110414115B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910663789.1A CN110414115B (en) 2019-07-13 2019-07-13 Wavelet neural network tomato yield prediction method based on genetic algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910663789.1A CN110414115B (en) 2019-07-13 2019-07-13 Wavelet neural network tomato yield prediction method based on genetic algorithm

Publications (2)

Publication Number Publication Date
CN110414115A CN110414115A (en) 2019-11-05
CN110414115B true CN110414115B (en) 2023-01-20

Family

ID=68362450

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910663789.1A Expired - Fee Related CN110414115B (en) 2019-07-13 2019-07-13 Wavelet neural network tomato yield prediction method based on genetic algorithm

Country Status (1)

Country Link
CN (1) CN110414115B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113158470B (en) * 2020-11-25 2022-09-23 中国石油大学(华东) Automatic history matching system and method for oil reservoirs based on transfer learning
CN113379188B (en) * 2021-05-06 2022-10-25 贵州省烟草公司贵阳市公司 Internet of things-based tobacco crop rotation planting method and system
CN113439520A (en) * 2021-07-21 2021-09-28 中国农业科学院农业环境与可持续发展研究所 Intelligent decision-making method and system for crop irrigation and fertilization
CN113987915A (en) * 2021-09-18 2022-01-28 吉林中粮生化有限公司 Data modeling system for food industry based on neural network parameter optimization
CN115907366B (en) * 2022-11-15 2023-09-22 淮阴工学院 Agricultural product growth environment optimal regulation and control method and equipment based on flamingo algorithm

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106651012A (en) * 2016-12-02 2017-05-10 东华大学 Crop transpiration prediction method based on improved extreme learning machine
CN109345508A (en) * 2018-08-31 2019-02-15 北京航空航天大学 A Bone Age Evaluation Method Based on Two-Stage Neural Network
CN109359741A (en) * 2018-09-27 2019-02-19 华南师范大学 An intelligent prediction method for time series change of wastewater treatment influent water quality

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10698918B2 (en) * 2013-11-20 2020-06-30 Qliktech International Ab Methods and systems for wavelet based representation
EP3414428A2 (en) * 2016-02-08 2018-12-19 RS Energy Group Topco, Inc. Method for estimating oil/gas production using statistical learning models

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106651012A (en) * 2016-12-02 2017-05-10 东华大学 Crop transpiration prediction method based on improved extreme learning machine
CN109345508A (en) * 2018-08-31 2019-02-15 北京航空航天大学 A Bone Age Evaluation Method Based on Two-Stage Neural Network
CN109359741A (en) * 2018-09-27 2019-02-19 华南师范大学 An intelligent prediction method for time series change of wastewater treatment influent water quality

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《作物产量预测的时间序列神经网络模型》;魏周会等;《节水灌溉》;20061231;全文 *

Also Published As

Publication number Publication date
CN110414115A (en) 2019-11-05

Similar Documents

Publication Publication Date Title
CN110414115B (en) Wavelet neural network tomato yield prediction method based on genetic algorithm
WO2022253057A1 (en) Intelligent moisture precise irrigation control system and method for fruit and vegetable cultivation in solar greenhouse
Bayat et al. Application of artificial neural networks for predicting tree survival and mortality in the Hyrcanian forest of Iran
CN107909149A (en) A kind of Temperature in Greenhouse Forecasting Methodology based on Genetic BP Neutral Network
CN106842923B (en) Greenhouse environment multi-factor coordination control method based on crop physiology and energy consumption optimization
CN106373022B (en) BP-GA-based greenhouse crop planting efficiency condition optimization method and system
CN107329511B (en) Method and system for efficient regulation and control of light environment of hydroponic vegetables based on suitable root temperature range
CN107145941B (en) Method for dynamically acquiring light demand quantity in real time based on optimal light quality and photon flux density
CN109214579B (en) BP neural network-based saline-alkali soil stability prediction method and system
CN110070228B (en) A BP neural network wind speed prediction method based on neuron branch evolution
CN110472840A (en) A kind of agricultural water conservancy dispatching method and system based on nerual network technique
CN108983849A (en) It is a kind of to utilize compound extreme learning machine ANN Control greenhouse method
CN111915062B (en) Greenhouse crop water demand regulation and control method with water utilization rate and photosynthesis rate being coordinated
CN107466816A (en) A kind of irrigation method based on dynamic multilayer extreme learning machine
CN107390754A (en) Intelligent plant growth environment adjustment system and method based on Internet of Things cloud platform
CN105389452A (en) Cucumber whole-course photosynthetic rate prediction model based on neural network, and establishment method
CN108762084A (en) Irrigation system of rice field based on fuzzy control decision and method
Valenzuela et al. Pre-harvest factors optimization using genetic algorithm for lettuce
CN107871039A (en) A Method of Optimizing Rice Plant Spacing Based on Virtual Model
An et al. A simulator-based planning framework for optimizing autonomous greenhouse control strategy
CN117575094A (en) Crop yield prediction and optimization method and device based on digital twin
CN115796040A (en) A Small Sample Based Greenhouse Temperature Prediction Method
CN108319134A (en) A kind of greenhouse environment intelligent control method based on extreme learning machine network
CN115392016A (en) A Method for Predicting the Growth and Development of Silage Corn Based on Remote Sensing Data Assimilation
Chen et al. A water-saving irrigation decision-making model for greenhouse tomatoes based on genetic optimization TS fuzzy neural network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20230120