Disclosure of Invention
The invention provides a field bus-based intelligent granary environment safety monitoring system, which effectively solves the problems of the granary environment caused by unreasonable design, backward equipment, imperfect detection system and the like of the traditional granary environment multi-parameter detection equipment. According to the characteristics of nonlinearity, large hysteresis, large and complex environmental area of the granary and the like of change of environmental parameters of the granary, the defects of inaccuracy, low reliability and the like of an environment monitoring system of the granary are overcome, accurate detection and reliable classification of the environmental parameters of the granary are realized, and therefore the accuracy and robustness of detection of the environmental parameters of the granary are greatly improved.
The invention is realized by the following technical scheme:
the granary environmental parameter acquisition platform based on the CAN field bus network consists of a detection node and a field monitoring terminal, and the detection node and the field monitoring terminal form the granary environmental parameter acquisition platform through the CAN field bus. The detection nodes respectively consist of a sensor group module, a single chip microcomputer and a communication module, wherein the sensor group module is responsible for detecting the environmental parameters of the granary such as temperature, humidity, moisture, grain insects and the like, the sampling interval is controlled by the single chip microcomputer and the parameters are sent to the field monitoring terminal through the communication module; the field monitoring terminal consists of an industrial control computer and an RS232/CAN communication module, and realizes the management of detecting the environmental parameters of the granary by the detection node, the respective fusion and prediction of the multipoint parameters of the granary environment and the classification of the granary environmental safety. The granary environmental parameter acquisition platform based on the CAN field bus is shown in figure 1.
The invention further adopts the technical improvement scheme that:
the granary environmental safety evaluation subsystem consists of 3 parameter detection units and a granary environmental safety intelligent evaluator, wherein the 3 parameter detection units consist of a temperature detection unit, a humidity detection unit and a moisture detection unit, the 3 parameter detection units realize the detection, fusion and prediction of 3 granary environmental factors including the granary environmental temperature, the humidity and the moisture, each parameter detection unit comprises 4 parts including 1 granary environmental factor sensor with a plurality of detection points, a plurality of time series triangular fuzzy number neural networks with 1 environmental factor, 1 environmental factor fusion model with a plurality of points of the granary environment and a triangular fuzzy number prediction module with 1 environmental factor, the 1 granary environmental factor sensor with a plurality of detection points senses the granary environmental factor parameters of the detected points, the output of the 1 environmental factor sensor with each detection point is used as the input of the corresponding 1 time series triangular fuzzy number neural network, the output of a plurality of time series triangular fuzzy number neural networks is used as the input of a multipoint environment factor fusion model of the granary environment, the output of a 1 multipoint environment factor fusion model of the granary environment is used as the input of a 1 environment factor triangular fuzzy number prediction module, the output of a 3 environment factor triangular fuzzy number prediction module is used as the input of an intelligent granary environment safety evaluator, the intelligent granary environment safety evaluator carries out grade evaluation on different influences on the grain environment safety according to the detected prediction values of the 3 granary environment factors of the granary greenhouse and the grain insects, the granary environment safety evaluation subsystem realizes the intelligent monitoring of the 3 granary environment factors of the granary greenhouse and the evaluation on the granary environment safety grade, and the 3 parameter detection units have similar characteristics in function and structure composition.
The invention further adopts the technical improvement scheme that:
the temperature detecting unit is taken as an example to introduce the structural characteristics
The plurality of temperature time series triangular fuzzy number neural networks are composed of 1 time series triangular fuzzy number neural network corresponding to each temperature detection point, each time series triangular fuzzy number neural network is composed of a radial basis neural network model, an NARX neural network model 1, an NARX neural network model 2 and an NARX neural network model 3, a section of conventional time series value output by a temperature sensor is used as the input of the radial basis neural network, 3 outputs input into the radial basis neural network model are respectively used as the input of the NARX neural network model 1, the NARX neural network model 2 and the NARX neural network model 3, triangular fuzzy values output by the NARX neural network model 1, the NARX neural network model 2 and the NARX neural network model 3 respectively represent the lower limit value, the maximum possible value and the upper limit value of the temperature of the detected point, and the time series triangular fuzzy number neural network converts the section of conventional time series value of the temperature of the detected point into the detected point according to the temperature dynamic change characteristic of the detected point The measured temperature is represented by a triangular fuzzy value, and the conversion is more consistent with the dynamic rule of the temperature change of the detected point and the fuzzy characteristic of the temperature of the detected point;
the invention further adopts the technical improvement scheme that:
the granary environment multipoint temperature fusion model consists of 3 parts of a temperature time sequence triangular fuzzy number array, a relative closeness of a calculated temperature time sequence triangular fuzzy number value and a positive and negative ideal value, and a calculated temperature triangular fuzzy number fusion value, wherein the triangular fuzzy number values of a plurality of detection point temperatures in a period of time form the temperature time sequence triangular fuzzy number array, the positive and negative ideal values of the temperature time sequence triangular fuzzy number array are determined, the distance between the temperature time sequence triangular fuzzy number value of each detection point and the positive and negative ideal values of the temperature time sequence triangular fuzzy number array is respectively calculated, the distance between the negative ideal value of the temperature time sequence triangular fuzzy number value of each detection point is divided by the sum of the distance between the negative ideal value of the temperature time sequence triangular fuzzy number value of each detection point and the distance between the positive ideal value of the temperature time sequence triangular fuzzy number value of each detection point, and the obtained quotient is the relative closeness of the temperature time sequence triangular fuzzy number value of each detection point, dividing the relative closeness of the temperature time series triangular fuzzy value of each detection point by the sum of the relative closeness of the temperature time series triangular fuzzy values of all the detection points to obtain a quotient which is the fusion weight of the temperature time series triangular fuzzy value of each detection point, and obtaining the fusion value of the temperature time series triangular fuzzy values of a plurality of detection points by the sum of the products of the temperature time series triangular fuzzy values of each detection point and the fusion weight of the temperature time series triangular fuzzy values of the detection points;
the invention further adopts the technical improvement scheme that:
the temperature triangular fuzzy number prediction module consists of 3 GRNN neural network prediction models and 3 GM (1, 1) prediction models, wherein the 3 GRNN neural network prediction models are a GRNN neural network prediction model 1, a GRNN neural network prediction model 2 and a GRNN neural network prediction model 3 respectively, and the 3 GM (1, 1) prediction models are a GM (1, 1) prediction model 1, a GM (1, 1) prediction model 2 and a GM (1, 1) prediction model 3 respectively; the lower limit value, the maximum possible value and the upper limit value of the triangular fuzzy number of the detected environment temperature output by the granary environment multipoint temperature fusion model are respectively input into a GRNN neural network prediction model 1, a GRNN neural network prediction model 2 and a GRNN neural network prediction model 3, the outputs of the GRNN neural network prediction model 1, the GRNN neural network prediction model 2 and the GRNN neural network prediction model 3 are respectively input into a GM (1, 1) prediction model 1, a GM (1, 1) prediction model 2 and a GM (1, 1) prediction model 3, the outputs of the GM (1, 1) prediction model 1, the GM (1, 1) prediction model 2 and the GM (1, 1) prediction model 3 are respectively used as the predicted values of the temperature triangular fuzzy number output by the detected granary environment multipoint temperature fusion model, the predicted value of the temperature triangle fuzzy value is used as the output of the temperature triangle fuzzy value prediction module;
the invention further adopts the technical improvement scheme that:
the intelligent evaluation device for the environmental safety of the granary consists of a DRNN neural network granary prediction model and a fuzzy least square support vector machine granary environmental safety classifier, a language variable for evaluating the safety level of the environmental factors of the granary to be detected and a corresponding relation table of 5 different triangular fuzzy numbers are established according to different influences of the environmental temperature, the humidity, the moisture and the granary on the quality of the grain in the grain storage process, and the fuzzy least square support vector machine granary environmental safety classifier is used for safely classifying the environmental factors of the granary to be detected into 5 classes of environmental factors, namely good granary environmental factors, normal granary environmental factors, poor granary environmental factors and poor granary environmental factors; the output of the fuzzy least square support vector machine granary environment safety classifier is a triangular fuzzy numerical value representing the grade of the granary environment factor, the similarity between the output of the fuzzy least square support vector machine granary environment safety classifier and 5 triangular fuzzy numbers representing the grade of the detected granary environment 5 granary environment factors is calculated respectively, wherein the grade of the granary environment factor corresponding to the triangular fuzzy number with the maximum similarity is the grade of the detected granary environment factor at present.
Compared with the prior art, the invention has the following obvious advantages:
the invention relates to a method for measuring the greenhouse environment parameters of a granary, aiming at the uncertainty and randomness of the problems of sensor precision error, interference, abnormal measured temperature value and the like in the measuring process of the greenhouse environment parameters of the granary.
The granary greenhouse environment multi-point environmental factor fusion model realizes dynamic fusion of environmental factor triangular fuzzy prediction values of a plurality of detection points, positive and negative ideal values of the environmental factor time sequence triangular fuzzy number array are determined by determining the environmental factor time sequence triangular fuzzy number array of the time sequence triangular fuzzy number prediction values of the plurality of detection points, the distance between the environmental factor time sequence triangular fuzzy number prediction value of each detection unit and the positive and negative ideal values of the environmental factor time sequence triangular fuzzy number array, the relative closeness between each detection unit and the positive and negative ideal values and the fusion weight are respectively calculated, and the accuracy of the environmental factor triangular fuzzy number prediction value of the detected points is improved.
And thirdly, the inputs of the NARX neural network model 1, the NARX neural network model 2 and the NARX neural network model adopted by the invention are 3 outputs of the radial basis function neural network model, and the lower limit value a, the possible value b and the upper limit value c of the triangular fuzzy number of the sensor output signal of the outputs of the NARX neural network model 1, the NARX neural network model 2 and the NARX neural network model. As 3 outputs of the radial basis function neural network model of the NARX neural network model for a period of time are used as inputs and the NARX neural network model outputs historical feedback, the feedback inputs can be considered to include state historical information of the detected triangular fuzzy number for a period of time to participate in the conversion of the detected triangular fuzzy number, and for a proper feedback time length, the NARX neural network model provides an effective triangular fuzzy number detection method of the greenhouse environment parameters of the granary.
The NARX neural network prediction model adopted by the invention is a dynamic neural network model which can effectively convert the nonlinear and non-stationary time sequence of the lower limit value a, the possible value b and the upper limit value c of the triangular fuzzy number of the detected point parameter of the granary greenhouse, and can improve the conversion precision of the time sequence of the triangular fuzzy number of the detected point of the granary greenhouse under the condition of reducing the non-stationarity of the time sequence. Compared with the traditional prediction model method, the method has the advantages of good effect of processing the non-stationary time sequence, high calculation speed and high accuracy. The method verifies the feasibility of converting the temperature of the detected points of the granary greenhouse into the triangular fuzzy number by the NARX neural network model. Meanwhile, the experimental result also proves that the NARX neural network model is more excellent than the traditional model in the non-stationary time series prediction.
The invention utilizes NARX neural network to establish the triangular fuzzy parameter conversion model of the environmental factors of the detected points of the granary greenhouse, because the dynamic recursive network of the model is established by introducing the delay module and the output feedback, the input and output vector delay feedback is introduced into the network training to form a new input vector, the nonlinear mapping capability is good, the input of the network model not only comprises the original input data, but also comprises the output data after training, the generalization capability of the network is improved, and the conversion precision and the self-adaption capability of the network are better than those of the traditional static neural network in the conversion of the nonlinear granary greenhouse environmental temperature into the triangular fuzzy number.
The GRNN neural network prediction model and the GM (1, 1) prediction model adopted by the method are connected in series to predict the triangular fuzzy number of the environmental factors of the greenhouse environment of the granary, the GRNN neural network prediction model has strong nonlinear mapping capability, a flexible network structure and high fault tolerance and robustness, the prediction model has stronger advantages in approximation capability and learning speed than the RBF network, and finally converges on an optimized regression surface with more accumulated sample size, and when the sample data is less, unstable data can be processed, and the prediction effect is better. The prediction model based on the GRNN neural network has the advantages of strong generalization capability, high prediction accuracy and stable algorithm, and the prediction model based on the GRNN neural network also has the advantages of high convergence speed, few adjustment parameters, difficulty in falling into local minimum values and the like, and the prediction network has high operation speed. The prediction model based on the GRNN neural network is simple and complete in structure, the internal structure of the model is determined along with the determination of the sample points, the requirement on data samples is low, and the regression surface can be converged even if the data is rare as long as people are input and the samples are output. The method has the characteristics of definite probability significance, better generalization capability, local approximation capability and quick learning, can approximate functions of any healing type, and finally determines the model only by adjusting and selecting the smooth factor in the process of establishing and learning the network model. The GRNN-based neural network prediction model building process is a network training process, special training is not needed, and the method has the characteristics of simple network building process, few influence factors, strong local approximation capability, high learning speed and good simulation performance. The invention adopts a GM (1, 1) prediction model with 3 metabolisms to predict the triangular fuzzy number of the environmental factor of the greenhouse environment of the granary at the future time according to the historical parameter value of the triangular fuzzy number of the environmental factor of the greenhouse environment of the granary to be detected, adds the environmental factor triangular fuzzy numbers of the greenhouse environment of the granary predicted by the method into the original number series of the triangular fuzzy numbers of the environmental factor of the greenhouse environment of the granary, correspondingly removes the triangular fuzzy number of the environmental factor of the granary at the beginning of the number series, and then predicts the triangular fuzzy number of the environmental factor of the greenhouse environment of the granary. And by analogy, predicting the environmental factor triangular fuzzy number of the greenhouse environment of the granary. This method is called a metabolic complementation model, and can realize long-time prediction. The grower can more accurately master the change trend of the environmental factors of the greenhouse environment of the granary and prepare for the production management of the environmental factors of the greenhouse environment of the granary.
The DRNN neural network grain insect prediction model is a feedback network, has local feedback characteristics, and has the function of mapping dynamic characteristics by storing the internal state on the basis of a BP network, so that the DRNN neural network grain insect prediction model has the time-varying adaptation capability. The network structure is basically similar to a 4-layer BP network, a structural layer is added, and the output of the hidden layer is fed back to the input of the hidden layer through a delay link, so that partial feedback is realized, and the effect of memorizing the previous state is achieved. The self-connection mode of the DRNN neural network grain insect prediction model enables the historical data of the grain insect to have sensitivity, and the addition of the internal feedback network increases the capability of the network to process dynamic information, thereby being beneficial to modeling the dynamic process of the DRNN neural network grain insect prediction model. Therefore, the prediction of the grain insects by utilizing the DRNN neural network grain insect prediction model has higher accuracy.
The fuzzy least square support vector machine granary environment safety classifier establishes a language variable and 5 different triangular fuzzy number corresponding relation tables for evaluating the grade of the detected granary greenhouse environment factor according to the influence of the temperature, the humidity, the moisture and the grain insects of the detected granary greenhouse environment on the quality of grains stored in the granary, and divides the detected granary greenhouse environment factor into 5 classes of the granary greenhouse environment factor, wherein the 5 classes of the granary greenhouse environment factor comprise a good environment factor, a normal environment factor, a poor environment factor and a poor environment factor; the fuzzy least square support vector machine granary environment safety classifier carries out grade evaluation on granary greenhouse environment factors influencing the grain quality of the granary, the output of the fuzzy least square support vector machine granary environment safety classifier is a triangular fuzzy numerical value representing the grade of the environment factors, and the dynamic performance and scientific classification of the granary greenhouse environment safety grade classification are realized by respectively calculating the similarity between the output of the fuzzy least square support vector machine granary environment safety classifier and 5 triangular fuzzy numbers representing the grade of the detected granary greenhouse environment factors, wherein the environment factor grade corresponding to the triangular fuzzy number with the maximum similarity is the current environment factor grade of the detected granary greenhouse environment.
The invention introduces a fuzzy membership concept into a least square support vector machine granary environment safety classifier, provides a support vector model based on a fuzzy membership function for granary environment safety grade, and endows the membership of temperature, humidity, moisture and grain insects influencing the granary environment safety according to the degree of input deviation from a data domain to improve the anti-noise capability of the support vector machine, thereby being particularly suitable for the condition that the characteristics of input samples cannot be completely disclosed. The support vector model of the fuzzy membership function of the granary environmental safety level classifier is provided, and experimental and simulation results show that the membership function of temperature, humidity, moisture and grain insects can effectively improve the classification accuracy of the support vector model of the fuzzy membership function.
Detailed Description
The technical solution of the present invention is further described with reference to the accompanying drawings 1-7:
1. design of overall system function
The system is composed of a granary environmental parameter acquisition platform based on a CAN field bus network and a granary environmental safety evaluation subsystem. The granary environmental parameter acquisition platform based on the CAN field bus is composed of a plurality of detection nodes 1 and a field monitoring terminal 2, and a measurement and control network is constructed in a CAN field bus mode to realize field communication between the detection nodes 1 and the field monitoring terminal 2; the detection node 1 is responsible for detecting the temperature, the moisture and the actual value of the granary environment, and the detection node 1 sends the detected granary environment parameters to the field monitoring terminal 2 and performs primary processing on the sensor data; the field monitoring terminal 2 manages the environmental parameters of the granary, integrates the environmental factor parameters of a plurality of detection points and evaluates the grade of the environmental factors of the granary in the greenhouse; the field monitoring terminal 2 transmits the control information to the detection node 1. The whole system structure is shown in figure 1.
2. Design of detection node
The detection node 1 based on the CAN field bus is used as a granary environmental parameter sensing terminal, and the mutual information interaction between the detection node 1 and the field monitoring terminal 2 is realized through the CAN field bus mode with the field monitoring terminal 2. The detection node 1 comprises a sensor for acquiring the environmental temperature, humidity, moisture and grain insect parameters of the granary, a corresponding signal conditioning circuit and an STC89C52RC microprocessor; the software of the detection node mainly realizes field bus communication and the acquisition and pretreatment of the environmental parameters of the granary. The software is designed by adopting a C language program, so that the compatibility degree is high, the working efficiency of software design and development is greatly improved, and the reliability, readability and transportability of program codes are enhanced. The structure of the detection node is shown in fig. 3.
3. Site monitoring terminal software
The field monitoring terminal 2 is an industrial control computer, the field monitoring terminal 2 mainly realizes the collection of granary environment parameters and the fusion, prediction and classification of multi-point parameters, and realizes the information interaction with the detection node 1 and the control node 2, and the field monitoring terminal 2 mainly has the functions of communication parameter setting, data analysis and data management, granary environment multi-point parameter fusion and granary environment safety evaluation subsystem (see figure 2). Granary environmental safety evaluation subsystem comprises 3 parameter detection unit and granary environmental safety intelligence evaluation ware, 3 parameter detection unit are by temperature detecting element, humidity detecting element and moisture detecting element constitute, 3 parameter detection unit realize to granary ambient temperature, humidity and moisture 3 kinds of granary environmental factor altogether detect, fuse and the prediction, humidity and moisture detecting element function and structure are constituteed and temperature detecting element have similar characteristic, this patent introduces the design process with temperature detecting element, humidity detecting element and moisture detecting element refer to temperature detecting element's design. The temperature detection unit comprises 4 parts of a temperature sensor with a plurality of detection points, a temperature-based multi-time-series triangular fuzzy number neural network, a granary environment multi-point temperature fusion model and a temperature-based triangular fuzzy number prediction module, wherein the temperature sensor with the plurality of detection points senses the granary temperature of a detected point, the output of the temperature sensor with each detection point is used as the input of the corresponding 1 temperature-based time-series triangular fuzzy number neural network, the output of the temperature-based time-series triangular fuzzy number neural network is used as the input of the granary environment multi-point temperature fusion model, the output of the granary environment multi-point temperature fusion model is used as the input of the temperature-based triangular fuzzy number prediction module, the output of the 3 environment-factor triangular fuzzy number prediction module is used as the input of the granary environment safety intelligent evaluator, and the granary environment safety intelligent evaluator generates no phenomenon on the safety of the granary environment according to the detected granary greenhouse 3 granary environment factors and the prediction value of And the grade evaluation is carried out on the same influence, and the granary environment safety evaluation subsystem realizes the intelligent monitoring of the granary environmental factors of 3 types of granary greenhouses and the evaluation of the granary environment safety grade. The management software selects Microsoft Visual + +6.0 as a development tool, calls the Mscomm communication control of the system to design a communication program, and the functions of the field monitoring end software are shown in figure 4. The temperature detection unit is taken as an example to introduce the following composition and structural characteristics:
⑴, a plurality of temperature time series triangular fuzzy number neural networks are composed of 1 time series triangular fuzzy number neural network corresponding to each temperature detection point, the time series triangular fuzzy number neural network is composed of radial basis neural network model, NARX neural network model 1, NARX neural network model 2 and NARX neural network model 3, a segment of regular time series value outputted by the temperature sensor is used as input of the radial basis neural network, 3 outputs inputted into the radial basis neural network model are used as input of NARX neural network model 1, NARX neural network model 2 and NARX neural network model 3 respectively, the triangular fuzzy values outputted by NARX neural network model 1, NARX neural network model 2 and NARX neural network model 3 respectively represent lower limit value, maximum possible value and upper limit value of temperature of the detected point, the time series triangular fuzzy number neural network converts a segment of regular time value of detected temperature into triangular value of detected temperature according to temperature dynamics variation characteristic of detected point, the temperature time series triangular fuzzy number neural network model 1, NARX neural network model 2 and NARX neural network model 3 respectively, the temperature time series triangular fuzzy number neural network model is used as input of temperature measured point, temperature of the temperature time series neural network model 1, temperature of the detected point, temperature sensor model, temperature time series neural network model, temperature of the temperature sensor is expressed by temperature sensor model, temperature sensor model 1, temperature sensor model 1-temperature sensor model, temperature sensor model 1-temperature model, temperature sensor model, temperature model is expressed by temperature model, temperature sensor model is expressed by temperature model, temperature model 1-temperature model, temperature model is expressed by temperature model, temperature model is expressed by temperature model]Is equal to [ s ]1,s2,s3]A representsThe lower limit value of the temperature of the detected point, b represents the maximum possible value of the temperature of the detected point, c represents the upper limit value of the temperature of the detected point, the magnitude of the triangular fuzzy value of the temperature of the detected point depends on the conventional time series value state values of the first d moments of the temperature parameter of the detected point, d is a time window, according to the characteristic that the S has a function dependence relationship with the time series value of the temperature parameter of the detected point at the first d moments, the relationship between the period of the conventional time series value of the temperature parameter of the detected point and the triangular fuzzy value of the temperature parameter of the detected point is predicted by the time series triangular fuzzy neural network of the temperature parameter of the detected point, and the time series triangular fuzzy neural network converts the period of the conventional time series value of the temperature of the detected point into the triangular fuzzy value of the detected point according to the dynamic variation characteristic of the temperature of the detected point to represent, the conversion is more in accordance with the dynamic change rule of the temperature of the detected point; the structure of the time series triangular fuzzy neural network model of the detected point temperature value parameter is shown as 5. The radial basis vector of the neural network is H ═ H1,h2,…,hp]T,hpIs a basis function. A commonly used radial basis function in a radial basis function neural network is a gaussian function, and its expression is:
wherein X is the time sequence output of the sensor of the detected parameters, C is the coordinate vector of the central point of the Gaussian basis function of the hidden layer neurons,jthe width of the Gaussian base function of the jth neuron of the hidden layer; the output connection weight vector of the network is wijThe time series triangular fuzzy number neural network model outputs the expression as follows:
the invention discloses a method for predicting 3 outputs of a radial basis function neural network model by using 3 NARX neural network prediction models, wherein the NARX neural network (Nonlinear Auto-Regression with External input neural network) is a dynamic feedforward neural network, the NARX neural network is a Nonlinear autoregressive network with predicted input parameters, the NARX neural network has the dynamic characteristic of multi-step time delay and is connected with a plurality of layers of closed networks of the input parameters through feedback, and the NARX neural network is a dynamic neural network which is most widely applied in a Nonlinear dynamic system and has the performance generally superior to a total Regression neural network. The NARX neural network prediction model of the present patent is composed of an input layer, a hidden layer, an output layer, and input and output delay time delays, and before application, the delay order and the number of hidden layer neurons of the input and output are generally determined in advance, and the current output of the NARX neural network prediction model depends not only on the past output S (t-n), but also on the current input vector y (t), the delay order of the input vector, and the like. The NARX neural network prediction model structure comprises an input layer, an output layer, a hidden layer and a time extension layer, wherein predicted input parameters are transmitted to the hidden layer through the time delay layer, an input signal is processed by the hidden layer and then transmitted to the output layer, the output layer linearly weights an output signal of the hidden layer to obtain a final neural network prediction output signal, and the time delay layer delays a signal fed back by a network and a signal output by the input layer and then transmits the signal to the hidden layer. The NARX neural network model has the characteristics of nonlinear mapping capability, good robustness, adaptability and the like, and is suitable for predicting input parameters. y (t) represents the external input of the NARX neural network model, and m represents the delay order of the external input; s (t) is the output of the NARX neural network model, n is the output delay order; the output of the jth implicit element can thus be found as:
in the above formula, wjiAs a connection weight between the ith input and the jth implicit neuron, bjIs the bias value of the jth implicit neuron, the output S (t +1) of the NARX neural network prediction model respectively represents the predicted value of a as:
S(t+1)=f[S(t),S(t-1),…,S(t-n),y(t),y(t-1),…,y(t-m+1);W](4)
the NARX neural network prediction model 2 and the NARX neural network prediction model 3 respectively output the maximum possible value b of the detected point parameter of the S triangular fuzzy number to the time series triangular fuzzy number neural network model 2 and predict the upper limit value c of the detected point parameter, and the design methods of the two are similar to the NARX neural network prediction model 1.
The key of the time-series triangular fuzzy number neural network model of the detected point temperature parameter is to fit a mapping relation f according to detected point temperature value data of d moments of the detected point temperature value parameter and triangular fuzzy data of the detected point temperature value parameter in a past period of time, and further obtain a triangular fuzzy value S of a detected point temperature value fitting function through the time-series triangular fuzzy number neural network model. The mathematical model of the time series triangular fuzzy number neural network of the detected point temperature value parameter can be expressed as:
S=f(x(t),x(t-1),…,x(t-d+1),x(t-d)) (5)
two, granary greenhouse environment multiple spot temperature fuses model
The method comprises 3 parts of a temperature time series triangular fuzzy number array, a temperature time series triangular fuzzy number calculation method and a temperature time series triangular fuzzy number fusion calculation method, wherein the temperature time series triangular fuzzy number array is formed by triangular fuzzy number values of a plurality of detection points in a period of time, positive and negative ideal values of the temperature time series triangular fuzzy number array are determined, the distance between the temperature time series triangular fuzzy number value of each detection point and the positive and negative ideal values of the temperature time series triangular fuzzy number array is calculated respectively, the quotient obtained by dividing the distance between the negative ideal value of the temperature time series triangular fuzzy number value of each detection point and the distance between the positive ideal value of the temperature time series triangular fuzzy number value of each detection point by the sum of the distance between the negative ideal value of the temperature time series triangular fuzzy number value of each detection point and the distance between the positive ideal value of the temperature time series triangular fuzzy number of each detection point is the relative closeness of the temperature time series triangular, and the quotient obtained by dividing the relative closeness of the temperature time series triangular fuzzy value of each detection point by the sum of the relative closeness of the temperature time series triangular fuzzy values of all the detection points is the fusion weight of the temperature time series triangular fuzzy value of each detection point, and the sum of the products of the temperature time series triangular fuzzy value of each detection point and the fusion weight of the temperature time series triangular fuzzy value of the detection point is used for obtaining the fusion value of the temperature time series triangular fuzzy values of a plurality of detection points. The multipoint temperature fusion model of the barn greenhouse environment consists of 3 parts of a temperature time series triangular fuzzy number array, a relative closeness degree of a calculated temperature triangular fuzzy number value and an ideal value and a calculated temperature triangular fuzzy number fusion value, wherein the triangular fuzzy number values of the temperature of a plurality of parameter detection units in a period of time form the temperature time series triangular fuzzy number array, the distance between the temperature time series triangular fuzzy number value of each detection unit and a positive ideal value of the temperature time series triangular fuzzy number array and the distance between the temperature time series triangular fuzzy number value of each detection unit and a negative ideal value of the temperature time series triangular fuzzy number array are respectively calculated, the quotient obtained by dividing the distance between the negative ideal value of the temperature time series triangular fuzzy number value of each detection unit by the sum of the distance between the negative ideal value of the temperature time series triangular fuzzy number value of each detection unit and the distance between the positive ideal value of the temperature time series triangular fuzzy number value of each detection unit is used as each detection unit The sum of the products of the temperature time series triangular fuzzy value of each detection unit and the fusion weight of the temperature time series triangular fuzzy number of the detection unit is used for obtaining the temperature time series triangular fuzzy fusion values of a plurality of detection points; the multi-point humidity and moisture fusion model of the greenhouse environment of the granary refers to a design method of the multi-point temperature fusion model of the greenhouse environment of the granary.
Firstly, constructing a temperature time series triangular fuzzy number array
The triangular fuzzy numerical values of the temperatures of a plurality of parameter detection units form a temperature time series triangular fuzzy numerical array which is provided with n detection points and m parameters at momentThe triangular fuzzy numerical values of the detection units form a temperature time sequence triangular fuzzy number array with n rows and m columns, and the fuzzy triangular number predicted values of the temperatures of the detection units with different parameters at different moments are set as Xij(t),Xij(t+1),…,Xij(d) Then the temperature time series triangular fuzzy number array is:
② calculating relative closeness of temperature triangle fuzzy value and ideal value
The average value of the triangular fuzzy values of all the detection units at the same moment in a period of time forms a positive ideal value of the temperature time series triangular fuzzy number array, and the positive ideal value of the temperature time series triangular fuzzy number is as follows:
the triangular fuzzy value with the largest distance between the triangular fuzzy value and the positive ideal value of all the detection unit temperatures at the same moment in a period of time forms a negative ideal value of the temperature time series triangular fuzzy number array, and the negative ideal value of the temperature time series triangular fuzzy number is as follows:
the distance between the temperature time series triangular fuzzy value of each detection unit and the positive ideal value of the temperature time series triangular fuzzy value array is as follows:
the distance between the time series triangular fuzzy value of each detection unit and the negative ideal value of the temperature time series triangular fuzzy value array is as follows:
the relative closeness of the temperature time series triangular fuzzy value of each detection unit is obtained by dividing the distance of the negative ideal value of the temperature time series triangular fuzzy value of each detection unit by the sum of the distance of the negative ideal value of the temperature time series triangular fuzzy value of each detection unit and the distance of the positive ideal value of the temperature time series triangular fuzzy value of each detection unit:
thirdly, calculating the temperature triangle fuzzy number fusion value
It can be known through the formula (11) calculation that the greater the relative closeness between the temperature time series triangular fuzzy value of each detection unit and the positive and negative ideal values of the temperature time series triangular fuzzy number array, the closer the temperature time series triangular fuzzy value of the detection unit is to the positive ideal value, otherwise, the farther the temperature time series triangular fuzzy value of the detection point is from the positive ideal value, and according to this principle, the fusion weight of the temperature time series triangular fuzzy number of each detection unit is determined as the quotient of the closeness of the temperature time series triangular fuzzy value of each detection unit divided by the sum of the closeness of the temperature time series triangular fuzzy values of all detection units:
the temperature time series triangular fuzzy fusion value of a plurality of detection points obtained according to the sum of the products of the temperature time series triangular fuzzy value of each detection unit and the fusion weight of the temperature time series triangular fuzzy value of the detection unit is as follows:
design of a three-step and temperature triangular fuzzy number prediction module
The prediction model comprises 3 GRNN neural network prediction models and 3 GM (1, 1) prediction models, wherein the 3 GRNN neural network prediction models are a GRNN neural network prediction model 1, a GRNN neural network prediction model 2 and a GRNN neural network prediction model 3 respectively, and the 3 GM (1, 1) prediction models are a GM (1, 1) prediction model 1, a GM (1, 1) prediction model 2 and a GM (1, 1) prediction model 3 respectively; the lower limit value, the maximum possible value and the upper limit value of the triangular fuzzy number of the detected environment temperature output by the multipoint temperature fusion model of the barn greenhouse environment are respectively input into a GRNN neural network prediction model 1, a GRNN neural network prediction model 2 and a GRNN neural network prediction model 3, the outputs of the GRNN neural network prediction model 1, the GRNN neural network prediction model 2 and the GRNN neural network prediction model 3 are respectively input into a GM (1, 1) prediction model 1, a GM (1, 1) prediction model 2 and a GM (1, 1) prediction model 3, the outputs of the GM (1, 1) prediction model 1, the GM (1, 1) prediction model 2 and the GM (1, 1) prediction model 3 are respectively used as the predicted values of the temperature triangular fuzzy number output by the multipoint temperature fusion model of the detected barn greenhouse environment temperature, the predicted value of the temperature triangle fuzzy value is used as the output of the temperature triangle fuzzy value prediction module; the method for designing the triangular fuzzy number prediction module of the humidity, the illuminance and the wind speed refers to the design of the temperature triangular fuzzy number prediction module.
Design of GRNN neural network prediction model
The GRNN neural network prediction model is a local approximation network GRNN (generalized R integration neural network), historical data output by the multipoint temperature fusion model of the greenhouse environment of the granary is used as input of the GRNN neural network prediction model, and the GRNN neural network prediction model is used for predicting a future value of the greenhouse environment temperature of the granary so as to realize accurate prediction of the greenhouse environment temperature of the granary. The GRNN neural network prediction model is established on the basis of mathematical statistics and has a clear theoretical basis, a network structure and a connection value are determined after a learning sample is determined, and only one variable of a smooth parameter needs to be determined in a training process. The learning of the GRNN neural network prediction model totally depends on data samples, has stronger advantages than a BRF network in approximation capacity and learning speed, has strong nonlinear mapping and flexible network structure and high fault tolerance and robustness, and is particularly suitable for fast approximation of functionsAnd processing unstable data. The GRNN neural network prediction model has few artificial adjustment parameters, and the learning of the network completely depends on data samples, so that the network can reduce the influence of artificial subjective assumption on the prediction result to the maximum extent. The GRNN neural network prediction model has strong prediction capability under a small sample, has the characteristics of high training speed, strong robustness and the like, and is basically not disturbed by multiple collinearity of input data. The GRNN neural network prediction model is composed of an input layer, a mode layer, a summation layer and an output layer, wherein an input vector X of the GRNN neural network prediction model is an n-dimensional vector, and a network output vector Y is a k-dimensional vector X ═ X1,x2,…,xn}TAnd Y ═ Y1,y2,…,yk}T. The number of neurons in the mode layer is equal to the number m of training samples, each neuron corresponds to a training sample one by one, and the transfer function p of the neurons in the mode layeriComprises the following steps:
pi=exp{-[(x-xi)T(x-xi)]/2σ},(i=1,2,…,m) (14)
the neuron outputs in the above formula enter a summation layer for summation, and the summation layer functions are divided into two types, which are respectively:
wherein, yijThe jth element value in the vector is output for the ith training sample. According to the GRNN neural network temperature prediction model algorithm, the estimated value of the jth element of the network output vector Y is:
yj=sNj/sD,(j=1,2,…k) (17)
j is 1, a GRNN neural network prediction model is built on the basis of mathematical statistics, the implicit mapping relation can be approached according to the sample data of the greenhouse environment temperature historical data of the granary, the output result of the network can be converged on an optimal regression surface, and particularly, a satisfactory prediction effect can be obtained under the condition that the sample data of the greenhouse environment temperature historical data of the granary is rare. The GRNN has strong prediction capability and high learning speed, is mainly used for solving the problem of function approximation and has high parallelism in the aspect of structure. The input layer, the mode layer, the summation layer and the output layer of the GRNN neural network prediction model are respectively 20 nodes, 30 nodes, 10 nodes and 1 node, the output layer of the 3 GRNN neural network prediction models is a predicted value of a triangular fuzzy number output by the multipoint temperature fusion model of the greenhouse environment of the granary, and the input layer is historical data of the triangular fuzzy number output by the multipoint temperature fusion model of the greenhouse environment of the granary.
② GM (1, 1) prediction model design
The outputs of the GRNN neural network prediction model 1, the GRNN neural network prediction model 2 and the GRNN neural network prediction model 3 are respectively the inputs of a GM (1, 1) prediction model 1, a GM (1, 1) prediction model 2 and a GM (1, 1) prediction model 3, the outputs of the GM (1, 1) prediction model 1, the GM (1, 1) prediction model 2 and the GM (1, 1) prediction model 3 are respectively used as the predicted values of the temperature triangular fuzzy values output by the detected multipoint temperature fusion model of the barn greenhouse environment, and the predicted values of the temperature triangular fuzzy values are used as the outputs of a temperature triangular fuzzy number prediction module;
the 3 GM (1, 1) prediction models are a modeling process of predicting triangular fuzzy numbers of the greenhouse environment temperature of the granary after respectively accumulating the historical data output by the irregular GRNN neural network prediction model 1, the GRNN neural network prediction model 2 and the GRNN neural network prediction model 3 to obtain a data sequence with stronger regularity, and accumulating and subtracting the data obtained by the 3 GM (1, 1) prediction models for generating the lower limit value, the maximum possible value and the upper limit value of the greenhouse environment temperature of the granary to obtain the prediction value of the original data. Assuming that the historical data of the GM (1, 1) prediction model 1 to be predicted to be the GRNN neural network prediction model 1 is as follows:
x(0)=(x(0)(1),x(0)(2),…x(0)(n)) (18)
the new sequence generated after the first order accumulation is: x is the number of(1)=(x(1)(1),x(1)(2),…x(1)(n))
x is then(1)The sequence has an exponential growth law, i.e. satisfies the first order linear differential equation:
a in the formula becomes the development gray number, which reflects x(1)And x(0)The development trend of (1); u is the endogenous control gray number, and reflects the change relationship among data. Solving the differential equation of the above equation to obtain x(1)The prediction value of the lower limit value of the greenhouse environment temperature of the granary is as follows:
obtaining the original sequence x by the cumulative reduction of the following formula(0)The grey prediction model of the lower limit value of the greenhouse environment temperature of the granary is as follows:
the lower limit value of the triangular fuzzy value of the greenhouse environment temperature of the granary can be predicted by constructing a GM (1, 1) prediction model 1, after the lower limit value of the triangular fuzzy value of the greenhouse environment temperature of the granary is predicted for 1 time to obtain the lower limit value of the triangular fuzzy value of the greenhouse environment temperature of the new granary, the new lower limit value data is added into the original data sequence, the lower limit value of the triangular fuzzy value of the oldest greenhouse environment temperature of the granary in the original sequence is removed, and the new sequence is formed and used as the original sequence to repeatedly establish the GM (1, 1) prediction model 1. Repeating the steps, and sequentially supplementing until the lower limit value prediction target of the triangular fuzzy value of the greenhouse environment temperature of the granary is finished, namely the prediction model 1 of the gray metabolism GM (1, 1). The method for constructing the metabolism GM (1, 1) prediction model 2 and the metabolism GM (1, 1) prediction model 3 for predicting the potential value and the upper limit value of the greenhouse ambient temperature of the granary respectively is similar to the modeling of the metabolism GM (1, 1) prediction model 1.
Safe and intelligent evaluation device for environment of granary
The intelligent evaluation device for the environmental safety of the granary consists of a DRNN neural network granary prediction model and a fuzzy least square support vector machine granary environmental safety classifier, a language variable for evaluating the safety level of the environmental factors of the granary to be detected and a corresponding relation table of 5 different triangular fuzzy numbers are established according to different influences of the environmental temperature, the humidity, the moisture and the granary on the quality of the grain in the grain storage process, and the fuzzy least square support vector machine granary environmental safety classifier is used for safely classifying the environmental factors of the granary to be detected into 5 classes of environmental factors, namely good granary environmental factors, normal granary environmental factors, poor granary environmental factors and poor granary environmental factors; the output of the fuzzy least square support vector machine granary environment safety classifier is a triangular fuzzy numerical value representing the grade of the granary environment factor, the similarity between the output of the fuzzy least square support vector machine granary environment safety classifier and 5 triangular fuzzy numbers representing the grade of the detected granary environment 5 granary environment factors is calculated respectively, wherein the grade of the granary environment factor corresponding to the triangular fuzzy number with the maximum similarity is the grade of the detected granary environment factor at present.
Firstly, DRNN neural network grain insect prediction model
The DRNN neural network grain insect prediction model is a dynamic regression neural network with feedback and the ability of adapting to time-varying characteristics, the network can more directly and vividly reflect the dynamic change performance of the quantity of grain insects and can more accurately predict the quantity of the grain insects, and the hidden layer of the DRNN neural network 3-7-1 layer-network structure of the DRNN neural network grain insect prediction model is a regression layer. In the DRNN neural network grain insect prediction model, I is set as [ I ]1(t),I2(t),…,In(t)]Inputting a vector for the network, wherein Ii(t) historical data of granary pestsThe input of the ith neuron of the DRNN neural network input layer of the DRNN neural network grain insect prediction model at the time t and the output of the jth neuron of the regression layer are Xj(t),Sj(t) is the sum of the j-th regression neuron inputs, f (-) is a function of S, and O (t) is the output of the DRNN network. The output layer of the DRNN neural network grain insect prediction model is as follows:
the output of the DRNN neural network grain insect prediction model is a prediction numerical value representing the grain insect in the greenhouse environment of the granary.
② fuzzy least square support vector machine granary environment safety classifier
According to the influence of 4 environmental factors including the temperature, the humidity and the moisture of the greenhouse environment of the detected granary and the forecast value of the greenhouse environment of the granary on the quality of grains stored in the granary, establishing a corresponding relation table of linguistic variables for evaluating the grade of the 4 environmental factors of the greenhouse environment of the detected granary and 5 different triangular fuzzy numbers, and dividing the 4 environmental factors of the greenhouse environment of the detected granary into 5 grades including good environmental factors, normal environmental factors, poor environmental factors and poor environmental factors; the granary greenhouse environment factor fuzzy least square support vector machine granary environment safety classifier carries out grade evaluation on greenhouse environment factors influencing the quality of the granary, the output of the granary greenhouse environment factor fuzzy least square support vector machine granary environment safety classifier is a triangular fuzzy numerical value representing the grade of the environment factors, the similarity between the output of the granary greenhouse fuzzy least square support vector machine granary environment safety classifier and 5 triangular fuzzy numbers representing the grade of the detected granary greenhouse environment 5 environment factors is respectively calculated, wherein the environment factor grade corresponding to the triangular fuzzy number with the maximum similarity is the current environment factor grade of the detected granary greenhouse environment. Input temperature triangle fuzzy number predicted value clarity value x1, humidity triangle fuzzy number predicted value clarity value x2 and water three of fuzzy least squares support vector machine granary environment safety classifierThe clear value x3 of the predicted value of the angular fuzzy number, the predicted value x4 of the grainworm, and the fuzzy membership u (x)iX) is a very important problem, which often directly affects the accuracy of the fuzzy least square support vector machine granary environment safety classifier, the determination of the membership degree is based on the relative importance of the classifier in the class, the patent measures the membership degree based on the distance from the sample to the class center, the closer the sample is to the class center, the larger the membership degree is, and the smaller the membership degree is otherwise, namely the membership function is:
wherein: n isjTo the number of sample points belonging to class j,>0 prevents the membership function value from being zero. In the fuzzy least squares support vector machine, 0 < mu (x)k) The fuzzy preselection rule after the characteristic parameters of the environmental safety state of the granary are fuzzified is represented by less than or equal to 1, and the reliability degree of the sample belonging to a certain class is measured; meanwhile, in the training process of the least square support vector machine, the weight effect of each training data on the learning of the least square support vector machine is different. By fuzzy membership, the output of the fuzzy least square support vector machine granary environmental safety classifier is a triangular fuzzy number representing the granary environmental safety level, and the output value ymComprises the following steps:
wherein x ═ x
1,x
2,…x
4],
σ is a nuclear parameter, and m is 3. The fuzzy least squares support vector machine granary environment safety classifier is shown in fig. 6. According to the influence of the detected greenhouse environment factors on the quality of the grain stored in the granary, a language variable and triangular fuzzy number corresponding relation table of 5 environment factor grades for evaluating the detected greenhouse environment factors of the granary is established, and the table is shown in table 1.
5. Design example of granary environmental parameter detection system
According to the condition of the granary environment, a plane layout installation diagram of a detection node 1 and a field monitoring terminal 2 is arranged in the system, wherein the detection node 1 is arranged in each grain region grain pile of the detected granary environment in a balanced mode, a temperature sensor and a moisture sensor of each detection point are respectively arranged at the height positions of 1/4,2/4 and 3/4 of each grain region grain pile, a humidity sensor is hung at the position 10cm above each grain region grain pile, the plane layout of the whole system is shown in figure 7, and the collection of granary environment parameters and the classification of the safety level of the granary environment are achieved through the system.
The technical means disclosed in the invention scheme are not limited to the technical means disclosed in the above embodiments, but also include the technical scheme formed by any combination of the above technical features. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present invention, and such improvements and modifications are also considered to be within the scope of the present invention.