| With the rapid development of China’s agriculture and the increasing material needs of people,the planting scale of agricultural greenhouses is expanding constantly,but most of the traditional greenhouse cultivation patterns are based on manual collection of environmental parameters,and farmers adjust the temperature and humidity the of greenhouse manually according to their own experience.The manual adjustment method owns the problems of poor real-time performance and low control accuracy,which affects the yield and quality of crops in the greenhouse directly and limits the rapid development of China’s agricultural economy.In recent years,with the rapid development of science and technology in China,the Internet of things technology has been used in the field of agriculture widely,which realized intelligent collection and precise control of agricultural environmental parameters.However,there are still many problems in the intelligent control of agricultural greenhouses in China.On the one hand,due to the complex environment in the greenhouse,the control system needs to overcome more interference factors during operation,On the other hand,during the process of completing the control of temperature and humidity parameter in the greenhouse by using the traditional PID control strategy,the single PID has the problems of poor robustness,high overshoot and inability to deal with complex mathematical models,which reduces the control performance of the system greatly.According to the above problems,this paper designed a control system of the temperature and humidity in greenhouse based on the leapfrog PID algorithm,starting from the feasibility,stability and accuracy of the system,to achieve intelligent control of the temperature and humidity of the air in the greenhouse.First of all,according to the actual needs of the greenhouse temperature and humidity control system,the overall architecture of the system was determined.Combined with the characteristics of the greenhouse with a complex working environment,the ZigBee wireless communication technology with high dynamics,low power consumption and large application scale was used to transmit the temperature and humidity data of the greenhouse,and the network architecture,topology and protocol stack of the ZigBee networking were introduced.Then,the control strategy of the temperature and humidity of the air in the greenhouse was researched.According to the nonlinearity,time lag and multi-interference of the greenhouse environment,the control strategy of PID controller optimized by the leapfrog algorithm was proposed.The hopping algorithm selected the optimal PID control parameters to achieve further optimization of the temperature and humidity control system.Simulation experiments showed that the leapfrog PID control strategy had less dynamic errors,system overshoot and adjustment time than traditional PID,which could adjust the temperature and humidity of the greenhouse faster and better.Next,the terminal of the control system of the temperature and humidity in greenhouse was studied,using STM32F767IGT6 as the system core processor and the leapfrog PID algorithm as the execution mechanism,and the hardware circuit of wireless communication module,temperature and humidity sensor module,data communication module and temperature and humidity control module were designed,and the software design of the system is completed by using Keil 5 software and IAR software.Finally,the temperature and humidity control system of the greenhouse based on the leapfrog PID algorithm was tested and analyzed,including the performance and analysis of the temperature and humidity sensor performance,the test and analysis of the data transmission packet loss rate,and the control performance of the system.The test result showed that the system had a good stability and accuracy,which can achieve the desired effect of temperature and humidity control in the greenhouse. |