## 1 Introduction
In order to improve the accuracy of predicting greenhouse environmental factors and achieve simple, efficient, energy-saving, and fast tracking control, in this paper, a real-time optimization constraint method based on the model predictive control is proposed to realize the optimal predictive tracking control of greenhouse; the contribution mainly lies in the following four aspects:  
(1) Establish a prediction control model with the corresponding increment of the state variable in the model as the new variable. (2) The total performance index function is constructed and transformed into the form of solving the optimal value of the quadratic function. The error tracking performance index function is constructed, and the gradient of tracking error is introduced into the error tracking constraint conditions by using the gradient descent theory. Combining the gradient descent learning rate and the gradient descent quadratic norm, the upper and lower bounds of the error tracking constraint function are derived. (3) Using the rolling optimization and iterative method, the minimum value of the total performance index function and the corresponding optimal control rate are solved in a finite time. (4) According to control requirements, real-time updates of error tracking constraint functions for predictive tracking control to meet different decision-making requirements in the greenhouse environment control process predict the output value of each future sampling time based on the value of the optimal control rate. The simulation results demonstrated the effectiveness and rationality of the control strategy, which can make corresponding adjustments in advance to the upcoming changes in the greenhouse environment and achieve energy-saving and efficient predictive tracking control. The first part briefly introduces various predictive control methods and analyzes the advantages and disadvantages of these predictive control methods based on the characteristics of greenhouse environments. The analysis shows that the model predictive control has the characteristics of not requiring high model accuracy, but also realizing high quality control. In the second part, as greenhouse temperatures and humidity are important environmental factors for plant growth, a multi degree of freedom incremental model, including tracking error, was established using a general greenhouse temperature and humidity control model as an example. According to the actual environmental conditions, the optimization performance index function was established, which was transformed into the form of solving the optimal value of the quadratic form function. The upper and lower limits of the constraint function are derived by combining the gradient descent learning rate and vector two-norm, and the constraint conditions of the real-time tracking errors are established to realize the optimal tracking control strategy. In the third part, through the simulation of an example model and the comparison with the results of the traditional model predictive control, the effectiveness and practicability of this method are obtained. The fourth part discusses the advantages and disadvantages of this method compared to traditional predictive control. The fifth part is the summary section.