Intelligent environment collaborative regulation method and system for plant cultivation in confined space
By combining multi-dimensional environmental data acquisition with a fuzzy controller, and utilizing a fuzzy rule base, an improved particle swarm optimization algorithm, and a Smith predictor, the problem of low intelligence in confined space plant cultivation systems was solved, achieving multi-factor collaborative regulation and improving control accuracy and energy utilization efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING VOCATIONAL COLLEGE OF AGRICULTURE (PARTY SCHOOL OF RURAL WORK COMMITTEE OF BEIJING MUNICIPAL COMMITTEE OF THE COMMUNIST PARTY OF CHINA)
- Filing Date
- 2026-03-17
- Publication Date
- 2026-07-10
AI Technical Summary
Existing confined space plant cultivation systems have low levels of intelligence, rely on human experience and manual operation, resulting in large fluctuations in the pH and EC values of nutrient solutions, which affect crop growth and have low control precision and efficiency.
By combining multi-dimensional environmental data acquisition with a fuzzy controller, and through a fuzzy rule base, an improved particle swarm optimization algorithm, and a Smith predictor, multi-factor coordinated regulation is achieved, hysteresis effects are eliminated, and precise control commands are generated by combining energy consumption optimization strategies.
It significantly improves the control precision, response speed, and energy utilization efficiency of confined space plant cultivation systems, achieving a leap from manual experience-based control to intelligent collaborative regulation.
Smart Images

