An optimized fermentation control method for organic waste treatment in winter-warm greenhouses and its application
By deploying multiple sensors and machine vision devices in the fermentation tank, combined with an improved PID controller and Hippo optimization algorithm, the problem of incomplete traditional monitoring was solved, enabling precise fermentation control in the treatment of organic waste in winter-warm greenhouses, and improving the efficiency and quality of composting.
Patent Information
- Application Number
- CN202510454937.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2045-04-11
AI Technical Summary
In traditional winter-warm greenhouse organic waste treatment, the fermentation process is not fully monitored, the timing of turning the compost is determined in a single way, and the PID controller parameters are fixed, making it difficult to adapt to the nonlinear and time-varying characteristics of the fermentation process, resulting in energy waste and insufficient decomposition.
Multiple sensors are deployed in the fermentation tank, and machine vision equipment is used to assess the composting status of the pile surface. An improved PID controller is built, and an improved hippo optimization algorithm is used to dynamically optimize the control parameters. By dynamically adjusting the sensor position and the improved PID controller parameter calculation method, precise pile turning operation is achieved.
It enables comprehensive monitoring of the fermentation process and precise judgment of when to turn the compost, improving fermentation efficiency and quality, reducing energy waste, and ensuring the uniformity of temperature and oxygen distribution in the compost pile.
Smart Images

