## 1 Introduction
In greenhouse environmental controls, the use of predictive control can not only calculate the current equipment control status and the current environmental factors inside the greenhouse, but also predict the future state of greenhouse environmental factors, thereby determining the current control amount according to requirements, enabling the system to act in advance, effectively overcoming problems, such as poor dynamic quality caused by time delay, and improving control accuracy to a certain extent; additionally, it can directly process the input and output constraints of the system online [19]. Many literatures have applied model predictive control methods to greenhouse environmental control research. Reference [1] proposed a method of using pseudo mechanism models to establish predictive models for greenhouses in four states, introducing energy consumption indicators to achieve a multi-objective predictive switching control of greenhouses. However, the modeling process is relatively complex. Reference [20] determined the unknown parameters of the greenhouse mechanism model through genetic algorithm, established an accurate temperature prediction model, and established energy and water consumption objective functions. But the modeling process is relatively complex. Reference [21] established an indoor temperature ARX model under different air outlet openings and established an objective function with temperature control error and skylight opening as constraints. The designed controller can effectively control the indoor temperature. Reference [22] proposed a global variable prediction model method for greenhouse large-coupling systems, with the economic benefits, management costs, and control errors of crops as objective functions. Through reasonable allocation, their respective weight ratios are determined. Reference [23] used the second-order Volterra series to simulate the greenhouse temperature system and designed a controller for the mechanical ventilation state of the greenhouse in the summer. Reference [24] introduces the model predictive control in the cooling and heating controls of greenhouses, establishing control accuracy and energy consumption as constraints to achieve optimal control of greenhouses. Model predictive control has no strict constraints on the control model--whether it is a state formula, neural network, or transfer function--as long as the model has a predictive function determine the current control amount by analyzing the historical operating status information, current operating status information, and predicted future operating status information of the equipment [25]. Therefore, the solution of the optimal control rate for the model predictive control is crucial for establishing a suitable objective optimization function and establishing a reasonable constraint range [26; 27]. This paper proposes a new method for greenhouse model predictive controls, which adds tracking error state formulas to form a multi degree of freedom discrete time state space model. Based on the establishment of a suitable objective optimization function, the gradient descent theory is used to introduce the gradient of tracking error into the constraint conditions during the quadratic objective solving process. By combining the gradient descent learning rate and the gradient descent quadratic norm, the upper and lower bounds of the constraint function are derived. According to the control requirements, real-time data collection is used to update the constraint function in real-time, achieving the solution of the minimum value of the performance index function and the optimal control rate within a limited time. We optimize the constraint range, set reasonable constraint conditions, obtain the optimal solution at the current moment, and obtain the optimal predictive tracking control strategy. We make predictions based on real-time data to meet different decision-making requirements in the greenhouse environment control process.