A method and system for controlling temperature fluctuation of a fixation machine based on an XGBoost algorithm
By predicting the optimal combination of PID parameters using the XGBoost algorithm and dynamically adjusting the heating power, the problem of large temperature fluctuations in drum-type tea fixing machines was solved, improving the consistency of tea quality and production efficiency, while reducing energy consumption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CNBM RES INST FOR AUTOMATION OF LIGHT IND CO LTD
- Filing Date
- 2026-02-05
- Publication Date
- 2026-06-12
AI Technical Summary
The fixed PID parameters of existing drum-type fixation machines result in large temperature deviations, making it difficult to adapt to different tea varieties and environmental changes. This leads to large temperature fluctuations, affecting the aroma and color of the tea, and the reliance on manual optimization is inefficient.
The XGBoost algorithm is used to predict the optimal combination of PID parameters. The model is trained using historical data, and the heating power is dynamically adjusted. Combined with real-time temperature feedback, a closed-loop control is formed to keep the temperature fluctuation within ±1.5℃.
This resulted in a 30% improvement in tea quality consistency, a 27% reduction in scrap rate, a 10% reduction in single-batch fixation time, and a 12.5% reduction in unit energy consumption.
Smart Images

Figure CN122195160A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of temperature control technology for blanching machines, and particularly relates to a method and system for controlling temperature fluctuations in blanching machines based on the XGBoost algorithm. Background Technology
[0002] Fixing is a very important step in tea processing. Its main purpose is to destroy and deactivate the oxidase activity in fresh leaves through high temperature, inhibit the enzymatic oxidation of tea polyphenols and other substances in the fresh leaves, prevent the tea leaves from changing color during the drying process, and at the same time, fixation can also quickly remove the grassy smell of green leaves and promote the formation of the tea's own good aroma. The main methods of fixation include pan-frying, steaming, soaking, and radiation fixation. Currently, the fixation machines on the market are mostly drum-type fixation machines.
[0003] The fixation machine is a mechanical device used in tea processing to deactivate the oxidase activity of fresh leaves at high temperatures, inhibit the enzymatic oxidation of tea polyphenols, and promote aroma formation. It is mainly used in the initial processing of agricultural products such as green tea, oolong tea, and chrysanthemum.
[0004] Existing drum-type blanching machines have the following problems during blanching: 1. Fixed PID parameters: Traditional PID controllers for tea fixing machines use fixed parameters (such as Kp=1.0, Ti=150s), which cannot adapt to temperature deviations caused by different tea varieties (such as green tea / black tea) or environmental changes (such as temperature, humidity and voltage fluctuations).
[0005] 2. Inefficient manual tuning: It relies on engineers' experience to adjust parameters, which is time-consuming and makes it difficult to guarantee the best control effect.
[0006] 3. Large temperature fluctuations: Fixed parameters are prone to overshoot or undershoot, with the temperature fluctuation range of the fixation process reaching ±5℃, which affects the aroma and color of the tea. Summary of the Invention
[0007] The purpose of this invention is to solve the above-mentioned technical problems existing in the prior art, and to provide a method and system for controlling temperature fluctuations in a tea fixing machine based on the XGBoost algorithm. This method can predict the optimal combination of PID parameters and dynamically adjust the heating power during the tea fixing process using the XGBoost algorithm, so as to achieve machine temperature fluctuations ≤ ±1.5℃, realize precise temperature control, and thus improve the consistency of tea quality and increase the yield rate.
[0008] To solve the above-mentioned technical problems, the present invention adopts the following technical solution: A method for controlling temperature fluctuations in a blanching machine based on the XGBoost algorithm, characterized by the following steps: S1. Historical Data Collection: Collect control data from the blanching machine, drum temperature, and ambient temperature and humidity, and upload them to the server.
[0009] S2, Data Preprocessing: Extract key features from historical data and normalize them, then remove outlier data.
[0010] S3 and XGBoost model training: The processed historical data is input into the model to predict the optimal combination of PID parameters.
[0011] S4. Real-time PID parameter prediction and execution: The PID parameters are collected in real time and input into the model. The model then predicts the PID parameters and sends them to the PID controller. The PID controller adjusts the parameters of the blanching machine according to the predicted parameters.
[0012] S5, Closed-loop feedback and model update: Real-time temperature data and prediction parameters are fed back to the database to update the model training set.
[0013] Furthermore, the detailed steps of step S1 include: S11. Set three PT100 sensors at the feed inlet, inner wall of the drum, and discharge outlet of the blanching machine, respectively, and set the sampling frequency of the PT100 sensors to 1Hz.
[0014] S12, the central control room CPU controller synchronously collects the heating power and drum speed data of the blanching machine, integrates them through TCP / IP protocol, and transmits them to the central control room server via optical fiber.
[0015] S13. Upload the data recorded by the blanching machine controller, including temperature and ambient temperature and humidity, to the central control room server, and compress and store the data.
[0016] Furthermore, in step S1, the historical data needs to cover tea varieties, seasons, and equipment status.
[0017] Furthermore, the detailed steps of step S2 include: S21. Extract key features of the data, including temperature deviation rate, heating power change rate, and ambient temperature and humidity.
[0018] S22. Use Min-Max normalization to eliminate dimensional differences.
[0019] S23. Detect and remove outlier data based on the isolated forest algorithm.
[0020] Furthermore, the detailed steps of step S3 include: S31. Input historical PID parameters, temperature fluctuation indicators, and environmental variables into the model; Historical PID parameters include Kp, Ti, and Td.
[0021] S32. The model predicts and outputs the optimal combination of PID parameters; The output PID parameters include Kp_opt, Ti_opt, and Td_opt.
[0022] Furthermore, in step S3, the model training strategy includes: Loss function: The mean squared error is defined as the optimization objective, which measures the deviation between the predicted parameters and the actual optimal parameters.
[0023] Hyperparameter tuning: Bayesian optimization algorithm was used to adjust the max_depth and learning_rate parameters of XGBoost to improve the model's generalization ability.
[0024] Cross-validation: Five-fold cross-validation is used to ensure model stability.
[0025] Furthermore, the detailed steps of step S4 include: S41. Real-time acquisition of current process characteristics, input into the trained XGBoost model, output of predicted PID parameters, and transmission of parameters to the PID controller via OPC UA protocol.
[0026] S42. The PID controller adjusts the heating power according to the predicted parameters and ensures that the target temperature deviation is ≤ ±1.5℃.
[0027] In step S4, if the real-time temperature fluctuation exceeds the threshold, the system automatically switches to the backup parameter group, records the abnormal event, and outputs an alarm.
[0028] Furthermore, step S5 also includes using an incremental learning algorithm to periodically fine-tune the XGBoost model to adapt to equipment aging or changes in tea varieties.
[0029] This invention also discloses a temperature control system for a tea processing machine, characterized by including an XGBoost parameter prediction module, a PID controller, a temperature sensor, and a data feedback module; supporting online learning and closed-loop feedback to adapt to equipment aging and process changes.
[0030] The present invention, by adopting the above-described technical solution, has the following beneficial effects: 1. Improved temperature control precision: The fluctuation range has been reduced from ±5℃ to ±1.5℃, resulting in a 30% improvement in the consistency of tea quality.
[0031] 2. Improved production efficiency: scrap rate reduced by 27%, and single batch blanching time shortened by 10%.
[0032] 3. Energy consumption optimization: By dynamically adjusting the heating power, the unit energy consumption is reduced by 12.5%. Attached Figure Description
[0033] The present invention will be further described below with reference to the accompanying drawings: Figure 1 The flowchart shows a method for controlling temperature fluctuations in a blanching machine 1 based on the XGBoost algorithm according to the present invention. Figure 2 This is a schematic diagram of the temperature control system for a tea fixing machine according to the present invention.
[0034] In the diagram, 1-Firing machine; 2-PID controller; 3-Temperature sensor; 4-Heating module; 5-Control host; 6-; 7-; 8-; 9-; 10-; 11-; 12-; 13-; 14-; 15-; 16-; 17-; 18-; 19-; 20-; 21-; 22-. Detailed Implementation
[0035] like Figure 1 As shown, this invention provides a method for controlling temperature fluctuations in a blanching machine 1 based on the XGBoost algorithm, comprising the following steps: S1. Historical Data Collection: Collect control data from the blanching machine 1, including drum temperature and ambient temperature and humidity, and upload it to the server.
[0036] S2, Data Preprocessing: Extract key features from historical data and normalize them, then remove outlier data.
[0037] S3 and XGBoost model training: The processed historical data is input into the model to predict the optimal combination of PID parameters.
[0038] S4. Real-time PID parameter prediction and execution: The PID parameters are collected in real time and input into the model. The model predicts the PID parameters and sends them to the PID controller 2. The PID controller 2 adjusts the parameters of the blanching machine 1 according to the predicted parameters.
[0039] S5, Closed-loop feedback and model update: Real-time temperature data and predicted parameters are fed back to the database to update the model training set. The larger the training dataset, the more accurate and reliable the data.
[0040] In the tea fixing process, this invention uses the XGBoost algorithm to predict the optimal combination of PID parameters and dynamically adjust the heating power to achieve temperature fluctuations ≤ ±1.5℃. It also uses historical production data to train a model that automatically learns the nonlinear relationship between process parameters and temperature fluctuations. By combining real-time temperature feedback with model prediction, a "prediction-adjustment-verification" closed loop is formed, improving the robustness of the system.
[0041] The detailed steps of step S1 include: S11. Set three PT100 sensors at the feed inlet, inner wall of the drum, and discharge outlet of the blanching machine 1, respectively, and set the sampling frequency of the PT100 sensors to 1Hz. S12, the central control room CPU controller synchronously collects the heating power and drum speed data of the heating module 4 of the blanching machine 1, integrates them through the TCP / IP protocol, and transmits them to the central control room server via optical fiber; S13. Upload the data of temperature and ambient temperature and humidity recorded by the controller of the blanching machine 1 to the central control room server, and compress and store the data.
[0042] By collecting historical data on the temperature at the feed inlet, inner wall of the drum, and discharge outlet of the blanching machine 1, the process characteristics of the blanching machine 1 can be more accurately grasped, thus improving the accuracy of model predictions.
[0043] In step S1, the historical data must cover tea varieties (such as Longjing No. 1 / Longjing No. 2), seasons (spring tea / autumn tea), and equipment status (new / old equipment).
[0044] Furthermore, the detailed steps of step S2 include: S21. Extract key features of the data, including temperature deviation rate, heating power change rate, and ambient temperature and humidity; S22. Use Min-Max normalization to eliminate dimensional differences; S23. Detect and remove abnormal data based on the isolated forest algorithm, such as temperature sudden changes caused by sensor failure.
[0045] By employing the above data processing methods, the interference of dimensional differences and outliers on the model can be eliminated, thereby improving the model's predictive accuracy.
[0046] The detailed steps of step S3 include: S31. Input historical PID parameters, temperature fluctuation indicators, and environmental variables into the model; Historical PID parameters include Kp, Ti, and Td; S32. The model predicts and outputs the optimal combination of PID parameters; The output PID parameters include Kp_opt, Ti_opt, and Td_opt.
[0047] Furthermore, in step S3, the model training strategy includes: Loss function: The mean squared error (MSE) is defined as the optimization objective, which measures the deviation between the predicted parameters and the actual optimal parameters; Hyperparameter tuning: Bayesian optimization algorithm was used to adjust the max_depth and learning_rate parameters of XGBoost to improve the model's generalization ability; Cross-validation: Five-fold cross-validation is used to ensure model stability.
[0048] The detailed steps of step S4 include: S41. Real-time acquisition of current process characteristics, input into the trained XGBoost model, output of predicted PID parameters, and transmission of parameters to PID controller 2 via OPC UA protocol; S42, PID controller 2 adjusts the heating power according to the predicted parameters and ensures that the target temperature deviation is ≤ ±1.5℃.
[0049] In step S42, if the real-time temperature fluctuation exceeds the threshold, typically ±2℃, the system automatically switches to the backup parameter group, records the abnormal event, and outputs an alarm.
[0050] Step S5 also includes using an incremental learning algorithm to periodically fine-tune the XGBoost model to adapt to equipment aging or changes in tea varieties.
[0051] The optimal PID parameter combination is predicted using the XGBoost algorithm, and the heating power is dynamically adjusted to achieve temperature fluctuations ≤ ±1.5℃. Data-driven parameter optimization: The model is trained using historical production data to automatically learn the nonlinear relationship between process parameters and temperature fluctuations. Closed-loop control mechanism: Combining real-time temperature feedback and model prediction, a "prediction-adjustment-verification" closed loop is formed to improve system robustness. Example
[0052] 1. Three PT100 sensors are deployed at the feed inlet, inner wall of the drum, and discharge outlet of the blanching machine 1, respectively, with a sampling frequency of 1Hz. The room temperature sensor is placed inside the factory building.
[0053] 2. The CPU controller in the central control room synchronously collects the heating power and drum speed data in the controller of the blanching machine 1, integrates them through the TCP / IP protocol, and transmits them to the server via optical fiber.
[0054] 3. Temperature sensor 3 (PT100, sampling frequency 1Hz), heating power (recorded by the blanching controller), and ambient temperature and humidity (PT100 sensor) of blanching machine 1 are uploaded to the central control room server for data compression and storage. Data calculated by the algorithm is distributed via TCP / IP network to control the temperature of blanching machine 1 in real time.
[0055] like Figure 2 As shown, this invention also discloses a temperature control system for a tea processing machine 1, including an XGBoost parameter prediction module, a PID controller 2, a temperature sensor 3, and a data feedback module; it supports online learning and closed-loop feedback to adapt to equipment aging and process changes. Both the XGBoost parameter prediction module and the data feedback module are located in the control host 5.
[0056] This invention achieves dynamic adaptive control by deeply integrating XGBoost and PID, using machine learning to overcome the limitations of traditional PID parameter tuning; the data-driven closed-loop system, combined with real-time feedback and online learning, continuously improves control accuracy; the model can be extended to processes such as rolling and drying, supporting the processing of multiple tea varieties, improving the consistency of tea quality, and increasing the yield rate.
[0057] The above are merely specific embodiments of the present invention, but the technical features of the present invention are not limited thereto. Any simple changes, equivalent substitutions, or modifications made based on the present invention to solve essentially the same technical problems and achieve essentially the same technical effects are all covered within the protection scope of the present invention.
Claims
1. A method for controlling temperature fluctuations in a blanching machine based on the XGBoost algorithm, characterized in that... Includes the following steps: S1. Historical Data Collection: Collect control data from the blanching machine, drum temperature, and ambient temperature and humidity, and upload them to the server; S2, Data Preprocessing: Extract key features from historical data and normalize them, then remove outlier data; S3 and XGBoost model training: The processed historical data is input into the model to predict the optimal combination of PID parameters; S4. Real-time PID parameter prediction and execution: The PID parameters are collected in real time and input into the model. The model predicts the PID parameters and sends them to the PID controller. The PID controller adjusts the parameters of the blanching machine according to the predicted parameters. S5, Closed-loop feedback and model update: Real-time temperature data and prediction parameters are fed back to the database to update the model training set.
2. The method for controlling temperature fluctuations in a blanching machine based on the XGBoost algorithm according to claim 1, characterized in that: The detailed steps of step S1 include: S11. Set three PT100 sensors at the feed inlet, inner wall of the drum, and discharge outlet of the blanching machine, respectively, and set the sampling frequency of the PT100 sensors to 1Hz. S12, the central control room CPU controller synchronously collects the heating power and drum speed data of the blanching machine, integrates them through TCP / IP protocol and transmits them to the central control room server via optical fiber; S13. Upload the data recorded by the blanching machine controller, including temperature and ambient temperature and humidity, to the central control room server, and compress and store the data.
3. The method for controlling temperature fluctuations in a blanching machine based on the XGBoost algorithm according to claim 1, characterized in that: In step S1, the historical data must cover tea varieties, seasons, and equipment status.
4. The method for controlling temperature fluctuations in a blanching machine based on the XGBoost algorithm according to claim 1, characterized in that: The detailed steps of step S2 include: S21. Extract key features of the data, including temperature deviation rate, heating power change rate, and ambient temperature and humidity; S22. Use Min-Max normalization to eliminate dimensional differences; S23. Detect and remove outlier data based on the isolated forest algorithm.
5. The method for controlling temperature fluctuations in a blanching machine based on the XGBoost algorithm according to claim 1, characterized in that: The detailed steps of step S3 include: S31. Input historical PID parameters, temperature fluctuation indicators, and environmental variables into the model; Historical PID parameters include Kp, Ti, and Td; S32. The model predicts and outputs the optimal combination of PID parameters; The output PID parameters include Kp_opt, Ti_opt, and Td_opt.
6. The method for controlling temperature fluctuations in a blanching machine based on the XGBoost algorithm according to claim 1, characterized in that: In step S3, the model training strategy includes: Loss function: Defines mean squared error as the optimization objective, measuring the deviation between the predicted parameters and the actual optimal parameters; Hyperparameter tuning: Bayesian optimization algorithm was used to adjust the max_depth and learning_rate parameters of XGBoost to improve the model's generalization ability; Cross-validation: Five-fold cross-validation is used to ensure model stability.
7. The method for controlling temperature fluctuations in a blanching machine based on the XGBoost algorithm according to claim 1, characterized in that: The detailed steps of step S4 include: S41. Real-time acquisition of current process characteristics, input into the trained XGBoost model, output of predicted PID parameters, and transmission of parameters to the PID controller via OPC UA protocol; S42. The PID controller adjusts the heating power according to the predicted parameters and ensures that the target temperature deviation is ≤ ±1.5℃.
8. The method for controlling temperature fluctuations in a blanching machine based on the XGBoost algorithm according to claim 7, characterized in that: In step S42, if the real-time temperature fluctuation exceeds the threshold, the system automatically switches to the backup parameter group, records the abnormal event, and outputs an alarm.
9. The method for controlling temperature fluctuations in a blanching machine based on the XGBoost algorithm according to claim 1, characterized in that: Step S5 also includes using an incremental learning algorithm to periodically fine-tune the XGBoost model to adapt to equipment aging or changes in tea varieties.
10. A temperature control system for a tea fixing machine, characterized in that: It includes an XGBoost parameter prediction module, a PID controller, a temperature sensor, and a data feedback module; it supports online learning and closed-loop feedback to adapt to equipment aging and process changes.