Figure CN120295100B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of fermentation control technology, and in particular relates to an optimized fermentation control method and its application for the treatment of organic waste in winter-warm greenhouses. Background Technology
[0002] In the treatment of organic waste in winter-warm greenhouses, fermentation control of organic waste such as crop straw, vegetable stalks, and fruit and vegetable residues is necessary. Controlling the turning operation during fermentation is crucial for composting efficiency and quality, but traditional methods have significant technical bottlenecks. Existing technologies mostly rely on single sensors or experience to determine the timing of turning, resulting in flawed monitoring methods: fixed-position sensors do not account for monitoring blind spots caused by volume shrinkage during fermentation and only collect local parameters, lacking multi-dimensional data difference analysis of the upper, middle, and lower layers, making it difficult to comprehensively reflect the uniformity of composting within the pile; the turning trigger mechanism is singular, either based solely on internal environmental parameters or solely on surface appearance, failing to combine surface composting degree with changes in internal parameter gradients, easily leading to turning too early or too late, resulting in energy waste or insufficient composting. Furthermore, traditional PID controllers have fixed parameters, unable to adapt to nonlinear and time-varying characteristics such as changes in microbial activity and greenhouse environmental fluctuations during fermentation, resulting in lag in turning speed adjustment, easily causing problems such as uneven temperature and oxygen distribution, and parameter tuning relies on manual trial and error, lacking a global optimization mechanism, making it difficult to achieve optimal control in complex environments. Summary of the Invention
[0003] In view of the technical problems existing in the background art, the present invention proposes an optimized fermentation control method and its application for the treatment of organic waste in winter-warm greenhouses.
[0004] To achieve the above objectives, the technical solution adopted by the present invention includes the following steps:
[0005] S1. Deploy various sensors in the fermentation tank to monitor parameters during the fermentation process. The sensors include a temperature sensor, a humidity sensor, an oxygen concentration sensor, and a pH sensor.
[0006] S2. Periodically collect images of the pile surface using machine vision equipment, use image recognition algorithms to assess the composting status of the pile surface, and combine the difference between the sensor data of the upper and lower layers of the pile to determine the pile turning operation.
[0007] S3. Build an improved PID controller to control the turning speed. The improvement of the PID controller is as follows:
[0008] For the proportional component, the proportionality coefficient K is adjusted based on historical error trends. p (t) is dynamically weighted, and the calculation formula is: Where e(i) is the error at time i, max|e| is the maximum absolute value of the error within the window, and n represents the first n time steps;
[0009] For the integration stage, the dynamic integration mode is switched according to the error change rate Δe(t), and the calculation method is as follows: Where δ is the conversion rate threshold, E max The maximum allowable error;
[0010] For the differential element, a linear prediction model is constructed based on the historical error sequence [e(tn),...,e(t-1)]. Where a and b are parameters to be determined;
[0011] The improved PID controller ultimately became
[0012] S4. The optimal parameters of the PID controller are obtained by using the improved Hippo optimization algorithm; the improved Hippo optimization algorithm achieves the optimization of the initialization population by improving the reverse learning strategy.
[0013] S5. Obtain multiple optimized control parameters to control the turning operation and optimize the fermentation process.
[0014] Preferably, in step S1, the sensor positions are divided into upper, middle and lower layers; the upper layer is 5 / 6 of the distance from the bottom of the pool, the middle layer is 1 / 2 of the distance from the bottom of the pool, and the lower layer is 1 / 6 of the distance from the bottom of the pool, and each layer includes the above four types of sensors, with equal distribution in type and position.
[0015] Preferably, the height position of the various sensors has dynamic height adjustment, and the calculation method for the dynamic height adjustment is as follows: Where H is the original deployment height, H′ is the corrected deployment height, λ is the stack shrinkage rate, and t is the t-axis. f T represents the fermentation time. f This represents the total estimated fermentation time.
[0016] Preferably, in step S2, the evaluation of the composting state of the pile surface using an image recognition algorithm is performed using the YOLO algorithm. The pile surface image data is input to obtain the composting state score M.
[0017] As a preferred method, the calculation method for judging the turning operation by combining the above-obtained decomposition and transformation score M and the sensor error is: K·(1-M)≥θ, where θ is the turning threshold, K is the sensor data comprehensive difference coefficient, and K=ω W ·ΔW+ω S ·ΔS+ω Y ·ΔY+ω P·|ΔP|, where ΔW, ΔS, ΔY, and ΔP are the data differences between the upper and lower layers of the temperature sensor, humidity sensor, oxygen concentration sensor, and pH sensor, respectively, and ω W ω S ω Y ω P The corresponding weight coefficient is used to trigger the heap turning operation when it is greater than or equal to the heap turning threshold.
[0018] As a preferred embodiment, the improved hippo optimization algorithm is implemented as follows: initializing population parameters, setting the maximum number of iterations and population size; during the iteration process, simulating hippo survival behavior to update individual positions, calculating the fitness value of the PID controller parameters corresponding to each individual, retaining high-quality individuals through a competition mechanism, and outputting the optimal PID controller parameters when the termination condition is met.
[0019] Preferably, when initializing the population, an improved back learning strategy is adopted, which introduces a dynamic scaling factor to adjust the parameter offset of the back solution generation according to the search space dimension and the current iteration stage; for each individual parameter dimension, the search direction of back learning is dynamically corrected based on the current population distribution entropy value.
[0020] As a preferred method, the process of optimizing the initial population based on the improved reverse learning strategy includes: in the population initialization stage, for the randomly generated initial individuals, the improved reverse learning strategy is used to generate a set of reverse individuals; a two-way evaluation mechanism is constructed to calculate the fitness of the initial individuals and the reverse individuals at the same time, and individuals with better fitness are selected to form a new population; the diversity of the new population is tested, and if it is lower than a preset threshold, individuals with spatial distribution differences are generated by supplementing the population with the improved reverse learning strategy.
[0021] Preferably, the optimized fermentation control method for treating organic waste in winter-warm greenhouses described in any one of claims 1-8 is applied in the treatment of agricultural organic waste.
[0022] Compared with existing technologies, the advantages and positive effects of this invention are as follows: deploying multiple types of sensors in the upper, middle and lower layers of the fermentation tank and dynamically adjusting their height solves the problem of monitoring blind spots; using the YOLO algorithm to evaluate the composting status of the pile surface and combining the sensor data difference to judge the turning operation, thereby improving the accuracy of judgment; building an improved PID controller and using an improved Hippo optimization algorithm to optimize parameters, dynamically adapting to the time-varying characteristics of the fermentation process. Attached Figure Description
[0023] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a structural flow diagram of an optimized fermentation control method for treating organic waste in winter-warm greenhouses. Detailed Implementation
[0025] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described below in conjunction with the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0026] Numerous specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways than those described herein, and therefore the invention is not limited to the specific embodiments disclosed in the following specification.
[0027] In the example of organic waste treatment in winter-warm greenhouses, the precision of fermentation control directly affects the efficiency and quality of organic waste composting. Traditional methods suffer from incomplete monitoring, limited judgment of turning timing, and fixed control parameters, leading to energy waste and incomplete composting. To achieve comprehensive monitoring of fermentation status, accurate judgment of turning timing, and dynamic optimization of control parameters to improve fermentation efficiency and quality, and to overcome the shortcomings of traditional fermentation control technologies, this invention proposes an optimized fermentation control method for organic waste treatment in winter-warm greenhouses. The specific process of this invention is as follows: Figure 1 As shown.
[0028] First, multiple sensors are deployed in the fermentation tank to monitor parameters during the fermentation process. These sensors include temperature, humidity, oxygen concentration, and pH sensors. To address the blind spots and monitoring biases caused by traditional single-sensor monitoring and pile shrinkage, this invention deploys temperature, humidity, oxygen concentration, and pH sensors in the upper (5 / 6 of the tank bottom), middle (1 / 2 of the tank bottom), and lower (1 / 6 of the tank bottom) layers of the fermentation tank, with four types of sensors evenly distributed in each layer to obtain multi-dimensional data.
[0029] To eliminate monitoring blind spots caused by fermentation shrinkage and ensure continuous sensor coverage of the effective monitoring area, and to address the problem of data distortion and inaccurate reflection of fermentation status caused by changes in the volume of the fermentation pile using traditional fixed-position sensors, this invention employs a dynamic height adjustment mechanism. Specifically, by deploying sensors in the upper, middle, and lower layers of the fermentation tank, and incorporating the shrinkage rate of the fermentation pile, the height of each sensor is dynamically adjustable. The calculation method for this dynamic height adjustment is as follows: Where H is the original deployment height, H′ is the corrected deployment height, λ is the stack shrinkage rate, and t is the t-axis. f T represents the fermentation time. f This represents the total estimated fermentation time. The sensor deployment height is adjusted in real time, dynamically adapting to the shrinking of the pile, ensuring the sensors remain in the core fermentation area at the center of the pile. This provides real-time and accurate data support for determining the timing of turning the pile and controlling the fermentation process.
[0030] Next, considering the problem that traditional pile-turning trigger mechanisms are singular and prone to timing errors, this invention uses machine vision equipment to periodically acquire images of the pile surface, employs image recognition algorithms to assess the maturity state of the pile surface, and combines the differences in sensor data from the upper and lower layers of the pile to determine the pile-turning operation. Specifically, the image recognition algorithm for assessing the maturity state of the pile surface is the YOLO algorithm. The pile surface image data is input to obtain a maturity state score M. First, the YOLO algorithm needs to be trained. A large number of pile surface images with different degrees of maturity are collected and divided into training, validation, and test sets. Different maturity level labels are assigned to maturity features in the images, such as color and texture. The training set is input into the YOLO algorithm model, and the model continuously learns the relationship between the pile surface features and the corresponding maturity levels through a convolutional neural network. During training, the model parameters are continuously adjusted to improve the accuracy of recognizing different degrees of maturity. The validation set is used to evaluate the model performance and prevent overfitting. After training, the pile surface image data to be evaluated is input into the trained model. The model identifies features of the pile in the image, determines its degree of decay based on the learned patterns, and outputs the corresponding decay state score M. The calculation method for determining the pile-turning operation based on the obtained decay state score M and sensor error is: K·(1-M)≥θ, where θ is the pile-turning threshold, K is the sensor data comprehensive difference coefficient, and K=ω W ·ΔW+ω S ·ΔS+ω Y ·ΔY+ω P ·|ΔP|, where ΔW, ΔS, ΔY, and ΔP are the data differences between the upper and lower layers of the temperature sensor, humidity sensor, oxygen concentration sensor, and pH sensor, respectively, and ω W ω S ω Y ωP The corresponding weight coefficient is used to trigger the heap turning operation when it is greater than or equal to the heap turning threshold.
[0031] Next, considering that existing PID controllers for controlling the turning speed have fixed parameters and are difficult to adapt to the time-varying characteristics of the fermentation process, this invention first improves the PID controller. Specifically, the improvement of the PID controller is as follows: for the proportional component, the proportional coefficient K is adjusted based on the historical error trend. p (t) is dynamically weighted, and the calculation formula is: Where e(i) is the error at time i, max|e| is the maximum absolute value of the error within the window, and n represents the first n time steps; for the integration stage, the dynamic integration mode is switched according to the error change rate Δe(t), and the calculation method is as follows: Where δ is the conversion rate threshold, E max To determine the maximum allowable error for the differential element, a linear prediction model is constructed based on the historical error sequence [e(tn),...,e(t-1)]. Where a and b are parameters to be determined; the improved PID controller is ultimately... In the proportional gain stage, traditional PID controllers use a fixed proportional gain, which is difficult to adapt to the dynamic changes in the fermentation process. This invention calculates the proportional gain based on a dynamic weighted average of historical errors, enhancing the response to error trends. For example, when the error shows an increasing trend during fermentation, the proportional gain is adjusted accordingly, allowing the system to react quickly to the error, improving the system's response speed and preventing further error expansion. In the integral gain stage, traditional integral gain stages are prone to integral saturation. This invention switches the integral mode based on the error change rate. When the error change rate is large, a dynamic integral gain is used, effectively avoiding integral saturation and ensuring stable control even with large errors, preventing overshoot. The derivative gain stage constructs a linear prediction model to predict future errors. During fermentation, changes in microbial activity and environmental fluctuations lead to trend-like changes in error. By predicting future errors, the system can adjust control parameters in advance, significantly improving the real-time performance and accuracy of turning speed adjustment, ensuring that parameters such as pile temperature and oxygen concentration remain stable within appropriate ranges.
[0032] Simultaneously, based on the improved PID controller, an improved Hippo optimization algorithm is used to obtain the optimal PID controller parameters. An improved back-learning strategy is used to initialize the population, introducing a dynamic scaling factor and population distribution entropy to correct the search direction and globally optimize the PID parameters. Specifically, firstly, the objective function is defined as the square integral of the PID control performance index error, and the ranges of the proportional coefficient, integral coefficient, and derivative coefficient are set, and algorithm parameters such as population size and maximum number of iterations are initialized. Next, an improved back-learning strategy is used to generate the initial population. Specifically, the initial range of PID parameters is first determined, and for each parameter dimension of each initial individual, a back-learning individual is generated according to the parameter boundary symmetry principle. This ensures that the back-learning individuals and the initial individuals are symmetrically distributed in the search space, thereby expanding the coverage of the initial solution and avoiding local bias from random initialization. Then, a bidirectional evaluation mechanism is constructed, simultaneously calculating the fitness of the initial and back-learning individuals, and selecting the top N individuals based on their fitness to form a new population. This mechanism ensures that each individual in the initial population is a relatively optimal solution for the current region, improving the overall quality of the initial population. Then, diversity is detected in the new population by calculating the distribution entropy values among individuals to measure the evenness of their distribution in the parameter space and assess diversity. If the entropy value is below a preset threshold, indicating that the individual distribution is too concentrated, an improved back-learning strategy is used to generate individuals with spatially diverse distributions: the perturbation amplitude of back-learning is dynamically adjusted for the parameter dimensions of population aggregation, and new individuals are generated in sparse regions. After fitness screening, these individuals are added to the population until the diversity threshold is met. Then, an iterative optimization phase begins. Each iteration first calculates the population distribution entropy value to assess the evenness of individual distribution, and then dynamically adjusts the scaling factor according to the iteration progress to change the search step size (large step size for global exploration in the early stages, and small step size for local fine-tuning search in the later stages). Subsequently, hippo survival behavior is simulated to update individual positions, and population entropy values are introduced to correct the search direction. When individuals are concentrated, the search is guided towards sparse regions to avoid local optima. After the update, the parameters are checked to see if they exceed the preset range. Boundary corrections are performed for out-of-bounds values, and the fitness of new individuals is calculated. A competition mechanism is used to retain high-quality individuals. Repeat the above iterations until the maximum number of iterations is reached. After termination, output the parameters corresponding to the individual with the best fitness and apply them to the PID controller.
[0033] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments for application in other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. An optimized fermentation control method for treating organic waste in winter-warm greenhouses, characterized in that, Includes the following steps: S1. Deploy various sensors in the fermentation tank to monitor parameters during the fermentation process. The sensors include a temperature sensor, a humidity sensor, an oxygen concentration sensor, and a pH sensor. S2. Periodically acquire images of the pile surface using machine vision equipment, evaluate the maturity status of the pile surface using image recognition algorithms, obtain a maturity status score M, and combine it with the difference in sensor data from the upper, middle, and lower layers of the pile to determine the pile-turning operation; the calculation method for determining the pile-turning operation by combining the maturity status score M and sensor error is: K·(1-M)≥θ, where θ is the pile-turning threshold, K is the comprehensive difference coefficient of sensor data, K=ω W ·ΔW+ω S ·ΔS+ω Y ·ΔY+ω P ·|ΔP|, where ΔW, ΔS, ΔY, and ΔP are the data differences between the upper and lower layers of the temperature sensor, humidity sensor, oxygen concentration sensor, and pH sensor, respectively, and ω W ω S ω Y ω P The corresponding weight coefficient is used to trigger a heap turning operation when it is greater than or equal to the heap turning threshold. S3. Build an improved PID controller to control the turning speed. The improvement of the PID controller is that, for the proportional element, the proportional coefficient K is adjusted based on the historical error trend. p (t) is dynamically weighted, and the calculation formula is: Where e(i) is the error at time i, max|e| is the maximum absolute value of the error within the window, and n represents the first n time steps; For the integration stage, the dynamic integration mode is switched according to the error change rate Δe(t), and the calculation method is as follows: Where δ is the conversion rate threshold, E max The maximum allowable error; For the differential element, a linear prediction model is constructed based on the historical error sequence [e(tn),...,e(t-1)]. Where a and b are parameters to be determined; The improved PID controller ultimately became S4. The optimal parameters of the PID controller are obtained by using the improved Hippo optimization algorithm; the improved Hippo optimization algorithm achieves the optimization of the initialization population by improving the reverse learning strategy. S5. Obtain multiple optimized control parameters to control the turning operation and optimize the fermentation process.
2. The optimized fermentation control method for treating organic waste in a winter-warm greenhouse according to claim 1, characterized in that, In step S1, the sensor positions are divided into upper, middle and lower layers; the upper layer is 5 / 6 of the distance from the bottom of the pool, the middle layer is 1 / 2 of the distance from the bottom of the pool, and the lower layer is 1 / 6 of the distance from the bottom of the pool. Each layer includes the above four types of sensors, with equal distribution in type and position.
3. The optimized fermentation control method for treating organic waste in a winter-warm greenhouse according to claim 2, characterized in that, The height position of various sensors has dynamic height adjustment, and the calculation method for the dynamic height adjustment is as follows: Where H is the original deployment height, H′ is the corrected deployment height, λ is the stack shrinkage rate, and t is the t-axis. f T represents the fermentation time. f This represents the total estimated fermentation time.
4. The optimized fermentation control method for treating organic waste in a winter-warm greenhouse according to claim 1, characterized in that, In step S2, the image recognition algorithm is used to evaluate the maturity status of the pile surface. This is achieved by using the YOLO algorithm, inputting image data of the pile surface, and obtaining a maturity status score M.
5. The optimized fermentation control method for treating organic waste in a winter-warm greenhouse according to claim 1, characterized in that, The improved hippo optimization algorithm is implemented by: initializing population parameters, setting the maximum number of iterations, and the population size; During the iteration process, the individual position is updated by simulating hippo survival behavior, the fitness value of the PID controller parameters corresponding to each individual is calculated, high-quality individuals are retained through a competition mechanism, and the optimal PID controller parameters are output when the termination condition is met.
6. The optimized fermentation control method for treating organic waste in a winter-warm greenhouse according to claim 5, characterized in that, When initializing the population, an improved back learning strategy is adopted, which introduces a dynamic scaling factor to adjust the parameter offset of the back solution generation according to the search space dimension and the current iteration stage; for each individual parameter dimension, the search direction of back learning is dynamically corrected based on the current population distribution entropy value.
7. The optimized fermentation control method for treating organic waste in a winter-warm greenhouse according to claim 6, characterized in that, The process of optimizing the initial population based on the improved reverse learning strategy includes: in the population initialization stage, for the randomly generated initial individuals, the improved reverse learning strategy is used to generate a set of reverse individuals; a two-way evaluation mechanism is constructed to calculate the fitness of the initial individuals and the reverse individuals at the same time, and individuals with better fitness are selected to form a new population; the diversity of the new population is tested, and if it is lower than the preset threshold, individuals with spatial distribution differences are generated by supplementing it with the improved reverse learning strategy.
8. The optimized fermentation control method for treating organic waste in winter-warm greenhouses as described in any one of claims 1-7 is applied in the treatment of agricultural organic waste.
Citation Information
Patent Citations
Agricultural animal waste harmless high-efficiency composting quality online intelligent monitoring system
CN108168608A
High-temperature compost regulation and control system
CN219469951U