An intelligent breeding system for livestock and poultry feeding and environmental monitoring based on the Internet of Things
Through the Internet of Things intelligent breeding system, combined with multiple neural network models and controllers, the complex problems of temperature changes and environmental monitoring of livestock and poultry feeding devices are solved, efficient temperature control and environmental management are achieved, and the production of livestock and poultry breeding is improved. Efficiency and economic benefits.
Patent Information
- Application Number
- CN202410596817.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-14
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-05-14
AI Technical Summary
The existing livestock and poultry feeding devices and environmental monitoring systems have problems with low degree of automation, informatization and intelligence, especially the nonlinear and large hysteresis impacts on the temperature changes of the feeding device are difficult to effectively deal with, and environmental parameter monitoring is complex.
The Internet of Things intelligent breeding system is adopted, combined with PSO's NARX neural network model, PID controller, PSO's ESN neural network model and recursive fuzzy neural network model, to build a composite control system for feeding temperature control, and through livestock and poultry feeding terminals and The two-way communication platform of the environmental terminal monitors and manages environmental parameters in real time.
It improves the accuracy and stability of feeding temperature control, enhances the real-time monitoring and management capabilities of livestock and poultry house environment, and improves the production efficiency and economic benefits of breeding.
Smart Images

Figure CN118525761B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent livestock and poultry feeding devices and automated equipment for environmental monitoring, and in particular to an intelligent breeding system for livestock and poultry feeding and environmental monitoring of the Internet of Things. Background Art
[0002] Livestock and poultry farming has the dual characteristics of high efficiency and high benefits, and occupies a very important position in modern agriculture. Livestock and poultry farming is one of the important industries for economic development in countries around the world. However, livestock and poultry farming in my country is still in the extensive development stage at this stage. Compared with developed countries, there are still problems such as low automation, low scale of farming and backward feeding management. Intensification, informatization and intelligence are the inevitable trends in the development of modern animal husbandry. As livestock and poultry farming methods gradually change from traditional farming to smart digital farming, livestock and poultry feeding, as a key link in livestock and poultry farming, has attracted widespread attention at home and abroad for its intelligent devices. In view of the low automation, informatization and intelligence of current feeding devices and livestock and poultry house environmental monitoring systems, an intelligent farming system for livestock and poultry feeding and environmental monitoring based on the Internet of Things is invented, which can effectively improve feeding production efficiency and economic benefits and improve the growth environment, which is of great significance to the development of my country's livestock and poultry industry. Summary of the invention
[0003] Purpose of the invention: The present invention provides an intelligent breeding system for livestock and poultry feeding and environmental monitoring based on the Internet of Things, which effectively solves the problems of the existing feeding not being affected by the nonlinearity and large hysteresis of the temperature change of the feeding device and the large and complex feeding environment area on the temperature parameters of the feeding device. At the same time, the breeding environment parameters of livestock and poultry houses are monitored to realize intelligent breeding.
[0004] Technical solution: The present invention discloses an intelligent breeding system for livestock and poultry feeding and environmental monitoring based on the Internet of Things, the system comprising a feeding temperature control subsystem;
[0005] The feeding temperature control subsystem includes a NARX neural network model of PSO, a PID controller, an ESN neural network model of PSO, a feeding temperature controller and a recursive fuzzy neural network model of PSO-NARX neural network model of PSO;
[0006] The feeding temperature set value and the temperature prediction value output by the recursive fuzzy neural network model of PSO-NARX neural network model 2 of PSO are respectively used as the corresponding inputs of the NARX neural network model 1 of PSO, the error and error change rate of the temperature disturbance output by the NARX neural network model 1 of PSO and the NARX neural network model 2 of PSO are used as the inputs of the feeding temperature controller, the output of the feeding temperature controller is respectively used as the corresponding inputs of the NARX neural network model 1 of PSO-NARX neural network model and the inputs of the NARX neural network model 2 of PSO, the output of the NARX neural network model 2 of PSO is used as the corresponding inputs of the NARX neural network model 1 of PSO, the error and error change rate of the feeding temperature set value and the temperature sensor output are used as the inputs of the PID controller. The PID controller output is used as the corresponding input of the recursive fuzzy neural network model of PSO-NARX neural network model 1 of PSO and the input of the ESN neural network model of PSO respectively. The output of the ESN neural network model of PSO is used as the corresponding input of the recursive fuzzy neural network model of PSO-NARX neural network model 1 of PSO. The output of the recursive fuzzy neural network model of PSO-NARX neural network model 1 of PSO is used as the corresponding input of the recursive fuzzy neural network model of PSO-NARX neural network model 2 of PSO, the corresponding input of the recursive fuzzy neural network model of PSO-NARX neural network model 1 of PSO and the input of the feeding device. The temperature sensor output is used as the corresponding input of the recursive fuzzy neural network model of PSO-NARX neural network model 2 of PSO. The temperature sensor measures the actual temperature value of the feeding device. See the feeding temperature controller for details. Figure 2 shown.
[0007] Further, the feeding temperature controller includes a NARX neural network model of PSO, a recursive fuzzy neural network model of PSO, a PID controller and an ESN neural network model of PSO; the error and error change rate of the feeding temperature controller input are respectively used as the corresponding inputs of the NARX neural network model of PSO, the recursive fuzzy neural network model of PSO, the PID controller and the ESN neural network model of PSO, the output of the NARX neural network model of PSO is respectively used as the corresponding input of the recursive fuzzy neural network model of PSO and the ESN neural network model of PSO, the output of the recursive fuzzy neural network model of PSO is used as the input of Kp, Ki and Kd of the PID controller and the corresponding input of the recursive fuzzy neural network model of PSO, the output of the ESN neural network model of PSO is used as the corresponding input of the ESN neural network model of PSO, the cumulative sum of the output of the PID controller and the output of the ESN neural network model of PSO is used as the output of the feeding temperature controller, and the feeding temperature control subsystem is shown in FIG. Figure 1 shown.
[0008] Furthermore, the system also includes a feeding and livestock and poultry house environment monitoring platform, which is composed of a livestock and poultry feeding terminal, a livestock and poultry breeding environment terminal, a livestock and poultry breeding information concentrator, a livestock and poultry breeding monitoring terminal, a livestock and poultry breeding cloud platform server and a livestock and poultry breeding mobile phone APP. The livestock and poultry breeding information concentrator uploads the livestock and poultry feeding parameters and environmental parameters of the livestock and poultry feeding terminal and the livestock and poultry breeding environment terminal to the livestock and poultry breeding cloud platform server. The livestock and poultry breeding cloud platform server is responsible for storing and publishing livestock and poultry feeding and livestock and poultry house environment information. The livestock and poultry breeding mobile phone APP The livestock and poultry feeding and environmental information provided by the breeding cloud platform server monitors the livestock and poultry feeding process and environmental parameters in real time. The livestock and poultry feeding terminal monitors the livestock and poultry feeding process. The livestock and poultry breeding environment terminal monitors the environmental parameters of the livestock and poultry house and the environmental equipment of the poultry house. The livestock and poultry breeding information concentrator realizes two-way communication between the livestock and poultry feeding terminal, the livestock and poultry breeding environment terminal, the livestock and poultry breeding monitoring terminal, the livestock and poultry breeding cloud platform server and the livestock and poultry breeding mobile phone APP, realizes the collection of livestock and poultry feeding devices and livestock and poultry house environmental parameters and the monitoring of livestock and poultry house equipment. See the feeding and livestock and poultry house environment monitoring platform Figure 3 shown.
[0009] Furthermore, the feeding temperature control subsystem is provided on the livestock and poultry breeding monitoring terminal.
[0010] Furthermore, the livestock and poultry feeding terminal includes an STM32 microprocessor, a camera, an RFID module, a temperature sensor, a liquid level sensor, a weighing sensor and corresponding conditioning circuits, and also includes a feeding and discharging motor, a stirring and flushing motor and a LoRa communication module to collect video images of the livestock and poultry feeding process and monitor the feeding process, livestock and poultry electronic ear tag information, temperature, feed intake, livestock and poultry weight, and weighing troughs, and to exchange information with the livestock and poultry breeding information concentrator through the LoRa communication module.
[0011] Furthermore, the livestock and poultry breeding environment terminal includes sensors for collecting the temperature, humidity, wind speed, light intensity, ammonia, carbon dioxide and hydrogen sulfide of the livestock and poultry house breeding environment and corresponding signal conditioning circuits, and also includes a heater, a humidifier, a fan, a harmful gas purification device, an STM32 microprocessor and a LoRa communication module; the heater, humidifier, fan, and harmful gas purification device are respectively used to adjust the temperature, humidity, wind speed and harmful gas concentration of the livestock and poultry house environment.
[0012] Furthermore, the livestock and poultry breeding information concentrator includes a LoRa communication module, a wireless communication module, an STM32 microprocessor, an alarm device and a USB interface; a self-organizing communication network is constructed between the livestock and poultry feeding terminal and the livestock and poultry breeding environment terminal through the LoRa communication module, the wireless communication module realizes two-way data interaction between the livestock and poultry breeding information concentrator and the livestock and poultry breeding cloud platform server, and the USB interface is connected to the livestock and poultry breeding monitoring terminal to realize information interaction between the livestock and poultry breeding information concentrator and the livestock and poultry breeding monitoring terminal.
[0013] Compared with the prior art, the present invention has the following obvious advantages:
[0014] 1. The PSO ESN neural network model of the present invention designs its network hidden layer into a sparse network composed of many neurons, and achieves the function of memorizing livestock and poultry breeding data by adjusting the characteristics of the internal weights of the network. Its internal dynamic reserve pool contains a large number of sparsely connected neurons, which contains the operating status of the PSO ESN neural network model and has the function of short-term memory of livestock and poultry breeding data. The stability of the recursive network inside the reserve pool is ensured by presetting the spectral radius of the internal connection weight matrix of the PSO ESN neural network model, thereby improving the stability and accuracy of the PSO ESN neural network model output predicting livestock and poultry breeding data values.
[0015] 2. The current state of the reserve pool of the ESN neural network model of the PSO of the present invention inherits the state of the livestock and poultry breeding data at the previous moment, and has a short-term memory characteristic for the input livestock and poultry breeding data history data. As a new type of dynamic recursive neural network, the ESN neural network model of the PSO adopts the linear regression method to establish the model, avoiding the problems of slow convergence speed and easy to fall into local minimum of traditional neural networks, simplifying the complexity of the training process, and achieving the purpose of high-precision prediction of input livestock and poultry breeding parameters.
[0016] 3. The NARX neural network model of PSO adopted in the present invention is a dynamic recursive network that establishes the NARX neural network model of PSO through a delay module and feedback. It is a data correlation modeling idea that realizes the function simulation function by expanding multiple livestock and poultry breeding time series values along the time axis direction of the input livestock and poultry breeding parameters of the NARX neural network model of PSO. The method establishes the NARX neural network model of PSO by inputting livestock and poultry breeding parameters for a period of time. The output of the NARX neural network model of PSO is used as input in the feedback effect, and the closed-loop training improves the accuracy of the calculated livestock and poultry breeding parameters of the NARX neural network model of PSO. The NARX neural network model of PSO realizes continuous dynamic prediction of the input livestock and poultry breeding parameters. The input includes a period of livestock and poultry breeding parameter delay as input and output historical feedback. This part of the feedback input can be considered to include a period of livestock and poultry breeding historical information participating in the input livestock and poultry breeding parameter prediction. For a suitable feedback time length, the prediction has a good effect.
[0017] 4. The present invention uses the NARX neural network model of PSO to establish a prediction model for input livestock and poultry breeding parameters. Since a dynamic recursive network for input livestock and poultry breeding parameters is established by introducing an input livestock and poultry breeding parameter delay module and output feedback, it introduces the input delay module output as input and NARX neural network output vector delay feedback into the NARX neural network model training of PSO to form a new input livestock and poultry breeding parameter vector, and has good nonlinear mapping ability. The input livestock and poultry breeding parameters of the NARX neural network model of PSO include not only the original input livestock and poultry breeding data, but also the trained output livestock and poultry breeding data. The generalization ability of the network is improved, so that it has better prediction accuracy and adaptability in the time series prediction of nonlinear input livestock and poultry breeding parameters than traditional static neural networks.
[0018] 5. The feeding temperature controller of the present invention comprises a composite control system composed of the NARX neural network model of PSO, the recursive fuzzy neural network model of PSO, the PID controller and the ESN neural network model of PSO to realize intelligent control of the temperature of the feeding device. The controller intelligently adjusts the parameters of the PID controller through the NARX neural network model of PSO and the recursive fuzzy neural network model of PSO. The NARX neural network model of PSO and the ESN neural network model of PSO constitute feedforward compensation control. The output of the PID controller is combined with the feedforward compensation control and used as the output of the feeding temperature controller to improve the rapidity, robustness, reliability and accuracy of the feeding temperature controller. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is the feeding temperature control subsystem of this patent;
[0020] Figure 2 It is the feeding temperature controller of this patent;
[0021] Figure 3 It is the feeding and livestock and poultry house environment monitoring platform of this patent;
[0022] Figure 4 It is the livestock and poultry feeding terminal of this patent;
[0023] Figure 5 It is the livestock and poultry breeding environment terminal of this patent;
[0024] Figure 6 This is the livestock and poultry breeding information concentrator of this patent;
[0025] Figure 7 This is the patented livestock and poultry breeding monitoring software. DETAILED DESCRIPTION
[0026] Combined with Figure 1-7 , the technical solution of the present invention is further described:
[0027] 1. Design of overall system functions
[0028] The feeding and livestock and poultry house environment monitoring platform consists of livestock and poultry feeding terminals, livestock and poultry breeding environment terminals, livestock and poultry breeding information concentrators, livestock and poultry breeding monitoring terminals, livestock and poultry breeding cloud platform servers and livestock and poultry breeding mobile phone APPs. The livestock and poultry feeding terminals and livestock and poultry breeding environment terminals monitor livestock and poultry feeding parameters and environmental parameters, which are uploaded to the livestock and poultry breeding cloud platform servers through the livestock and poultry breeding information concentrators. The livestock and poultry breeding cloud platform servers store livestock and poultry feeding data and publish information. The livestock and poultry breeding mobile phone APP can monitor the livestock and poultry feeding process and environmental parameters in real time through the livestock and poultry feeding and environmental information provided by the livestock and poultry breeding cloud platform servers. The livestock and poultry feeding terminals monitor the livestock and poultry feeding process, and the livestock and poultry breeding environment terminals are responsible for collecting livestock and poultry house environmental parameters and controlling livestock and poultry house environmental equipment. The livestock and poultry breeding information concentrator realizes two-way communication between livestock and poultry feeding terminals, livestock and poultry breeding environment terminals, livestock and poultry breeding monitoring terminals, livestock and poultry breeding cloud platform servers and livestock and poultry breeding mobile phone APPs, and realizes the collection of livestock and poultry feeding devices and livestock and poultry house environmental parameters and the monitoring of livestock and poultry house equipment. See Feeding and Livestock and Poultry House Environment Monitoring Platform Figure 3 shown.
[0029] 2. Design of livestock and poultry feeding terminal
[0030] The livestock and poultry feeding terminal includes an STM32 microprocessor, a camera, an RFID module, a temperature sensor, a liquid level sensor, a weighing sensor and corresponding conditioning circuits, a feeding and discharging motor, a stirring and flushing motor and a LoRa communication module. The livestock and poultry feeding terminal collects livestock and poultry weight, livestock and poultry electronic ear tag information, weighing troughs, feed intake and video images of the livestock and poultry feeding process and monitors the feeding process, and exchanges information with the livestock and poultry breeding information concentrator through the LoRa communication module. Figure 4 The camera is used to collect video images of the livestock and poultry feeding process and monitor the feeding process. The RFID module is used to collect the electronic ear tag information of the livestock and poultry. The temperature sensor is used to collect the feed temperature of the trough. The liquid level sensor is used to collect the feed intake, etc. The weighing sensor is used to collect the weight of the livestock and poultry and weigh the trough. The feeding and discharging motors are used to control the feeding action of the livestock and poultry feeding terminal. The stirring and flushing motors can stir the feed in the trough and flush the trough.
[0031] 3. Terminal design of livestock and poultry breeding environment
[0032] A large number of livestock and poultry breeding environment terminals based on self-organizing communication networks of LoRa communication modules are used as livestock and poultry breeding environment parameter monitoring terminals. The livestock and poultry breeding environment terminals realize information interaction with the livestock and poultry breeding information concentrator through the self-organizing communication network. The livestock and poultry breeding environment terminal includes sensors for collecting the temperature, humidity, wind speed, light intensity, ammonia, carbon dioxide and hydrogen sulfide of the livestock and poultry breeding environment and corresponding signal conditioning circuits, heaters, humidifiers, fans, harmful gas purification devices, STM32 microprocessors and LoRa modules. The heater, humidifier, fan, and harmful gas purification device are used to adjust the temperature, humidity, wind speed and harmful gas concentration of the livestock and poultry house environment respectively. The software of the livestock and poultry breeding environment terminal mainly realizes self-organizing network communication and the collection and control of livestock and poultry house environmental parameters. The software is designed with C language programming and has a high degree of compatibility, which greatly improves the work efficiency of software design and development, and enhances the reliability, readability and portability of the program code. The structure of the livestock and poultry breeding environment terminal can be seen in Figure 5 .
[0033] 4. Design of livestock and poultry breeding information concentrator
[0034] The livestock and poultry breeding information concentrator includes a LoRa communication module, a wireless communication module, an STM32 microprocessor, an alarm device and a USB interface. The livestock and poultry breeding information concentrator uses the LoRa communication module to build a self-organizing communication network between the livestock and poultry feeding terminal and the livestock and poultry breeding environment terminal. The wireless communication module realizes the two-way data interaction between the livestock and poultry breeding information concentrator and the livestock and poultry breeding cloud platform server. The USB interface connects the livestock and poultry breeding monitoring terminal to realize the information interaction between the livestock and poultry breeding information concentrator and the livestock and poultry breeding monitoring terminal. Figure 6 .
[0035] 5. Software design for livestock and poultry breeding monitoring
[0036] The livestock and poultry breeding monitoring terminal is an industrial control computer. It mainly collects and controls the parameters of livestock and poultry feeding and environment, and realizes information exchange with the livestock and poultry breeding information concentrator. The main functions of the livestock and poultry breeding monitoring terminal are livestock and poultry breeding communication parameter setting, livestock and poultry breeding data analysis and livestock and poultry breeding data management, and feeding temperature control subsystem. See the feeding temperature control subsystem Figure 1 , the functions of livestock and poultry breeding monitoring software can be found in Figure 7 The feeding temperature control subsystem includes the ESN neural network model of PSO, the feeding temperature controller, the PID controller, the NARX neural network model of PSO and the recursive fuzzy neural network model of PSO - the NARX neural network model of PSO.
[0037] The feeding temperature set value and the temperature prediction value output by the recursive fuzzy neural network model of PSO-NARX neural network model 2 of PSO are respectively used as the corresponding inputs of the NARX neural network model 1 of PSO, the error and error change rate of the temperature disturbance output by the NARX neural network model 1 of PSO and the NARX neural network model 2 of PSO are used as the inputs of the feeding temperature controller, the output of the feeding temperature controller is respectively used as the corresponding inputs of the NARX neural network model 1 of PSO-PSO and the inputs of the NARX neural network model 2 of PSO, the output of the NARX neural network model 2 of PSO is used as the corresponding inputs of the NARX neural network model 1 of PSO-PSO, the error and error change rate of the feeding temperature set value and the temperature sensor output are used as the PID The input of the controller and the output of the PID controller are respectively used as the corresponding input of the recursive fuzzy neural network model of PSO-NARX neural network model 1 of PSO and the input of the ESN neural network model of PSO, the output of the ESN neural network model of PSO is used as the corresponding input of the recursive fuzzy neural network model of PSO-NARX neural network model 1 of PSO, the output of the recursive fuzzy neural network model of PSO-NARX neural network model 1 of PSO is used as the corresponding input of the recursive fuzzy neural network model of PSO-NARX neural network model 2 of PSO, the corresponding input of the recursive fuzzy neural network model of PSO-NARX neural network model 1 of PSO and the input of the feeding device, the output of the temperature sensor is used as the corresponding input of the recursive fuzzy neural network model of PSO-NARX neural network model 2 of PSO, and the temperature sensor measures the actual temperature value of the feeding device.
[0038] The designs of each model are as follows:
[0039] 1. Design of ESN neural network model of PSO
[0040] The ESN neural network model (Echo state network, ESN) of PSO is a new type of dynamic neural network, which has all the advantages of dynamic neural networks. At the same time, because the echo state network introduces the concept of "reserve pool", this method can better adapt to nonlinear system identification than general dynamic neural networks. The "reserve pool" is to transform the middle connection part of the traditional dynamic neural network into a randomly connected "reserve pool". The whole learning process is actually the process of learning how to connect the "reserve pool". The "reserve pool" is actually a randomly generated large-scale recursive structure in which the neurons are sparsely connected. SD is usually used to represent the percentage of interconnected neurons in the total neurons N. The state equation of the ESN neural network model of PSO is:
[0041]
[0042] Where W is the state variable of the neural network, W in is the input variable of the neural network; W back is the output state variable connection weight matrix of the neural network; x(n) represents the internal state of the neural network; W out is the connection weight matrix between the core reserve pool of the ESN neural network model of PSO, the input of the neural network and the output of the neural network; is the output deviation of the neural network or can represent noise; f = f[f 1 ,f 2 ,…,f n ] is the n activation functions of the neurons inside the “reserve pool”; f i is the hyperbolic tangent function; f out is the ε output function of the PSO ESN neural network model. The outputs of multiple PSO ESN neural network models are the predicted values of multiple types of time-delay neural network models.
[0043] The steps of optimizing the ESN neural network model for PSO are as follows: ① Initialize the particle population, set the number of iterations, particle dimension, PSO ESN neural network model parameters and group size, and randomly generate a set of parameters as the particle initial solution space position and initial velocity; ② Use the PSO ESN neural network model corresponding to the particle to predict the test sample and evaluate the fitness. ③ For each particle, compare the fitness value of its best experienced Pbest with the fitness value of the best position Gbest experienced by the group. If it is better than Pbest and Gbest, update Pbest and Gbest, otherwise keep the original data; ④ After the calculation of the entire group of particles, determine whether the termination condition is met. If not, update the particles, generate a new particle group, and return to step ②; If the maximum number of iterations or the end condition is met, the calculation ends and the calculation results are output.
[0044] 2. Design of feeding temperature controller
[0045] The feeding temperature controller includes the NARX neural network model of PSO, the recursive fuzzy neural network model of PSO, the PID controller and the ESN neural network model of PSO. Figure 2 The error and error change rate of the feeding temperature controller input are used as the corresponding inputs of the NARX neural network model of PSO, the recursive fuzzy neural network model of PSO, the PID controller and the ESN neural network model of PSO respectively; the outputs of the NARX neural network model of PSO are used as the corresponding inputs of the recursive fuzzy neural network model of PSO and the ESN neural network model of PSO respectively; the output of the recursive fuzzy neural network model of PSO is used as the inputs of Kp, Ki and Kd of the PID controller and the corresponding input of the recursive fuzzy neural network model of PSO; the output of the ESN neural network model of PSO is used as the corresponding input of the ESN neural network model of PSO; and the cumulative sum of the outputs of the PID controller and the ESN neural network model of PSO is used as the output of the feeding temperature controller.
[0046] The design method of the ESN neural network model of PSO refers to the relevant design process of this patent.
[0047] (1) Design of NARX neural network model of PSO
[0048] The NARX neural network model of PSO is a nonlinear autoregressive neural network with external input livestock and poultry breeding parameters. Compared with other neural networks, it is a feedback mode from output to input that uses neurons connected in a cross-scale manner. At the same time, it has input delay and output delay of livestock and poultry breeding parameters, so that the NARX neural network model of PSO has the ability to short-term memory of livestock and poultry breeding parameters, and increases the memory function of historical data of livestock and poultry breeding parameters. It is suitable for nonlinear prediction of livestock and poultry breeding parameters with obvious time-varying characteristics. According to the functionality of the NARX neural network model of PSO, it can be divided into a training stage and a prediction stage when predicting future livestock and poultry breeding parameter time series data, and the corresponding livestock and poultry breeding original data will also be divided into a training set and a test set. The structure of the NARX neural network model of PSO corresponds to an open-loop structure and a closed-loop structure according to the training stage and the prediction stage. After training, the NARX neural network model of PSO obtains an accurate mapping relationship between the input and output of livestock and poultry breeding parameters, and converts the open-loop structure into a closed-loop structure to achieve multi-step prediction based on the initial input information of a few livestock and poultry breeding parameters. The NARX neural network model of PSO feeds back the predicted livestock and poultry breeding parameter output to the input and provides support for the next prediction as historical data. The mathematical model expression of the closed-loop structure is as follows:
[0049] y(t)=f(y(t-1),…,y(tn y ),x(t-1),…,x(tn x )) (2)
[0050] Where x and y are the livestock and poultry breeding parameter input and output values of the NARX neural network model of PSO respectively; n x is the input delay; n y is the output delay; f is the nonlinear activation function of the NARX neural network model of the PSO; y(t) is the predicted value of the NARX neural network model of the PSO.
[0051] The steps of optimizing the NARX neural network model for PSO based on the particle swarm algorithm (PSO) are as follows: ① Initialize the particle population, set the number of iterations, particle dimension, NARX neural network model parameters and group size, and randomly generate a set of parameters as the particle initial solution space position and initial velocity; ② Use the NARX neural network model of PSO corresponding to the particle to predict the test sample and evaluate the fitness. ③ For each particle, compare the fitness value of its best experienced Pbest with the fitness value of the best position Gbest experienced by the group. If it is better than Pbest and Gbest, update Pbest and Gbest, otherwise keep the original data; ④ After the calculation of the entire group of particles, determine whether the termination condition is met. If not, update the particles, generate a new particle group, and return to step ②; If the maximum number of iterations or the end condition is met, the calculation ends and the calculation results are output.
[0052] (2) Design of PSO recursive fuzzy neural network model
[0053] The recursive fuzzy neural network model of PSO consists of an input layer, a membership function layer, a rule layer, a defuzzification layer, and an output layer. The input layer has n neurons representing n input livestock and poultry breeding parameter variables. The output of this layer is equal to the livestock and poultry breeding parameter input:
[0054] a i (t) = x i (t), i=1,2,…,n (3)
[0055] The membership function layer uses Gaussian function as the membership function to fuzzy process the input livestock and poultry breeding parameter variables. The output of each node represents the membership value of the corresponding livestock and poultry breeding parameter input:
[0056]
[0057] where u ij (t) is the output of the jth membership function corresponding to the i-th livestock and poultry breeding parameter input at time t, c ij (t) and σ ij (t) are the center and width of the corresponding membership function. Each neuron in the rule layer represents a fuzzy rule. At the same time, a recursive link is introduced in this layer. The output of the rule layer at the previous moment is used as a feedback input of the rule layer at the current moment through the sigmoid function. The neuron output is:
[0058]
[0059]
[0060] h j =φj (t-1)λ j (t) (7)
[0061] φ j (t) is the output of the jth regular layer neuron at time t, φ j (t-1) represents the output of the rule layer at the previous moment, f j is the corresponding sigmoid function, h j is an internal variable, λ j is the feedback weight of the recursive link at time t. The number of neurons in the defuzzification layer is the same as that in the rule layer, which is m neurons. The neuron output is:
[0062]
[0063] The output layer is a linear weighted sum of its input:
[0064]
[0065] The steps of recursive fuzzy neural network model based on particle swarm algorithm (PSO) for PSO optimization recursive fuzzy neural network model are as follows: ① Initialize the particle population, set the number of iterations, particle dimension, PSO recursive fuzzy neural network model parameters and group size, and randomly generate a set of parameters as the particle initial solution space position and initial velocity; ② Evaluate the fitness value according to the PSO optimization recursive fuzzy neural network model. ③ For each particle, compare the fitness value of its best experienced Pbest with the fitness value of the best position Gbest experienced by the group. If it is better than Pbest and Gbest, update Pbest and Gbest, otherwise keep the original data; ④ After the calculation of the entire group of particles, determine whether the termination condition is met. If not, update the particles, generate a new particle group, and return to step ②; if the maximum number of iterations or the end condition is met, the calculation ends and the calculation results are output.
[0066] (3) PID controller design
[0067] PID closed-loop control is mainly composed of proportion P, integral I and differential D. The control quantity is calculated through proportion, integral and differential to achieve effective control of livestock and poultry breeding parameters. The important basis of PID controller is proportional control, while integral control can effectively reduce the steady-state error of livestock and poultry breeding parameters, but it is very likely to cause overshoot. Differential control can promote the response speed of large inertia livestock and poultry breeding parameters and effectively reduce overshoot. The relationship between the input and output u(t) of the PID controller is:
[0068]
[0069] Among them, e(t) represents input; u(t) represents output; KP Represents the proportionality coefficient; K I Represents the integral coefficient; K D represents the differential coefficient.
[0070] 3. PSO recursive fuzzy neural network model - PSO NARX neural network model design
[0071] The recursive fuzzy neural network model of PSO-NARX neural network model of PSO is a series connection of the recursive fuzzy neural network model of PSO and the NARX neural network model of PSO. The output of the recursive fuzzy neural network model of PSO is used as the input of the NARX neural network model of PSO. The design process of the recursive fuzzy neural network model of PSO and the NARX neural network model of PSO refers to the relevant design method of this patent.
[0072] The technical means disclosed in the scheme of the present invention are not limited to the technical means disclosed in the above-mentioned implementation mode, but also include technical schemes composed of any combination of the above-mentioned technical features. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications are also regarded as the protection scope of the present invention.
Claims
1. An intelligent breeding system for livestock and poultry feeding and environmental monitoring based on the Internet of Things, characterized by: The system includes a feeding temperature control subsystem; The feeding temperature control subsystem includes a NARX neural network model 1 of PSO, a NARX neural network model 2 of PSO, a PID controller 1, an ESN neural network model 1 of PSO, a feeding temperature controller and a recursive fuzzy neural network model of PSO-NARX neural network model 1 of PSO, and a recursive fuzzy neural network model of PSO-NARX neural network model 2 of PSO; The feeding temperature set value and the temperature prediction value output by the recursive fuzzy neural network model of PSO-NARX neural network model 2 of PSO are respectively used as the corresponding inputs of the NARX neural network model 1 of PSO, the error and error change rate of the temperature disturbance output by the NARX neural network model 1 of PSO and the NARX neural network model 2 of PSO are used as the inputs of the feeding temperature controller, the output of the feeding temperature controller is respectively used as the corresponding inputs of the NARX neural network model 1 of PSO-PSO and the inputs of the NARX neural network model 2 of PSO, the output of the NARX neural network model 2 of PSO is used as the corresponding inputs of the NARX neural network model 1 of PSO, the error and error change rate of the feeding temperature set value and the temperature sensor output are used as the PID control The output of PID controller 1 is used as the corresponding input of the recursive fuzzy neural network model of PSO-NARX neural network model 1 of PSO and the input of ESN neural network model 1 of PSO respectively, the output of ESN neural network model 1 of PSO is used as the corresponding input of the recursive fuzzy neural network model of PSO-NARX neural network model 1 of PSO, the output of the recursive fuzzy neural network model of PSO-NARX neural network model 1 of PSO is used as the corresponding input of the recursive fuzzy neural network model of PSO-NARX neural network model 2 of PSO, the corresponding input of the recursive fuzzy neural network model of PSO-NARX neural network model 1 of PSO and the input of the feeding device, the output of temperature sensor is used as the corresponding input of the recursive fuzzy neural network model of PSO-NARX neural network model 2 of PSO, and the temperature sensor measures the actual temperature value of the feeding device; The feeding temperature controller includes a NARX neural network model 3 of PSO, a recursive fuzzy neural network model of PSO, a PID controller 2 and an ESN neural network model 2 of PSO; the error and the error change rate of the feeding temperature controller input are respectively used as the corresponding inputs of the NARX neural network model 3 of PSO, the recursive fuzzy neural network model of PSO, the PID controller 2 and the ESN neural network model 2 of PSO, the output of the NARX neural network model 3 of PSO is respectively used as the corresponding inputs of the recursive fuzzy neural network model of PSO and the ESN neural network model 2 of PSO, the output of the recursive fuzzy neural network model of PSO is used as the input of the PID controller 2, the output of the recursive fuzzy neural network model of PSO is used as the corresponding input of the recursive fuzzy neural network model of PSO, the output of the ESN neural network model 2 of PSO is used as the corresponding input of the ESN neural network model 2 of PSO, and the cumulative sum of the output of the PID controller 2 and the output of the ESN neural network model 2 of PSO is used as the output of the feeding temperature controller; The PSO recursive fuzzy neural network model is a PSO optimized recursive fuzzy neural network model, which consists of an input layer, a membership function layer, a rule layer, a defuzzification layer, and an output layer. The input layer has n neurons representing n input livestock and poultry breeding parameter variables; the membership function layer uses a Gaussian function as a membership function to fuzzify the input livestock and poultry breeding parameter variables, and the output of each node represents the membership value of the corresponding livestock and poultry breeding parameter input; Each neuron in the rule layer represents a fuzzy rule. At the same time, a recursive link is introduced in the rule layer. The output of the rule layer at the previous moment is used as a feedback input of the rule layer at the current moment through the sigmoid function. The output layer performs linear weighted summation on the input. The recursive fuzzy neural network model of PSO-NARX neural network model of PSO 1 and the recursive fuzzy neural network model of PSO-NARX neural network model of PSO 2 are both the recursive fuzzy neural network model of PSO and the NARX neural network model of PSO connected in series, and the output of the recursive fuzzy neural network model of PSO is used as the input of the NARX neural network model of PSO.
2. According to claim 1, the intelligent breeding system for livestock and poultry feeding and environmental monitoring of the Internet of Things is characterized by: The system also includes a feeding and livestock and poultry house environment monitoring platform, which is composed of a livestock and poultry feeding terminal, a livestock and poultry breeding environment terminal, a livestock and poultry breeding information concentrator, a livestock and poultry breeding monitoring terminal, a livestock and poultry breeding cloud platform server and a livestock and poultry breeding mobile phone APP. The livestock and poultry breeding information concentrator uploads the livestock and poultry feeding parameters and environmental parameters of the livestock and poultry feeding terminal and the livestock and poultry breeding environment terminal to the livestock and poultry breeding cloud platform server. The livestock and poultry breeding cloud platform server is responsible for storing and publishing livestock and poultry feeding and livestock and poultry house environment information. The livestock and poultry breeding mobile phone APP monitors the livestock and poultry feeding process and environmental parameters in real time through the livestock and poultry feeding and environmental information provided by the livestock and poultry breeding cloud platform server. The livestock and poultry feeding terminal monitors the livestock and poultry feeding process, and the livestock and poultry breeding environment terminal monitors the livestock and poultry house environmental parameters and poultry house environmental equipment. The livestock and poultry breeding information concentrator realizes two-way communication among the livestock and poultry feeding terminal, the livestock and poultry breeding environment terminal, the livestock and poultry breeding monitoring terminal, the livestock and poultry breeding cloud platform server and the livestock and poultry breeding mobile phone APP, and realizes the collection of livestock and poultry feeding devices and livestock and poultry house environmental parameters and the monitoring of livestock and poultry house equipment.
3. The intelligent breeding system for livestock and poultry feeding and environmental monitoring of the Internet of Things according to claim 2 is characterized by: The feeding temperature control subsystem is arranged on the livestock and poultry breeding monitoring terminal.
4. The intelligent breeding system for livestock and poultry feeding and environmental monitoring of the Internet of Things according to claim 2 is characterized by: The livestock and poultry feeding terminal includes an STM32 microprocessor, a camera, an RFID module, a temperature sensor, a liquid level sensor, a weighing sensor and corresponding conditioning circuits, as well as a feeding and discharging motor, a stirring and flushing motor and a LoRa communication module. It collects video images of the livestock and poultry feeding process and monitors the feeding process, livestock and poultry electronic ear tag information, temperature, feed intake, livestock and poultry weight, and weighing troughs, and exchanges information with the livestock and poultry breeding information concentrator through the LoRa communication module.
5. The intelligent breeding system for livestock and poultry feeding and environmental monitoring of the Internet of Things according to claim 2 is characterized by: The livestock and poultry breeding environment terminal includes sensors for collecting the temperature, humidity, wind speed, light intensity, ammonia, carbon dioxide and hydrogen sulfide of the livestock and poultry breeding environment and corresponding signal conditioning circuits, and also includes a heater, a humidifier, a fan, a harmful gas purification device, an STM32 microprocessor and a LoRa communication module; the heater, the humidifier, the fan, and the harmful gas purification device are respectively used to adjust the temperature, humidity, wind speed and harmful gas concentration of the livestock and poultry breeding environment.
6. The intelligent breeding system for livestock and poultry feeding and environmental monitoring of the Internet of Things according to claim 3 is characterized by: The livestock and poultry breeding information concentrator includes a LoRa communication module, a wireless communication module, an STM32 microprocessor, an alarm device and a USB interface; a self-organizing communication network is constructed between the livestock and poultry feeding terminal and the livestock and poultry breeding environment terminal through the LoRa communication module, the wireless communication module realizes two-way data interaction between the livestock and poultry breeding information concentrator and the livestock and poultry breeding cloud platform server, and the USB interface is connected to the livestock and poultry breeding monitoring terminal to realize information interaction between the livestock and poultry breeding information concentrator and the livestock and poultry breeding monitoring terminal.