Figure CN122362971A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent cultivation technology, and in particular to an intelligent environmental collaborative regulation method and system for plant cultivation in confined spaces. Background Technology
[0002] In recent years, confined space plant cultivation systems, such as plant factories and containerized planting pods, have become an important technological approach to address the challenges of scarce arable land resources and agricultural product supply in extreme environments by creating artificial environments within enclosed or semi-enclosed spaces to achieve precise intervention throughout the entire plant growth process. These systems offer advantages such as high resource utilization efficiency, controllable production cycles, and independence from natural environmental constraints, achieving land utilization rates that are tens or even hundreds of times higher than those of open fields.
[0003] Environmental control in confined space plant cultivation mainly relies on manual experience or simple automated control methods. Taking nutrient solution management as an example, traditional methods typically involve growers periodically measuring pH and EC values using handheld pH meters and EC meters, and manually adding acidic, alkaline, or stock solutions based on the observations to maintain nutrient solution parameters near empirically determined values. For environmental factors such as temperature, humidity, light, and carbon dioxide, independent timers or threshold switch controllers are often used, such as setting the start of fans when the temperature exceeds 30°C or turning on supplemental lighting when light is insufficient. A few more advanced systems have introduced microcontroller-based timing control and simple PID algorithms, but these still require manual setting of target values and parameters, and each control loop is independent, making it impossible to achieve coordinated regulation of multiple factors.
[0004] The aforementioned technologies have a low level of intelligence and rely heavily on human experience and manual operation. This not only results in high labor intensity and low efficiency, but also makes it difficult to guarantee control precision. This can easily lead to situations where nutrient solution is not replenished in a timely manner or is added in excess, causing significant fluctuations in pH and EC values, which affect the normal growth of crops.
[0005] Based on this, this application provides a method and system for intelligent environmental collaborative regulation of plant cultivation in confined spaces. Summary of the Invention
[0006] To address the issues of low intelligence levels, heavy reliance on human experience and manual operation, which not only result in high labor intensity and low efficiency but also make it difficult to guarantee control precision, leading to untimely or excessive nutrient solution replenishment, causing significant fluctuations in pH and EC values and affecting normal crop growth, this application provides an intelligent environmental collaborative regulation method and system for plant cultivation in confined spaces.
[0007] Firstly, this application provides an intelligent environmental collaborative regulation method for plant cultivation in confined spaces, employing the following technical solution: including: Multidimensional environmental data and plant phenotypic data are collected, and the data are filtered and normalized to generate an input state vector consisting of pH error, EC error, temperature error, humidity error, light error, carbon dioxide error and error change rate. The input state vector is input into the fuzzy controller in parallel. The fuzzy controller contains a fuzzy rule base describing the coupling relationship between light, temperature, humidity, air and fertilizer. After fuzzification, rule reasoning and defuzzification, a preliminary decision vector is output, which consists of the speed of acid pump, speed of alkali pump, speed of mother liquor pump, speed of water pump, power of air conditioner, power of humidification, LED dimming signal and opening degree of carbon dioxide valve. With the goal of minimizing the integral of time multiplied by absolute error, an improved particle swarm optimization algorithm is used to optimize the quantization factor and scaling factor of the fuzzy controller online; the global and local search are balanced by nonlinear inertia factor and adaptive learning factor; the optimized factors are substituted into the fuzzy controller to scale the preliminary decision vector and generate the control decision vector. To address the pure time delay in each control loop, a mathematical model of the controlled object with time delay is constructed and connected in parallel to the Smith predictor. The control decision vector is simultaneously input into the controlled object and the predictor. The predictor's time-delay-free output is used to participate in feedback adjustment in advance, eliminating the impact of time delay on stability and generating the compensated final control command vector. Monitor photovoltaic power generation and battery status, run the variable step size perturbation observation method (MPPT) algorithm to calculate the current total available power; calculate the theoretically required total power based on the final control command vector; if the theoretical power is greater than the available power, initiate an energy consumption optimization strategy to adjust non-critical loads or regenerate the final control command vector; and send the final control command vector to each actuator to achieve multi-factor coordinated regulation.
[0008] Preferably, the input state vector is input in parallel into a fuzzy controller, which includes a fuzzy rule base describing the coupling relationship between light, temperature, humidity, air, and fertilizer. After fuzzification, rule reasoning, and defuzzification, a preliminary decision vector is output, consisting of the speed of the acid pump, the speed of the alkali pump, the speed of the mother liquor pump, the speed of the water pump, the power of the air conditioner, the power of the humidifier, the LED dimming signal, and the opening degree of the carbon dioxide valve, including: The error and error rate of change in the input state vector are mapped to a preset unified fuzzy domain; each input variable is divided into five fuzzy subsets, representing negative large, negative small, zero, positive small, and positive large respectively; each fuzzy subset is mathematically described using a triangular membership function, the shape of which is determined by the coordinates of the three vertices; The acid pump speed, alkali pump speed, mother liquor pump speed, water pump speed, air conditioning power, humidification power, LED dimming signal, and carbon dioxide valve opening in the preliminary decision vector are mapped to a preset unified fuzzy domain. Each output variable is also divided into five fuzzy subsets representing negative large, negative small, zero, positive small, and positive large, and described using a triangular membership function. For each set of input-output relationships, fuzzy rules of plant physiological laws are established. The rule form is: if the input error belongs to a certain fuzzy subset and the error change rate belongs to a certain fuzzy subset, then the output belongs to a certain fuzzy subset. The rule base contains multiple rules describing the coupling relationship between light, temperature, water, air, and fertilizer. Using the Mamdani inference method, based on the actual membership degree of each error and error change rate in the current input state vector on each fuzzy subset, the corresponding fuzzy rules are activated, and the results of all activated rules are synthesized to obtain the fuzzy set of each output variable. The centroid method is used to perform defuzzification calculation on the fuzzy sets of each output variable. By calculating the weighted average of each discrete element value and its corresponding membership degree, the accurate numerical value is obtained, which constitutes the preliminary decision vector.
[0009] Preferably, the Mamdani inference method is used to activate corresponding fuzzy rules based on the actual membership degrees of each error and error rate of change in the current input state vector on each fuzzy subset, and the results of all activated rules are synthesized to obtain a fuzzy set of each output variable, including: For each rule in the rule base, based on the actual membership degree of each error and error change rate in the current input state vector on the corresponding fuzzy subset, the trigger strength of the corresponding rule is calculated using the minimum value method, that is, the minimum value of all conditional membership degrees in the antecedent of the corresponding rule is taken as the activation degree of the rule. The trigger strength of each rule is applied to the output fuzzy subset corresponding to the conclusion of the rule. The membership function of the output variable is truncated using the minimum value method, and the part of the membership function that is not greater than the trigger strength is retained to obtain the output fuzzy set generated by the reasoning of each rule. The output fuzzy sets generated by all activated rules are superimposed, and the maximum value method is used for synthesis. The maximum membership degree of each rule's output fuzzy set on the same universe of discourse element is taken to form the final fuzzy set of each output variable.
[0010] Preferably, the step involves optimizing the quantization factor and scaling factor of the fuzzy controller online using an improved particle swarm optimization algorithm, with the objective of minimizing the integral of the time multiplied by the absolute error; balancing the global and local searches through a nonlinear inertia factor and an adaptive learning factor; and substituting the optimized factors into the fuzzy controller to scale the preliminary decision vector, thereby generating a control decision vector, including: The quantization factors of all input variables and the scaling factors of all output variables in the fuzzy controller are combined and encoded into a particle, and each particle represents a set of parameter solutions to be optimized; the position and velocity of the particle swarm are randomly initialized in the solution space, and the size of the particle swarm is preset according to the system complexity. With minimizing the integral of time multiplied by absolute error as the optimization objective, a fitness function is constructed. The fitness function performs time-weighted integration of the errors of each environmental parameter. Its expression is to integrate and sum the absolute values of pH error, EC error, temperature error, humidity error, light error, and carbon dioxide concentration error by time, respectively. This allows the system to simultaneously focus on response speed, regulation accuracy, and steady-state performance during the optimization process. Substitute the quantization factor and scaling factor represented by each particle into the fuzzy controller, run the control system, record the error change curves of each environmental parameter from start-up to stabilization, and calculate the fitness value of each particle according to the fitness function. The smaller the fitness value, the better the control performance. Compare the current fitness value of each particle with its historical best fitness value. If the current fitness value is better, update the individual best position of the particle. Compare the best fitness value of all particles with the historical best fitness value of the population. If the current fitness value is better, update the population best position. During the iteration process, a nonlinear strategy is used to dynamically adjust the magnitude of the inertia factor. In the early stage of the iteration, the inertia factor is kept at a large value to enhance the global search capability. In the later stage of the iteration, the inertia factor is gradually reduced to enhance the local search capability. Its deceleration rate changes adaptively with the increase of the number of iterations. An adaptive strategy based on trigonometric functions is adopted to adjust the individual learning factor and the group learning factor. In the early stage of iteration, the individual learning factor is larger and the group learning factor is smaller, so that the particles tend to learn from their own historical best to expand the search range. In the later stage of iteration, the individual learning factor decreases and the group learning factor increases, so that the particles tend to move closer to the group best to accelerate convergence. Based on the individual optimal position, the group optimal position, the current velocity, the current inertia factor, the current individual learning factor, and the current group learning factor, calculate the update velocity of each particle; add the update velocity to the current position to obtain the new position of the particle; and perform boundary processing on particles that exceed the solution space boundary. Determine whether the preset maximum number of iterations has been reached or whether the fitness value meets the preset accuracy requirements. If the conditions are met, terminate the iteration and output the quantization factor matrix and scaling factor matrix corresponding to the optimal position of the population as the optimization result; if the conditions are not met, return to continue the iteration. The optimized quantization factor matrix and scaling factor matrix are substituted into the fuzzy controller, and the scaling transformation is performed on each component in the preliminary decision vector. The optimized scaling factor is multiplied by the fuzzy inference result of the error scaled by the quantization factor and the error change rate to generate the control decision vector that meets the current environmental conditions and plant growth requirements.
[0011] Preferably, the step of constructing a mathematical model of the controlled object with time delay for each control loop's pure time delay, and connecting it in parallel to the Smith predictor, includes: For the nutrient solution pH control loop, nutrient solution EC control loop, temperature control loop, humidity control loop, light control loop, and carbon dioxide concentration control loop, mathematical models of each controlled object are obtained through step response tests or system identification methods. The mathematical models include transfer functions without hysteresis and pure hysteresis time parameters. The pure hysteresis time parameters reflect the time delay between the action of the actuator and the detection of the response change by the sensor. For each control loop, a corresponding Smith predictor is constructed based on the hysteresis-free transfer function and pure time delay parameter of the controlled object. The Smith predictor consists of two parallel branches: the first branch is the hysteresis-free transfer function of the controlled object, and the second branch is the hysteresis-free transfer function of the controlled object connected in series with a time delay element and then negative. The outputs of the two branches are added together to obtain the total output of the Smith predictor. The Smith predictor is connected in parallel between the fuzzy controller and the controlled object. Each component of the control decision vector output by the fuzzy controller is simultaneously input to the actual controlled object of the corresponding loop and the Smith predictor of the corresponding loop. Preferably, the step of simultaneously inputting the control decision vector into the controlled object and the predictor, utilizing the predictor's time-delay-free output to participate in feedback adjustment in advance, eliminating the impact of lag on stability, and generating the compensated final control command vector includes: The Smith predictor calculates the predicted response value of the controlled variable at future times based on the control quantity in the control decision vector and the lag-free mathematical model of the controlled object. The predicted response value does not include the influence of pure lag time and can reflect the effect of the control action in advance. The time-delayed feedback signal output by the actual controlled object is superimposed with the time-delay-free prediction signal output by the Smith predictor to construct a new feedback signal, which is then fed into the input of the fuzzy controller. The new feedback signal is equal to the actual feedback signal minus the lag portion of the predictor output plus the time-delay-free portion of the predictor output. The fuzzy controller makes decisions based on the modified time-delay-free feedback signal, perceives the effect of the control action in advance, and adjusts in a timely manner. After compensation by the Smith predictor, the control decision vector output by the fuzzy controller is no longer affected by the system lag characteristics, and serves as the final control command vector, which is then sent to each actuator for execution.
[0012] Preferably, the monitoring of photovoltaic power generation and battery status, the use of the variable step size perturbation observation (MPPT) algorithm to calculate the current total available power; the calculation of the theoretically required total power based on the final control command vector; if the theoretical power is greater than the available power, the activation of an energy consumption optimization strategy to adjust non-critical loads or regenerating the final control command vector; and the distribution of the final control command vector to each actuator to achieve multi-factor coordinated control, including: By deploying current and voltage sensors at the output end of photovoltaic cells, the DC output current and DC output voltage of photovoltaic cells are collected in real time to calculate the instantaneous power of photovoltaic power generation at the current moment; at the same time, the state of charge of the battery pack is monitored to obtain the remaining percentage of battery charge. The difference between the instantaneous power of photovoltaic power generation at the current moment and the power at the previous moment is taken as the power change, and the difference between the voltage at the current moment and the voltage at the previous moment is taken as the voltage change. The absolute value of the ratio of the power change to the voltage change is calculated. Based on the magnitude of the absolute value of the ratio, the perturbation step size at the next moment is dynamically adjusted. The perturbation step size is equal to the step size coefficient multiplied by the absolute value of the ratio of the power change to the voltage change. Through continuous perturbation and observation, the photovoltaic cells are kept operating near their maximum power point under the current light intensity and temperature conditions; The instantaneous power of photovoltaic power generation is added to the maximum discharge power that the battery can currently provide to obtain the total available power of the system. The maximum discharge power that the battery can currently provide is determined based on the battery's state of charge and rated discharge parameters. Based on the control quantity of each actuator in the final control command vector, multiply each actuator by its rated power coefficient and sum them to obtain the theoretically required total power; compare the theoretically required total power with the current available total power to determine whether it exceeds the available power supply capacity; If the theoretically required total power is not greater than the current available total power, then the final control command vector remains unchanged; if the theoretically required total power is greater than the current available total power, then the energy consumption optimization strategy is immediately activated. According to the preset load priority order, the control amount of the load is gradually reduced starting from the lowest priority load until the adjusted theoretical total power is not greater than the current available total power. The load priority order is preset according to the degree of impact on plant growth. Among them, the load related to nutrient solution regulation has the highest priority, followed by temperature regulation, then light regulation, and auxiliary humidification and decorative lighting have the lowest priority. The current available total power constraint is fed back into the improved particle swarm algorithm, and the energy consumption weight coefficient in the fitness function of time multiplied by absolute error is adjusted so that the optimization objective can ensure the plant growth needs while taking into account energy conservation and consumption reduction; online optimization is performed to generate a new final control command vector that meets the power constraint. The final control command vector, determined after adjustment by the energy consumption optimization strategy, is sent to the drive circuits of each actuator through the communication interface.
[0013] Secondly, this application discloses an intelligent environmental collaborative control device for plant cultivation in confined spaces, which adopts the following technical solution, including: The data acquisition module is used to collect multidimensional environmental data and plant phenotypic data, and to filter and normalize the data to generate an input state vector consisting of pH error, EC error, temperature error, humidity error, light error, carbon dioxide error and error change rate. The fuzzy control module is used to input the input state vector into the fuzzy controller in parallel. The fuzzy controller contains a fuzzy rule base describing the coupling relationship between light, temperature, humidity, air, and fertilizer. After fuzzification, rule reasoning, and defuzzification, it outputs a preliminary decision vector consisting of the speed of the acid pump, the speed of the alkali pump, the speed of the mother liquor pump, the speed of the water pump, the power of the air conditioner, the power of the humidifier, the LED dimming signal, and the opening degree of the carbon dioxide valve. The decision optimization module is used to optimize the quantization factor and scaling factor of the fuzzy controller online with the goal of minimizing the integral of time multiplied by absolute error. It balances the global and local search by using nonlinear inertia factor and adaptive learning factor. The optimized factors are substituted into the fuzzy controller to perform scaling transformation on the preliminary decision vector to generate the control decision vector. The instruction compensation module is used to construct a mathematical model of the controlled object with time delay for each control loop, and connect it in parallel to the Smith predictor; the control decision vector is simultaneously input into the controlled object and the predictor, and the predictor’s time-delay-free output is used to participate in the feedback adjustment in advance to eliminate the impact of time delay on stability and generate the compensated final control instruction vector. The energy consumption optimization module is used to monitor photovoltaic power generation and battery status, run the variable step size perturbation observation method (MPPT) algorithm to calculate the current total available power, calculate the theoretically required total power based on the final control command vector, and if the theoretical power is greater than the available power, activate the energy consumption optimization strategy to adjust non-critical loads or regenerate the final control command vector; and send the final control command vector to each actuator to achieve multi-factor coordinated regulation.
[0014] Thirdly, this application also provides a control device, the device comprising: It includes a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executed, such as the intelligent environmental collaborative regulation method for plant cultivation in confined spaces described above.
[0015] Fourthly, this application also provides a computer-readable storage medium storing a computer program that can be loaded by a processor and executed as described above regarding the intelligent environmental collaborative regulation method for plant cultivation in confined spaces.
[0016] In summary, this application deploys a multi-source sensor network within a confined space to collect real-time data on nutrient solution pH, EC value, temperature, humidity, light intensity, carbon dioxide concentration, and plant phenotypic data. After preprocessing, an input state vector containing the errors and rates of change of each parameter is generated. Subsequently, a multi-input multi-output fuzzy controller is constructed. This controller incorporates a fuzzy rule base describing the coupling relationships of environmental factors. Through fuzzification, Mamdani inference, and defuzzification using the centroid method, a preliminary decision vector composed of control quantities from each actuator is output. To further improve control accuracy, an improved particle swarm optimization algorithm is used to optimize the quantization and scaling factors of the fuzzy controller online. This algorithm balances global and local searches using nonlinear inertia and adaptive learning factors, aiming to optimize by multiplying the time by the integral of the absolute error, generating an optimized control decision vector. To address the system feedback delay problem, a Smith predictor is connected in parallel to each control loop. Its time-delay-free predictive output participates in feedback adjustment in advance, eliminating the impact of lag on stability and generating a compensated final control command vector. Finally, the system monitors photovoltaic power generation and battery status in real time, calculates available power using the variable step-size perturbation observation (MPPT) algorithm, and compares it with the theoretically required total power. If the power supply is insufficient, an energy consumption optimization strategy is initiated to adjust non-critical loads or regenerate instructions, which are then sent to the respective actuators to complete the control. Thus, through the combination of multi-factor coupled modeling, parameter self-tuning, time delay compensation, and energy consumption sensing, the system achieves a leap from manual experience-based control to intelligent collaborative regulation of the confined space plant cultivation environment, significantly improving the system's control accuracy, response speed, environmental adaptability, and energy utilization efficiency. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating a method for intelligent environmental collaborative regulation of plant cultivation in confined spaces.
[0018] Figure 2 This is a structural block diagram of an intelligent environmental collaborative control device for plant cultivation in confined spaces. Detailed Implementation
[0019] The following combination Figures 1-2 This application will be described in further detail.
[0020] Reference Figure 1 The embodiments of this application include at least steps S10 to S50.
[0021] S10 collects multidimensional environmental data and plant phenotypic data, filters and normalizes the data, and generates an input state vector consisting of pH error, EC error, temperature error, humidity error, light error, carbon dioxide error, and error change rate.
[0022] S20: Input the input state vector in parallel to the fuzzy controller. The fuzzy controller contains a fuzzy rule base describing the coupling relationship between light, temperature, humidity, air, and fertilizer. After fuzzification, rule reasoning, and defuzzification, the output is a preliminary decision vector consisting of the speed of the acid pump, the speed of the alkali pump, the speed of the mother liquor pump, the speed of the water pump, the power of the air conditioner, the power of the humidifier, the LED dimming signal, and the opening degree of the carbon dioxide valve.
[0023] S30 aims to minimize the integral of the time multiplied by the absolute error. It uses an improved particle swarm optimization algorithm to optimize the quantization factor and scaling factor of the fuzzy controller online. It balances the global and local search by using a nonlinear inertia factor and an adaptive learning factor. The optimized factors are then substituted into the fuzzy controller to scale the initial decision vector and generate the control decision vector.
[0024] S40: For the pure time delay in each control loop, construct a mathematical model of the controlled object with time delay and connect it in parallel to the Smith predictor; input the control decision vector into the controlled object and the predictor at the same time, and use the time-delay-free output of the predictor to participate in the feedback adjustment in advance, eliminate the impact of time delay on stability, and generate the compensated final control command vector.
[0025] S50 monitors photovoltaic power generation and battery status, runs the variable step size perturbation observation method (MPPT) algorithm to calculate the current total available power, calculates the theoretically required total power based on the final control command vector, and if the theoretical power is greater than the available power, it initiates an energy consumption optimization strategy to adjust non-critical loads or regenerates the final control command vector; and sends the final control command vector to each actuator to achieve multi-factor coordinated regulation.
[0026] Specifically, the system collects multidimensional environmental and plant phenotypic data through sensors, preprocesses it to generate an input state vector containing the errors and rates of change of each parameter, and inputs this vector in parallel into a fuzzy controller with a built-in coupled rule base. After inference, it outputs preliminary decision vectors for each actuator. Then, an improved particle swarm optimization algorithm is used, with time multiplied by the integral of the absolute error as the objective, to optimize the quantization and scaling factor of the fuzzy controller online, generating an optimized control decision vector. To address system feedback delay, a Smith predictor is connected in parallel to each loop, utilizing its delay-free predictive output to participate in feedback adjustment in advance, eliminating the lag effect and obtaining the compensated final command vector. Finally, the system monitors photovoltaic power generation and battery status, runs a variable-step MPPT algorithm to calculate available power, and if power supply is insufficient, it initiates an energy consumption optimization strategy to adjust the load or regenerate commands before issuing the final command for execution. This invention, through the organic integration of multi-factor coupled modeling, parameter self-tuning, delay compensation, and energy consumption perception, achieves a leap from independent control to intelligent collaboration in confined space environments, significantly improving control accuracy, response speed, and energy utilization efficiency.
[0027] In some embodiments, step S20 specifically includes the following steps: mapping the error and error rate of change in the input state vector to a preset unified fuzzy domain; dividing each input variable into five fuzzy subsets, representing negative large, negative small, zero, positive small, and positive large respectively; mathematically describing each fuzzy subset using a triangular membership function, the shape of which is determined by the coordinates of the three vertices; mapping the acid pump speed, alkali pump speed, mother liquor pump speed, water pump speed, air conditioning power, humidification power, LED dimming signal, and carbon dioxide valve opening in the preliminary decision vector to a preset unified fuzzy domain; similarly dividing each output variable into five fuzzy subsets representing negative large, negative small, zero, positive small, and positive large, and describing them using a triangular membership function; For each input-output relationship, fuzzy rules based on plant physiological laws are established. The rule form is: if the input error belongs to a certain fuzzy subset and the error change rate belongs to a certain fuzzy subset, then the output belongs to a certain fuzzy subset. The rule base contains multiple rules describing the coupling relationship between light, temperature, water, air, and fertilizer. Using the Mamdani inference method, based on the actual membership degree of each error and error change rate in the current input state vector on each fuzzy subset, the corresponding fuzzy rules are activated, and the results of all activated rules are synthesized to obtain the fuzzy set of each output variable. The centroid method is used to perform defuzzification calculation on the fuzzy set of each output variable. By calculating the weighted average of each discrete element value and its corresponding membership degree, the precise numerical value is obtained, forming the preliminary decision vector.
[0028] Specifically, the various errors and error rates of change in the input state vector are fuzzified, mapped to a unified universe of discourse, and divided into five fuzzy subsets. Triangular membership functions are used to describe their fuzzy features. The output variables are also subjected to the same fuzzification process. Next, a fuzzy rule base based on plant physiological laws is constructed. The rule format is "If the error belongs to a subset and the error rate of change belongs to a subset, then the output belongs to a subset." The rule base specifically includes multiple rules describing the coupling relationships between light, temperature, water, air, and fertilizer. Then, the Mamdani inference method is used to activate the corresponding rules based on the actual membership degree of the current input in each fuzzy subset, and the results of all activated rules are combined into a fuzzy set of each output variable. Finally, the centroid method is used for defuzzification calculation, and a weighted average is used to obtain precise values, forming a preliminary decision vector. This transforms human experience and expert knowledge into quantifiable mathematical rules, realizing intelligent inference and preliminary decision-making under multi-factor coupling conditions, laying the model foundation for subsequent parameter optimization and precise control.
[0029] In some embodiments, considering the specific implementation process of Mamdani fuzzy inference, the corresponding processing steps are as follows: For each rule in the rule base, based on the actual membership degree of each error and error change rate in the current input state vector on the corresponding fuzzy subset, the trigger strength of the corresponding rule is calculated using the minimum value method, that is, the minimum value of all conditional membership degrees in the antecedent of the corresponding rule is taken as the activation degree of the rule; the trigger strength of each rule is applied to the output fuzzy subset corresponding to the conclusion part of the corresponding rule, and the membership function of the output variable is truncated using the minimum value method, retaining the part of the membership function that is not greater than the trigger strength, to obtain the output fuzzy set generated by each rule inference; the output fuzzy sets generated by all activated rules are superimposed, and the maximum value method is used for synthesis, taking the maximum membership degree of each rule's output fuzzy set on the same universe element to form the final fuzzy set of each output variable.
[0030] Specifically, the trigger strength of each rule is calculated, and the minimum value of the membership degrees of all conditions in the antecedent of the rule is taken as the activation level. Then, this trigger strength is applied to the rule's conclusion, and the membership function of the output variable is truncated using the minimum value method, retaining the portion not greater than the trigger strength, generating the output fuzzy set corresponding to each rule. Finally, the output fuzzy sets of all activated rules are superimposed, and the maximum value method is used to obtain the maximum membership degree of each rule on the same universe of discourse elements, synthesizing the final fuzzy set of each output variable. This transforms multi-rule reasoning into quantifiable mathematical operations, providing precise fuzzy set input for subsequent defuzzification.
[0031] In some embodiments, step S30 specifically includes the following steps: encoding the quantization factors of all input variables and the scaling factors of all output variables in the fuzzy controller into a single particle, each particle representing a set of parameter solutions to be optimized; randomly initializing the position and velocity of the particle swarm in the solution space, with the particle swarm size preset according to the system complexity; constructing a fitness function with the optimization objective of minimizing the integral of time multiplied by the absolute error, the fitness function performing a time-weighted integral on the errors of each environmental parameter, the expression of which is to integrate and sum the absolute values of pH error, EC error, temperature error, humidity error, illumination error, and carbon dioxide concentration error multiplied by time respectively, so that the system simultaneously focuses on response speed, adjustment accuracy, and steady-state performance during the optimization process; and encoding the quantization factors and scaling factors represented by each particle into a single particle. Factors are substituted into the fuzzy controller, the control system is run, and the error change curves of various environmental parameters are recorded from startup to stabilization. The fitness value of each particle is calculated according to the fitness function. The smaller the fitness value, the better the control performance. The fitness value of each particle in the current iteration is compared with its historical best fitness value. If the current fitness value is better, the individual optimal position of the particle is updated. The optimal fitness value of all particles is compared with the historical best fitness value of the group. If the current fitness value is better, the optimal position of the group is updated. During the iteration process, a nonlinear strategy is used to dynamically adjust the size of the inertia factor. In the early stage of the iteration, the inertia factor is kept at a large value to enhance the global search capability. In the later stage of the iteration, the inertia factor is gradually reduced to enhance the local search capability. Its deceleration rate changes adaptively with the number of iterations. An adaptive strategy based on trigonometric functions is adopted to adjust the individual learning factor and the group learning factor. In the early stage of iteration, the individual learning factor is larger and the group learning factor is smaller, so that the particles tend to learn from their own historical best to expand the search range. In the later stage of iteration, the individual learning factor decreases and the group learning factor increases, so that the particles tend to move closer to the group best to accelerate convergence. The update rate of each particle is calculated based on the individual best position, the group best position, the current velocity, the current inertia factor, the current individual learning factor, and the current group learning factor. The update rate is added to the current position to obtain the new position of the particle. Boundary processing is performed on particles that exceed the solution space boundary. It is determined whether the preset maximum number of iterations or the fitness value meets the preset accuracy requirements. If the conditions are met, the iteration is terminated, and the quantization factor matrix and scaling factor matrix corresponding to the group best position are output as the optimization result. If the conditions are not met, the iteration continues. The optimized quantization factor matrix and scaling factor matrix are substituted into the fuzzy controller to perform scaling transformation on each component in the preliminary decision vector. The optimized scaling factor is multiplied by the error scaled by the quantization factor and the fuzzy inference result of the error change rate to generate a control decision vector that meets the current environmental conditions and plant growth requirements.
[0032] In practice, the fitness function F is constructed with the goal of minimizing the integral of time-in-absolute error (ITAE), and its expression is as follows: ; Where T is the simulation or runtime. , , , , , These represent the pH error, EC error, temperature error, humidity error, illumination error, and carbon dioxide concentration error at time t, respectively.
[0033] Specifically, quantization and scaling factors are encoded as particles, and the population is randomly initialized. A fitness function is constructed by multiplying time by the integral of the absolute error, comprehensively evaluating the response speed and steady-state accuracy of each parameter. Individual and population optima are iteratively updated, and a nonlinear inertia factor and trigonometric function adaptive learning factor are used to dynamically balance global search and local exploitation capabilities, avoiding getting trapped in local optima. Upon reaching the termination condition, the optimal factor matrix is output and substituted into the fuzzy controller to scale the initial decision vector, generating a control decision vector accurately adapted to the current environment, significantly improving the system's adaptive control capability.
[0034] In some embodiments, step S40 specifically includes the following steps: For the nutrient solution pH control loop, nutrient solution EC control loop, temperature control loop, humidity control loop, light control loop, and carbon dioxide concentration control loop, respectively, obtain the mathematical model of each controlled object through step response testing or system identification methods. The mathematical model includes a transfer function with no hysteresis and a pure time delay parameter, wherein the pure time delay parameter reflects the time delay between the actuator's action and the sensor's detection of the response change; For each control loop, based on the transfer function with no hysteresis of its controlled object and... For the pure time delay parameter, a corresponding Smith predictor is constructed. The Smith predictor consists of two parallel branches. The first branch is the lag-free transfer function of the controlled object, and the second branch is the lag-free transfer function of the controlled object connected in series with a lag element and then negative. The outputs of the two branches are added together to obtain the total output of the Smith predictor. The Smith predictor is connected in parallel between the fuzzy controller and the controlled object. Each component of the control decision vector output by the fuzzy controller is simultaneously input to the actual controlled object of the corresponding loop and the Smith predictor of the corresponding loop. The Smith predictor calculates the predicted response value of the controlled variable at future moments based on the control quantity in the control decision vector and the lag-free mathematical model of the controlled object. The predicted response value does not include the influence of pure time delay and can reflect the effect of the control action in advance. The time-delayed feedback signal output by the actual controlled object is superimposed with the time-delay-free predicted signal output by the Smith predictor to construct a new feedback signal, which is sent to the input of the fuzzy controller. The new feedback signal is equal to the actual feedback signal minus the lag part of the predictor output plus the time-delay-free part of the predictor output. Based on the new feedback signal, the characteristic equation of the closed-loop system no longer contains the exponential term of the pure time delay element, thus theoretically eliminating the influence of time delay on system stability. The fuzzy controller makes decisions based on the modified time-delay-free feedback signal, perceives the effect of the control action in advance, and adjusts in time. After compensation by the Smith predictor, the control decision vector output by the fuzzy controller is no longer affected by the system's time delay characteristics and serves as the final control command vector, which is then issued to each actuator for execution.
[0035] In practice, for each control loop, let the transfer function of the controlled object be: ; Where s is the Laplace operator, For the transfer function of the controlled object without hysteresis, The pure time delay reflects the time interval between the actuator's action and the sensor's detection of the change in response. The transfer function of the Smith predictor... for: ; After connecting the Smith predictors in parallel, the equivalent closed-loop transfer function of the system is: ; in, This is the transfer function of the fuzzy controller. It can be seen that the lag element... Once removed from the characteristic equation, it no longer affects the system's stability.
[0036] Specifically, the mathematical models of each control loop are identified through step response, obtaining the hysteresis-free transfer function and pure time delay parameters. For each loop, a Smith predictor is constructed, consisting of a hysteresis-free component and a hysteresis negative branch connected in parallel, and connected in parallel between the fuzzy controller and the controlled object. The predictor calculates the time-delay-free predicted response value based on the control quantity, and after superimposing it with the actual time-delayed feedback signal, a new feedback signal is constructed and sent to the controller, eliminating the hysteresis exponential term in the closed-loop characteristic equation. The controller, based on the modified time-delay-free signal, anticipates the control effect and adjusts in time, ultimately outputting a control command vector unaffected by hysteresis, significantly improving system stability and response speed.
[0037] In some embodiments, step S50 specifically includes the following steps: Real-time acquisition of the DC output current and DC output voltage of the photovoltaic cell using current and voltage sensors deployed at the output end of the photovoltaic cell; calculation of the instantaneous power of photovoltaic power generation at the current moment; simultaneous monitoring of the state of charge of the battery pack to obtain the remaining percentage of battery charge; calculation of the absolute value of the ratio of the power change to the voltage change using the difference between the instantaneous power of photovoltaic power generation at the current moment and the power at the previous moment, and the difference between the voltage at the current moment and the voltage at the previous moment; dynamic adjustment of the perturbation step size for the next moment based on the magnitude of the absolute value of the ratio, where the perturbation step size is equal to the step size coefficient multiplied by the absolute value of the ratio of the power change to the voltage change; when the absolute value of the ratio of the power change to the voltage change is large, it indicates that the current operating point is far from the maximum power point, and a larger step size is used to quickly approach it; when the absolute value of the ratio is small, it indicates that the current operating point is close to the maximum power point, and a smaller step size is used for fine searching to reduce power oscillation. Through continuous perturbation and observation, the photovoltaic cells are kept operating near their maximum power point under the current light intensity and temperature conditions. The instantaneous power of photovoltaic power generation is added to the maximum discharge power that the battery can currently provide to obtain the total available power of the system. The maximum discharge power that the battery can currently provide is determined based on the battery's state of charge and rated discharge parameters. The control quantities of each actuator in the final control command vector are multiplied by the rated power coefficient of each actuator and accumulated to obtain the theoretically required total power. The theoretically required total power is compared with the current available total power to determine whether it exceeds the available power supply capacity. If the theoretically required total power is not greater than the current available total power, the final control command vector remains unchanged. If the theoretically required total power is greater than the current available total power, the energy consumption optimization strategy is immediately activated. Energy consumption optimization strategy: 1. Based on the preset load priority order, gradually reduce the control quantity of the lowest priority load until the adjusted theoretical total power required is not greater than the current available total power. The load priority order is preset according to the degree of impact on plant growth, with nutrient solution control-related loads having the highest priority, followed by temperature control, then light control, and auxiliary humidification and decorative lighting having the lowest priority; 2. Feed the constraint of the current available total power into the improved particle swarm optimization algorithm, adjust the energy consumption weight coefficient in the fitness function of time multiplied by absolute error, so that the optimization objective can ensure the needs of plant growth while taking into account energy saving and consumption reduction; perform online optimization to generate a new final control command vector that meets the power constraint conditions; The final control command vector, determined after adjustment by the energy consumption optimization strategy, is sent to the drive circuits of each actuator through the communication interface.
[0038] Specifically, photovoltaic data is collected in real time using current and voltage sensors. The perturbation step size is dynamically adjusted based on the absolute value of the ratio of power to voltage changes, ensuring that the photovoltaic cells always operate near their maximum power point. The current available total power is calculated in conjunction with the battery's state of charge. Simultaneously, the theoretically required total power is calculated based on the final control command vector. If power supply is insufficient, an energy optimization strategy is initiated: non-critical loads are gradually reduced according to preset priorities, or power constraints are fed back to the particle swarm optimization algorithm to adjust the fitness function weights and regenerate commands. Finally, the optimized commands are issued and executed, achieving dynamic balance between energy supply and demand and improving energy efficiency.
[0039] The implementation principle of an intelligent environmental collaborative control method for plant cultivation in confined spaces, as described in this application, is as follows: A multi-source sensor network is deployed within the confined space to collect real-time data on nutrient solution pH, EC value, temperature, humidity, light intensity, carbon dioxide concentration, and plant phenotypic data. After preprocessing, an input state vector containing the errors and rates of change of each parameter is generated. Subsequently, a multi-input multi-output fuzzy controller is constructed. This controller incorporates a fuzzy rule base describing the coupling relationships of environmental factors. Through fuzzification, Mamdani inference, and defuzzification using the centroid method, a preliminary decision vector composed of control quantities from each actuator is output. To further improve control accuracy, an improved particle swarm optimization algorithm is used to optimize the quantization factor and proportional factor of the fuzzy controller online. This algorithm balances global and local searches using nonlinear inertia factors and adaptive learning factors, aiming to optimize by multiplying time by the integral of the absolute error, generating an optimized control decision vector. To address the system feedback delay problem, a Smith predictor is connected in parallel to each control loop. Its time-delay-free predictive output participates in feedback adjustment in advance, eliminating the impact of lag on stability and generating a compensated final control command vector. Finally, the system monitors photovoltaic power generation and battery status in real time, calculates available power using the variable step-size perturbation observation (MPPT) algorithm, and compares it with the theoretically required total power. If the power supply is insufficient, an energy consumption optimization strategy is initiated to adjust non-critical loads or regenerate instructions, which are then sent to the respective actuators to complete the control. Thus, through the combination of multi-factor coupled modeling, parameter self-tuning, time delay compensation, and energy consumption sensing, the system achieves a leap from manual experience-based control to intelligent collaborative regulation of the confined space plant cultivation environment, significantly improving the system's control accuracy, response speed, environmental adaptability, and energy utilization efficiency.
[0040] Figure 1 This is a flowchart illustrating an intelligent environmental collaborative regulation method for plant cultivation in confined spaces, as illustrated in one embodiment. It should be understood that, although... Figure 1 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows; unless explicitly stated otherwise, there is no strict order requirement for the execution of these steps, and they can be executed in other orders; and Figure 1 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0041] Based on the same technical concept, referring to Figure 2 This application also provides an intelligent environmental collaborative control device for plant cultivation in confined spaces, which adopts the following technical solution: The device includes: The data acquisition module is used to collect multidimensional environmental data and plant phenotypic data, and to filter and normalize the data to generate an input state vector consisting of pH error, EC error, temperature error, humidity error, light error, carbon dioxide error and error change rate. The fuzzy control module is used to input the input state vector into the fuzzy controller in parallel. The fuzzy controller contains a fuzzy rule base describing the coupling relationship between light, temperature, humidity, air and fertilizer. After fuzzification, rule reasoning and defuzzification, the output is a preliminary decision vector consisting of the speed of acid pump, speed of alkali pump, speed of mother liquor pump, speed of water pump, power of air conditioner, power of humidification, LED dimming signal and opening degree of carbon dioxide valve. The decision optimization module is used to optimize the quantization factor and scaling factor of the fuzzy controller online with the goal of minimizing the integral of time multiplied by absolute error. It balances the global and local search by using nonlinear inertia factor and adaptive learning factor. The optimized factors are then substituted into the fuzzy controller to scale the initial decision vector and generate the control decision vector. The instruction compensation module is used to construct a mathematical model of the controlled object with time delay for each control loop, and connect it in parallel to the Smith predictor. The control decision vector is simultaneously input into the controlled object and the predictor. The predictor's time-delay-free output is used to participate in the feedback adjustment in advance to eliminate the impact of time delay on stability and generate the compensated final control instruction vector. The energy consumption optimization module is used to monitor photovoltaic power generation and battery status, run the variable step size perturbation observation method (MPPT) algorithm to calculate the current total available power, calculate the theoretically required total power based on the final control command vector, and if the theoretical power is greater than the available power, activate the energy consumption optimization strategy to adjust non-critical loads or regenerate the final control command vector; and send the final control command vector to each actuator to achieve multi-factor coordinated regulation.
[0042] In some embodiments, the fuzzy control module is specifically used to map the error and error rate of change in the input state vector to a preset unified fuzzy domain; each input variable is divided into five fuzzy subsets, representing negative large, negative small, zero, positive small, and positive large respectively; each fuzzy subset is mathematically described using a triangular membership function, the shape of which is determined by the coordinates of the three vertices; The acid pump speed, alkali pump speed, mother liquor pump speed, water pump speed, air conditioner power, humidifier power, LED dimming signal, and carbon dioxide valve opening in the initial decision vector are mapped to a preset unified fuzzy domain. Each output variable is also divided into five fuzzy subsets representing negative large, negative small, zero, positive small, and positive large, and described using a triangular membership function. For each set of input-output relationships, fuzzy rules of plant physiological laws are established. The rule form is: if the input error belongs to a certain fuzzy subset and the error change rate belongs to a certain fuzzy subset, then the output belongs to a certain fuzzy subset. The rule base contains multiple rules describing the coupling relationship between light, temperature, water, air, and fertilizer. The Mamdani inference method is used to activate the corresponding fuzzy rules based on the actual membership degree of each error and error rate in the current input state vector on each fuzzy subset, and the results of all activated rules are synthesized to obtain the fuzzy set of each output variable. The centroid method is used to defuzzify the fuzzy sets of each output variable. By calculating the weighted average of each discrete element value and its corresponding membership degree, the accurate numerical value is obtained, which constitutes the preliminary decision vector.
[0043] In some embodiments, the fuzzy control module is specifically used to calculate the trigger strength of each rule in the rule base based on the actual membership degree of each error and error change rate in the current input state vector on the corresponding fuzzy subset, using the minimum value method, that is, taking the minimum value of all conditional membership degrees in the antecedent of the corresponding rule as the activation degree of the rule. The trigger strength of each rule is applied to the output fuzzy subset corresponding to the conclusion of the rule. The membership function of the output variable is truncated using the minimum value method, and the part of the membership function that is not greater than the trigger strength is retained to obtain the output fuzzy set generated by the reasoning of each rule. The output fuzzy sets generated by all activated rules are superimposed, and the maximum value method is used for synthesis. The maximum membership degree of each rule's output fuzzy set on the same universe of discourse element is taken to form the final fuzzy set of each output variable.
[0044] In some embodiments, the decision optimization module is specifically used to encode the quantization factors of all input variables and the scaling factors of all output variables in the fuzzy controller into a particle, each particle representing a set of parameter solutions to be optimized; and to randomly initialize the position and velocity of the particle swarm in the solution space, with the particle swarm size preset according to the system complexity. With minimizing the integral of time multiplied by absolute error as the optimization objective, a fitness function is constructed. The fitness function performs time-weighted integration of the errors of each environmental parameter. Its expression is to integrate and sum the absolute values of pH error, EC error, temperature error, humidity error, light error, and carbon dioxide concentration error by time, respectively. This allows the system to simultaneously focus on response speed, regulation accuracy, and steady-state performance during the optimization process. Substitute the quantization factor and scaling factor represented by each particle into the fuzzy controller, run the control system, record the error change curves of each environmental parameter from start-up to stabilization, and calculate the fitness value of each particle according to the fitness function. The smaller the fitness value, the better the control performance. Compare the current fitness value of each particle with its historical best fitness value. If the current fitness value is better, update the individual best position of the particle. Compare the best fitness value of all particles with the historical best fitness value of the population. If the current fitness value is better, update the population best position. During the iteration process, a nonlinear strategy is used to dynamically adjust the magnitude of the inertia factor. In the early stage of the iteration, the inertia factor is kept at a large value to enhance the global search capability. In the later stage of the iteration, the inertia factor is gradually reduced to enhance the local search capability. Its deceleration rate changes adaptively with the increase of the number of iterations. An adaptive strategy based on trigonometric functions is adopted to adjust the individual learning factor and the group learning factor. In the early stage of iteration, the individual learning factor is larger and the group learning factor is smaller, so that the particles tend to learn from their own historical best to expand the search range. In the later stage of iteration, the individual learning factor decreases and the group learning factor increases, so that the particles tend to move closer to the group best to accelerate convergence. Based on the individual optimal position, the group optimal position, the current velocity, the current inertia factor, the current individual learning factor, and the current group learning factor, calculate the update velocity of each particle; add the update velocity to the current position to obtain the new position of the particle; and perform boundary processing on particles that exceed the solution space boundary. Determine whether the preset maximum number of iterations has been reached or whether the fitness value meets the preset accuracy requirements. If the conditions are met, terminate the iteration and output the quantization factor matrix and scaling factor matrix corresponding to the optimal position of the population as the optimization result; if the conditions are not met, return to continue the iteration. The optimized quantization factor matrix and scaling factor matrix are substituted into the fuzzy controller, and the scaling transformation is performed on each component in the preliminary decision vector. The optimized scaling factor is multiplied by the error and the error change rate after scaling by the fuzzy inference result to generate a control decision vector that meets the current environmental conditions and plant growth requirements.
[0045] In some embodiments, the instruction compensation module is specifically used to obtain the mathematical model of each controlled object through step response test or system identification method for the nutrient solution pH control loop, nutrient solution EC control loop, temperature control loop, humidity control loop, light control loop and carbon dioxide concentration control loop, respectively. The mathematical model includes a transfer function without hysteresis and a pure hysteresis time parameter, wherein the pure hysteresis time parameter reflects the time delay between the action of the actuator and the detection of the response change by the sensor. For each control loop, a corresponding Smith predictor is constructed based on the hysteresis-free transfer function and pure time delay parameter of the controlled object. The Smith predictor consists of two parallel branches: the first branch is the hysteresis-free transfer function of the controlled object, and the second branch is the hysteresis-free transfer function of the controlled object connected in series with a time delay element and then negative. The outputs of the two branches are added together to obtain the total output of the Smith predictor. The Smith predictor is connected in parallel between the fuzzy controller and the controlled object. Each component of the control decision vector output by the fuzzy controller is simultaneously input to the actual controlled object of the corresponding loop and the Smith predictor of the corresponding loop. In some embodiments, the instruction compensation module is specifically used to calculate the predicted response value of the controlled variable at a future time based on the control quantity in the control decision vector and the lag-free mathematical model of the controlled object through the Smith predictor. The predicted response value does not include the influence of pure lag time and can reflect the effect of the control action in advance. The time-delayed feedback signal output by the actual controlled object is superimposed with the time-delay-free prediction signal output by the Smith predictor to construct a new feedback signal, which is then fed into the input of the fuzzy controller. The new feedback signal is equal to the actual feedback signal minus the lag portion of the predictor output plus the time-delay-free portion of the predictor output. The fuzzy controller makes decisions based on the modified time-delay feedback signal, perceives the effect of the control action in advance and adjusts in time. After compensation by the Smith predictor, the control decision vector output by the fuzzy controller is no longer affected by the system lag characteristics, and serves as the final control command vector, which is then sent to each actuator for execution.
[0046] In some embodiments, the energy consumption optimization module is specifically used to collect the DC output current and DC output voltage of the photovoltaic cell in real time by using current sensors and voltage sensors deployed at the output end of the photovoltaic cell, and calculate the instantaneous power of photovoltaic power generation at the current moment; at the same time, it monitors the state of charge of the battery pack and obtains the remaining percentage of battery charge. The difference between the instantaneous power of photovoltaic power generation at the current moment and the power at the previous moment is taken as the power change, and the difference between the voltage at the current moment and the voltage at the previous moment is taken as the voltage change. The absolute value of the ratio of the power change to the voltage change is calculated. Based on the magnitude of the absolute value of the ratio, the perturbation step size at the next moment is dynamically adjusted. The perturbation step size is equal to the step size coefficient multiplied by the absolute value of the ratio of the power change to the voltage change. Through continuous perturbation and observation, the photovoltaic cells are kept operating near their maximum power point under the current light intensity and temperature conditions; The instantaneous power of photovoltaic power generation is added to the maximum discharge power that the battery can currently provide to obtain the total available power of the system. The maximum discharge power that the battery can currently provide is determined based on the battery's state of charge and rated discharge parameters. Based on the control quantities of each actuator in the final control command vector, multiply them by the rated power coefficient of each actuator, and sum them up to obtain the theoretically required total power; compare the theoretically required total power with the current available total power to determine whether it exceeds the available power supply capacity; If the theoretically required total power is not greater than the currently available total power, the final control command vector remains unchanged; if the theoretically required total power is greater than the currently available total power, the energy consumption optimization strategy is immediately activated. According to the preset load priority order, the control amount of the load is gradually reduced starting from the lowest priority load until the adjusted theoretical total power is not greater than the current available total power. The load priority order is preset according to the degree of impact on plant growth. Among them, the load related to nutrient solution regulation has the highest priority, followed by temperature regulation, then light regulation, and auxiliary humidification and decorative lighting have the lowest priority. The current available total power constraint is fed back into the improved particle swarm algorithm, and the energy consumption weight coefficient in the fitness function of time multiplied by absolute error is adjusted so that the optimization objective can take into account energy saving and consumption reduction while ensuring the needs of plant growth; online optimization is performed to generate a new final control command vector that meets the power constraint. The final control command vector, determined after adjustment by the energy consumption optimization strategy, is sent to the drive circuits of each actuator through the communication interface.
[0047] This application also discloses a control device.
[0048] Specifically, the control device includes a memory and a processor. The memory stores a computer program that can be loaded by the processor and executed to implement the aforementioned intelligent environmental coordinated regulation method for plant cultivation in confined spaces.
[0049] This application also discloses a computer-readable storage medium.
[0050] Specifically, the computer-readable storage medium stores a computer program that can be loaded by a processor and executed, such as the intelligent environmental collaborative control method for plant cultivation in confined spaces described above. The computer-readable storage medium includes, for example, various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0051] The above are all preferred embodiments of this application, and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.
Claims
1. A method for intelligent environmental collaborative regulation for plant cultivation in confined spaces, characterized in that, include: Multidimensional environmental data and plant phenotypic data are collected, and the data are filtered and normalized to generate an input state vector consisting of pH error, EC error, temperature error, humidity error, light error, carbon dioxide error and error change rate. The input state vector is input into the fuzzy controller in parallel. The fuzzy controller contains a fuzzy rule base describing the coupling relationship between light, temperature, humidity, air and fertilizer. After fuzzification, rule reasoning and defuzzification, a preliminary decision vector is output, which consists of the speed of acid pump, speed of alkali pump, speed of mother liquor pump, speed of water pump, power of air conditioner, power of humidification, LED dimming signal and opening degree of carbon dioxide valve. With the goal of minimizing the integral of time multiplied by absolute error, an improved particle swarm optimization algorithm is used to optimize the quantization factor and scaling factor of the fuzzy controller online; the global and local search are balanced by nonlinear inertia factor and adaptive learning factor; the optimized factors are substituted into the fuzzy controller to scale the preliminary decision vector and generate the control decision vector. To address the pure time delay in each control loop, a mathematical model of the controlled object with time delay is constructed and connected in parallel to the Smith predictor. The control decision vector is simultaneously input into the controlled object and the predictor. The predictor's time-delay-free output is used to participate in feedback adjustment in advance, eliminating the impact of time delay on stability and generating the compensated final control command vector. Monitor photovoltaic power generation and battery status, run the variable step size perturbation observation method (MPPT) algorithm to calculate the current total available power; calculate the theoretically required total power based on the final control command vector; if the theoretical power is greater than the available power, initiate an energy consumption optimization strategy to adjust non-critical loads or regenerate the final control command vector; and send the final control command vector to each actuator to achieve multi-factor coordinated regulation.
2. The intelligent environmental collaborative regulation method for plant cultivation in confined spaces according to claim 1, characterized in that, The input state vector is input in parallel into a fuzzy controller, which contains a fuzzy rule base describing the coupling relationship between light, temperature, humidity, air, and fertilizer. After fuzzification, rule reasoning, and defuzzification, a preliminary decision vector is output, consisting of acid pump speed, alkali pump speed, mother liquor pump speed, water pump speed, air conditioning power, humidification power, LED dimming signal, and carbon dioxide valve opening. The error and error rate of change in the input state vector are mapped to a preset unified fuzzy domain; each input variable is divided into five fuzzy subsets, representing negative large, negative small, zero, positive small, and positive large respectively; each fuzzy subset is mathematically described using a triangular membership function, the shape of which is determined by the coordinates of the three vertices; The acid pump speed, alkali pump speed, mother liquor pump speed, water pump speed, air conditioning power, humidification power, LED dimming signal, and carbon dioxide valve opening in the preliminary decision vector are mapped to a preset unified fuzzy domain. Each output variable is also divided into five fuzzy subsets representing negative large, negative small, zero, positive small, and positive large, and described using a triangular membership function. For each set of input-output relationships, fuzzy rules of plant physiological laws are established. The rule form is: if the input error belongs to a certain fuzzy subset and the error change rate belongs to a certain fuzzy subset, then the output belongs to a certain fuzzy subset. The rule base contains multiple rules describing the coupling relationship between light, temperature, water, air, and fertilizer. Using the Mamdani inference method, based on the actual membership degree of each error and error change rate in the current input state vector on each fuzzy subset, the corresponding fuzzy rules are activated, and the results of all activated rules are synthesized to obtain the fuzzy set of each output variable. The centroid method is used to perform defuzzification calculation on the fuzzy sets of each output variable. By calculating the weighted average of each discrete element value and its corresponding membership degree, the accurate numerical value is obtained, which constitutes the preliminary decision vector.
3. The intelligent environmental collaborative regulation method for plant cultivation in confined spaces according to claim 2, characterized in that, The Mamdani inference method is employed to activate corresponding fuzzy rules based on the actual membership degrees of each error and error rate of change in the current input state vector on each fuzzy subset. The results of all activated rules are then synthesized to obtain a fuzzy set of each output variable, including: For each rule in the rule base, based on the actual membership degree of each error and error change rate in the current input state vector on the corresponding fuzzy subset, the trigger strength of the corresponding rule is calculated using the minimum value method, that is, the minimum value of all conditional membership degrees in the antecedent of the corresponding rule is taken as the activation degree of the rule. The trigger strength of each rule is applied to the output fuzzy subset corresponding to the conclusion of the rule. The membership function of the output variable is truncated using the minimum value method, and the part of the membership function that is not greater than the trigger strength is retained to obtain the output fuzzy set generated by the reasoning of each rule. The output fuzzy sets generated by all activated rules are superimposed, and the maximum value method is used for synthesis. The maximum membership degree of each rule's output fuzzy set on the same universe of discourse element is taken to form the final fuzzy set of each output variable.
4. The intelligent environmental collaborative regulation method for plant cultivation in confined spaces according to claim 1, characterized in that, The goal is to minimize the integral of the time multiplied by the absolute error. An improved particle swarm optimization algorithm is used to optimize the quantization factor and scaling factor of the fuzzy controller online. The global and local search are balanced by nonlinear inertia factor and adaptive learning factor. The optimized factors are substituted into the fuzzy controller, and the initial decision vector is scaled to generate a control decision vector, including: The quantization factors of all input variables and the scaling factors of all output variables in the fuzzy controller are combined and encoded into a particle, and each particle represents a set of parameter solutions to be optimized; the position and velocity of the particle swarm are randomly initialized in the solution space, and the size of the particle swarm is preset according to the system complexity. With minimizing the integral of time multiplied by absolute error as the optimization objective, a fitness function is constructed. The fitness function performs time-weighted integration of the errors of each environmental parameter. Its expression is to integrate and sum the absolute values of pH error, EC error, temperature error, humidity error, light error, and carbon dioxide concentration error by time, respectively. This allows the system to simultaneously focus on response speed, regulation accuracy, and steady-state performance during the optimization process. Substitute the quantization factor and scaling factor represented by each particle into the fuzzy controller, run the control system, record the error change curves of each environmental parameter from start-up to stabilization, and calculate the fitness value of each particle according to the fitness function. The smaller the fitness value, the better the control performance. Compare the current fitness value of each particle with its historical best fitness value. If the current fitness value is better, update the individual best position of the particle. Compare the best fitness value of all particles with the historical best fitness value of the population. If the current fitness value is better, update the population best position. During the iteration process, a nonlinear strategy is used to dynamically adjust the magnitude of the inertia factor. In the early stage of the iteration, the inertia factor is kept at a large value to enhance the global search capability. In the later stage of the iteration, the inertia factor is gradually reduced to enhance the local search capability. Its deceleration rate changes adaptively with the increase of the number of iterations. An adaptive strategy based on trigonometric functions is adopted to adjust the individual learning factor and the group learning factor. In the early stage of iteration, the individual learning factor is larger and the group learning factor is smaller, so that the particles tend to learn from their own historical best to expand the search range. In the later stage of iteration, the individual learning factor decreases and the group learning factor increases, so that the particles tend to move closer to the group best to accelerate convergence. Based on the individual optimal position, the group optimal position, the current velocity, the current inertia factor, the current individual learning factor, and the current group learning factor, calculate the update velocity of each particle; add the update velocity to the current position to obtain the new position of the particle; and perform boundary processing on particles that exceed the solution space boundary. Determine whether the preset maximum number of iterations has been reached or whether the fitness value meets the preset accuracy requirements. If the conditions are met, terminate the iteration and output the quantization factor matrix and scaling factor matrix corresponding to the optimal position of the population as the optimization result; if the conditions are not met, return to continue the iteration. The optimized quantization factor matrix and scaling factor matrix are substituted into the fuzzy controller, and the scaling transformation is performed on each component in the preliminary decision vector. The optimized scaling factor is multiplied by the fuzzy inference result of the error scaled by the quantization factor and the error change rate to generate the control decision vector that meets the current environmental conditions and plant growth requirements.
5. The intelligent environmental collaborative regulation method for plant cultivation in confined spaces according to claim 1, characterized in that, To address the pure time delay in each control loop, a mathematical model of the controlled object with time delay is constructed and connected in parallel to a Smith predictor, including: For the nutrient solution pH control loop, nutrient solution EC control loop, temperature control loop, humidity control loop, light control loop, and carbon dioxide concentration control loop, mathematical models of each controlled object are obtained through step response tests or system identification methods. The mathematical models include transfer functions without hysteresis and pure hysteresis time parameters. The pure hysteresis time parameters reflect the time delay between the action of the actuator and the detection of the response change by the sensor. For each control loop, a corresponding Smith predictor is constructed based on the hysteresis-free transfer function and pure time delay parameter of the controlled object. The Smith predictor consists of two parallel branches: the first branch is the hysteresis-free transfer function of the controlled object, and the second branch is the hysteresis-free transfer function of the controlled object connected in series with a time delay element and then negative. The outputs of the two branches are added together to obtain the total output of the Smith predictor. The Smith predictor is connected in parallel between the fuzzy controller and the controlled object. Each component of the control decision vector output by the fuzzy controller is simultaneously input to the actual controlled object of the corresponding loop and the Smith predictor of the corresponding loop.
6. The intelligent environmental collaborative regulation method for plant cultivation in confined spaces according to claim 5, characterized in that, The step of simultaneously inputting the control decision vector into the controlled object and the predictor, utilizing the predictor's time-delay-free output to participate in feedback adjustment in advance, eliminating the impact of lag on stability, and generating the compensated final control command vector includes: The Smith predictor calculates the predicted response value of the controlled variable at future times based on the control quantity in the control decision vector and the lag-free mathematical model of the controlled object. The predicted response value does not include the influence of pure lag time and can reflect the effect of the control action in advance. The time-delayed feedback signal output by the actual controlled object is superimposed with the time-delay-free prediction signal output by the Smith predictor to construct a new feedback signal, which is then fed into the input of the fuzzy controller. The new feedback signal is equal to the actual feedback signal minus the lag portion of the predictor output plus the time-delay-free portion of the predictor output. The fuzzy controller makes decisions based on the modified time-delay-free feedback signal, perceives the effect of the control action in advance, and adjusts in a timely manner. After compensation by the Smith predictor, the control decision vector output by the fuzzy controller is no longer affected by the system lag characteristics, and serves as the final control command vector, which is then sent to each actuator for execution.
7. The intelligent environmental collaborative regulation method for plant cultivation in confined spaces according to claim 1, characterized in that, The system monitors photovoltaic power generation and battery status, runs the variable step size perturbation observation method (MPPT) algorithm to calculate the current total available power, calculates the theoretically required total power based on the final control command vector, and if the theoretical power is greater than the available power, it initiates an energy consumption optimization strategy to adjust non-critical loads or regenerates the final control command vector. The final control command vector is sent to each actuator to achieve multi-factor coordinated regulation, including: By deploying current and voltage sensors at the output end of photovoltaic cells, the DC output current and DC output voltage of photovoltaic cells are collected in real time to calculate the instantaneous power of photovoltaic power generation at the current moment; at the same time, the state of charge of the battery pack is monitored to obtain the remaining percentage of battery charge. The difference between the instantaneous power of photovoltaic power generation at the current moment and the power at the previous moment is taken as the power change, and the difference between the voltage at the current moment and the voltage at the previous moment is taken as the voltage change. The absolute value of the ratio of the power change to the voltage change is calculated. Based on the magnitude of the absolute value of the ratio, the perturbation step size at the next moment is dynamically adjusted. The perturbation step size is equal to the step size coefficient multiplied by the absolute value of the ratio of the power change to the voltage change. Through continuous perturbation and observation, the photovoltaic cells are kept operating near their maximum power point under the current light intensity and temperature conditions; The instantaneous power of photovoltaic power generation is added to the maximum discharge power that the battery can currently provide to obtain the total available power of the system. The maximum discharge power that the battery can currently provide is determined based on the battery's state of charge and rated discharge parameters. Based on the control quantity of each actuator in the final control command vector, multiply each actuator by its rated power coefficient and sum them to obtain the theoretically required total power; compare the theoretically required total power with the current available total power to determine whether it exceeds the available power supply capacity; If the theoretically required total power is not greater than the current available total power, then the final control command vector remains unchanged; if the theoretically required total power is greater than the current available total power, then the energy consumption optimization strategy is immediately activated. According to the preset load priority order, the control amount of the load is gradually reduced starting from the lowest priority load until the adjusted theoretical total power is not greater than the current available total power. The load priority order is preset according to the degree of impact on plant growth. Among them, the load related to nutrient solution regulation has the highest priority, followed by temperature regulation, then light regulation, and auxiliary humidification and decorative lighting have the lowest priority. The current available total power constraint is fed back into the improved particle swarm algorithm, and the energy consumption weight coefficient in the fitness function of time multiplied by absolute error is adjusted so that the optimization objective can ensure the plant growth needs while taking into account energy conservation and consumption reduction; online optimization is performed to generate a new final control command vector that meets the power constraint. The final control command vector, determined after adjustment by the energy consumption optimization strategy, is sent to the drive circuits of each actuator through the communication interface.
8. A smart environmental collaborative control device for plant cultivation in confined spaces, characterized in that, The device includes: The data acquisition module is used to collect multidimensional environmental data and plant phenotypic data, and to filter and normalize the data to generate an input state vector consisting of pH error, EC error, temperature error, humidity error, light error, carbon dioxide error and error change rate. The fuzzy control module is used to input the input state vector into the fuzzy controller in parallel. The fuzzy controller contains a fuzzy rule base describing the coupling relationship between light, temperature, humidity, air, and fertilizer. After fuzzification, rule reasoning, and defuzzification, it outputs a preliminary decision vector consisting of the speed of the acid pump, the speed of the alkali pump, the speed of the mother liquor pump, the speed of the water pump, the power of the air conditioner, the power of the humidifier, the LED dimming signal, and the opening degree of the carbon dioxide valve. The decision optimization module is used to optimize the quantization factor and scaling factor of the fuzzy controller online with the goal of minimizing the integral of time multiplied by absolute error. It balances the global and local search by using nonlinear inertia factor and adaptive learning factor. The optimized factors are substituted into the fuzzy controller to perform scaling transformation on the preliminary decision vector to generate the control decision vector. The instruction compensation module is used to construct a mathematical model of the controlled object with time delay for each control loop, and connect it in parallel to the Smith predictor; the control decision vector is simultaneously input into the controlled object and the predictor, and the predictor’s time-delay-free output is used to participate in the feedback adjustment in advance to eliminate the impact of time delay on stability and generate the compensated final control instruction vector. The energy consumption optimization module is used to monitor photovoltaic power generation and battery status, run the variable step size perturbation observation method (MPPT) algorithm to calculate the current total available power, calculate the theoretically required total power based on the final control command vector, and if the theoretical power is greater than the available power, activate the energy consumption optimization strategy to adjust non-critical loads or regenerate the final control command vector; and send the final control command vector to each actuator to achieve multi-factor coordinated regulation.
9. A control device, characterized in that, The device includes: A memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executed as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer program is stored that can be loaded by a processor and executed as described in any one of claims 1 to 7.