Prediction Model for Piggery Ammonia Concentration Based on Genetic Algorithm and Optimized BP Neural Network

In the large-scale farming, piggery environment has a direct impact on the health of swine and its production capacity. In order to predict the ammonia concentration in the large-scale piggery accurately and overcome the shortcomings of the existing prediction models, we combine the genetic algorithms and BP neural networks method to predict the concentration of ammonia. In this paper, piggery environmental factors mainly include wind speed, temperature, humidity and ammonia concentration. The gray relational analysis method is used to determine the input layer factor and output layer factor, while the 3-7-1 BP neural network model of the three-layer structure based on GA(Genetic Algorithm) and L-M (Leven bergMarquardt) optimal algorithm was built to predict the piggery ammonia concentration. The prediction model can optimize the initial value and the threshold value of neural networks, so the optimized values can be more in line with the requirements. At the main time, the training process can avoid falling into local minima. In this paper, the prediction model is based on the global optimization of genetic algorithm, the initial weights and thresholds value of the neural network are optimized, and then the L-M algorithm is used to speed up the training speed of the neural network. By using the continuous monitored data, the neural network is trained and used to predict piggery ammonia concentrations through the resulting neural network model. Training results show that the method is precise enough, and it can be applied to predict piggery ammonia concentrations.