Predictive control method and system for tobacco conditioning equipment
By employing predictive control methods and utilizing a Transformer model that fuses sensor data and physical information over time, the problems of lag and changing operating conditions in tobacco rehumidification equipment were solved, achieving high-precision and adaptive control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HONGTA TOBACCO (GROUP) CO LTD
- Filing Date
- 2026-05-08
- Publication Date
- 2026-06-12
AI Technical Summary
The control of tobacco rehumidification equipment suffers from problems such as lag, lack of adaptive operating condition changes, and inaccurate models, making it difficult to meet the requirements of high-precision processes in terms of control accuracy and stability.
Predictive control is employed, which uses sensors to collect data in real time, performs anomaly detection and smoothing, uses a Transformer model with physical information time-series fusion for prediction, and combines a rolling time-domain optimization algorithm to solve for the optimal control sequence, thereby achieving high-precision control that adapts to changes in operating conditions.
It achieves high-precision and stable control of the tobacco rehydration process, can adapt to tobacco leaf formulation and environmental disturbances, reduces dependence on fixed models, and improves the system's robustness and autonomous evolution capability.
Smart Images

Figure CN122181741A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of tobacco technology, and in particular to a predictive control method and system for a tobacco rehydration device. Background Technology
[0002] Tobacco leaf threshing and re-drying is a core step in tobacco primary processing. One of its ultimate goals is to adjust tobacco leaves from different batches and in different states to uniform and stable physical and chemical indicators. Among these, the moisture content at the outlet is a crucial indicator determining the quality of subsequent processes and the final product. In the tobacco leaf re-drying machine, the re-humidification section plays a key role, responsible for precisely raising the moisture content of the dried and cooled tobacco leaves (which have low moisture content) to a target value, such as 12.0% ± 0.5%, through precise control of the sprayed atomized water or steam. However, achieving this goal faces profound technical challenges in the control process. First, the re-humidification process is essentially a typical multivariable, strongly coupled, large-lag, and nonlinear heat and moisture exchange system. Its dynamic characteristics are simultaneously disturbed by multiple factors, including the flow rate, temperature, moisture content, variety, grade, and leaf structure of the inlet tobacco leaves, as well as the ambient temperature and humidity, steam pressure, and atomized water pressure in the re-humidification zone. This makes it extremely difficult to establish an accurate first-principles mathematical model. Faced with such a complex object, traditional PID (proportional-integral-derivative) controllers perform poorly due to their inherent limitations. The significant pure time delay in the system (typically more than 180 seconds from the time water is added to the time the outlet moisture meter detects the change) puts PID parameter tuning in a dilemma: if stability is to be guaranteed, the response speed must be slow; if the response speed is to be increased, overshoot and oscillation are very likely to occur, resulting in frequent fluctuations in outlet moisture, which cannot meet the increasingly stringent ±0.3% high-precision process requirements.
[0003] To overcome the lag problem, the industry has developed advanced control algorithms based on Smith predictors, predictive PI, or quasi-predictive PI. These methods compensate for lag by establishing a first-order or higher-order transfer function model with pure time delay, which does offer significant improvement compared to traditional PID. However, their core bottleneck lies in the fact that the transfer function model they rely on is static and linear. This model is usually identified through step response tests under specific operating conditions. Once the actual production conditions deviate from the identified operating point, such as changing tobacco batches (changing physical properties), seasonal fluctuations in ambient temperature and humidity, or equipment aging (e.g., nozzle blockage, pump seal wear and reduced efficiency), this fixed model will quickly become mismatched, leading to a sharp decline in control performance. Summary of the Invention
[0004] The main objective of this application is to provide a predictive control method and system for tobacco rehumidification equipment, in order to solve the problems of lag, lack of adaptive operating condition changes, and inaccurate models in the control of tobacco rehumidification equipment in the prior art.
[0005] To achieve the above objectives, this application provides the following technical solution: A predictive control method for a tobacco rehumidification device, the predictive control method being applied to a tobacco rehumidification device equipped with sensors, the predictive control method comprising: Step S1: The inlet tobacco leaf flow rate, moisture meter reading, water addition amount, and chain speed of the tobacco rehumidification equipment are collected in real time by the sensor to generate the raw process data stream; Step S2: Perform anomaly detection, smoothing, and Z-score standardization on the original process data stream to obtain a cleaned and standardized time-series data stream; Step S3: Calculate the dynamic transmission lag time of the chain vehicle in the cleaned and standardized time-series data stream through numerical integration, and integrate it into the cleaned and standardized time-series data stream to obtain a dynamic feature-enhanced data stream; Step S4: Input the dynamic feature-enhanced data stream into the physical information time-series fusion Transformer model to perform several steps of look-ahead prediction to obtain the future outlet moisture sequence and temperature prediction sequence; Step S5: Based on the future outlet moisture sequence and the temperature prediction sequence, solve the optimal water addition and chain vehicle speed control sequence for the future outlet moisture sequence and the temperature prediction sequence using a rolling time-domain optimization algorithm. Step S6: The optimal water addition amount and the chain vehicle speed control sequence are sent to the tobacco rehumidification equipment to realize predictive control of the tobacco rehumidification equipment.
[0006] Beneficial effects of steps S1 to S6: Through the predictive control method in steps S1 to S6, a significant improvement in the control accuracy and stability of the tobacco rehydration process is achieved overall. Specifically, the method first ensures the comprehensiveness of input information through high-frequency data acquisition in step S1; rigorous preprocessing in step S2 eliminates noise and anomalies, laying a reliable foundation for subsequent analysis; dynamic feature enhancement in step S3 effectively quantifies and compensates for system transmission lag, overcoming the oscillation problem caused by large lag in traditional control; physical information enhancement in step S4 introduces physical constraints of heat and moisture transfer into the model prediction, ensuring that the prediction results conform to both data patterns and physical reality, improving the reliability and interpretability of the model; rolling time-domain optimization in step S5 solves the optimal control sequence online based on high-precision prediction, realizing the transformation from passive response to active adjustment; and control command issuance in step S6 completes closed-loop execution. This coherent process enables the system to adapt to changes in operating conditions such as tobacco formulation and environmental disturbances, maintaining robust performance. Simultaneously, a built-in self-monitoring mechanism supports autonomous evolution throughout the entire lifecycle, reducing reliance on fixed models and manual intervention, ultimately achieving the goal of high-precision and high-stability automated control.
[0007] As a further improvement to this application, step S1 involves real-time acquisition of the inlet tobacco leaf flow rate, moisture meter reading, water addition amount, and conveyor speed of the tobacco rehumidification equipment using the aforementioned sensors, generating a raw process data stream, including: Step S11: Deploy the OPC UA client through the edge computing gateway to establish a real-time communication connection with the DCS / PLC system of the tobacco rehumidification equipment, and synchronously collect data on the inlet tobacco flow rate, the inlet moisture meter reading of the cooling zone, the water addition, the chain speed, the temperature and humidity of the circulating air in the rehumidification zone, and the moisture and temperature sensor data of the outlet, and generate an initial sensor data stream. Step S12: Asynchronously acquire the static inherent information of tobacco and the slowly changing disturbance data of temperature and humidity in the workshop environment to obtain the static metadata stream; Step S13: Add a unified timestamp to all data points of the initial sensor data stream and the static metadata stream using the Network Time Protocol to obtain a timestamp data stream; Step S14: Align all data sequences of the timestamp data stream to a time grid of a preset duration using a resampling algorithm to obtain a resampled data sequence; Step S15: Combine the resampled data sequence into a structured format to obtain the original process data stream.
[0008] Beneficial effects of steps S11 to S15: This process constructs a high-fidelity, highly consistent, and information-complete real-time data foundation for the entire predictive control system. Specifically, step S11 utilizes the OPC UA protocol to achieve synchronous high-frequency acquisition of multi-source sensor data, ensuring complete capture of the instantaneous state of process variables and overcoming the data timing discrepancies that can occur with traditional asynchronous acquisition. Step S12 integrates static batch and slowly varying disturbance information acquired by the MES / LIMS system, linking production background knowledge with real-time dynamic data and providing crucial context for the model to understand different operating conditions. Step S13 applies the NTP protocol to unify timestamps, eliminating data causal chaos caused by clock asynchrony in various subsystems and ensuring strict alignment of all data points on a unified time axis. Step S14's resampling and interpolation processes normalize data sequences of different frequencies to the same time grid, generating a completely aligned and continuous data sequence in the time dimension, providing normalized input for subsequent time-series model consumption. Step S15 finally combines the processed multi-dimensional data streams into a structured format, producing a raw process data stream that not only includes rich real-time information but also possesses high temporal and causal consistency. This series of steps works synergistically to fundamentally improve the quality and reliability of the input data, enabling subsequent anomaly detection, feature engineering, and model prediction to be based on an accurate and consistent data base. This effectively avoids model prediction bias and control decision errors caused by problems with the data itself (such as asynchrony, incompleteness, or inconsistency), laying a data foundation for the system to achieve high-precision control.
[0009] As a further improvement to this application, step S2 involves performing anomaly detection, smoothing, and Z-score standardization on the original process data stream to obtain a cleaned and standardized time-series data stream, including: Step S21: Perform multivariate anomaly detection on the original process data stream using the isolated forest algorithm to identify abnormal data points; Step S22: Repair all abnormal data points using cubic spline interpolation to obtain the time series data stream after anomaly repair; Step S23: The anomaly-corrected time-series data stream is smoothed using a Savitzky-Gore filter to obtain a smoothed time-series data stream; Step S24: Perform Z-score normalization on the smoothed time-series data stream to obtain a cleaned and normalized time-series data stream.
[0010] Beneficial effects of steps S21 to S24: This is reflected in the construction of a high-quality, highly consistent input data foundation for the entire predictive control system, significantly improving the accuracy and reliability of subsequent model predictions through a systematic data processing flow. Specifically, step S21 applies the isolated forest algorithm for multivariate anomaly detection, effectively identifying outliers in the high-dimensional data stream that do not conform to the normal operating condition distribution, such as outliers caused by instantaneous sensor jumps or communication interference, thus ensuring the authenticity and representativeness of the data from the source and preventing abnormal data from misleading model training and inference. Step S22, based on the detected anomalies, uses cubic spline interpolation for repair. This method can fill in missing or distorted values while maintaining the overall trend and smoothness of the data, generating a continuous and complete time-series data stream after anomaly repair, effectively preventing model training instability caused by data interruptions or sudden changes. Step S23 utilizes Savi... The Tzigi-Gore filter smooths the repaired data stream. While suppressing high-frequency random noise, this filter can better preserve the key features of the signal itself, such as peak shape and width. The smoothed time series data stream reduces random fluctuations in the data, providing a clearer input for the model to capture real physical dynamics. Step S24 finally performs Z-score standardization on the smoothed data. Using fixed mean and standard deviation parameters calculated from the historical training set, variables with different physical units and dimensions are transformed to the same numerical scale, eliminating the interference of scale differences between features on the model's weight learning. This makes the cleaned and standardized time series data stream numerically consistent and model-friendly.
[0011] As a further improvement to this application, step S3 involves calculating the chain vehicle dynamic transmission lag time of the cleaned and standardized time-series data stream through numerical integration, and integrating it into the cleaned and standardized time-series data stream to obtain a dynamic feature-enhanced data stream, including: Step S31: Extract the chain vehicle speed time series from the standardized cleaning time series data stream, as well as the upstream variable time series including inlet tobacco leaf flow rate, moisture meter reading, and water addition amount; Step S32: Calculate the dynamic transmission lag time of the chain vehicle speed time series under the premise of satisfying the preset integral equation using the trapezoidal rule numerical integration algorithm to obtain the dynamic lag time series. Step S33: Perform a time shift operation on the upstream variable time series using the dynamic lag time series to obtain a lag-aligned upstream feature series; Step S34: Calculate the cumulative water addition characteristics based on the chain vehicle speed time series using an accumulation and numerical integration algorithm to obtain a cumulative physical quantity sequence; Step S35: Integrate the upstream feature sequence and the accumulated physical quantity sequence into the cleaned and standardized time-series data stream to obtain a dynamic feature-enhanced data stream.
[0012] Beneficial effects of steps S31 to S35: This is reflected in the fact that the dynamic feature enhancement method effectively solves the problems of transmission lag and nonlinear cumulative effect caused by changes in the speed of the chain vehicle during the tobacco rehydration process, thereby improving the quality of input data for subsequent prediction models. Step S31 extracts the time series of the conveyor belt speed and the upstream variable time series, providing a core data foundation for lag compensation and feature construction, ensuring the integrity of key process variables. Step S32 applies the trapezoidal rule numerical integration algorithm to calculate the dynamic transmission lag time, which can accurately quantify the material transmission delay that changes in real time with the conveyor belt speed, avoiding the mismatch risk of traditional fixed lag models. Step S33 performs time shifting operations on the upstream variables based on the dynamic lag time series to generate lag-aligned upstream feature sequences, making the model input have strict causal consistency in the time dimension and strengthening the physical correlation between features and outputs. Step S34 calculates the cumulative water addition feature through accumulation and numerical integration algorithms, introducing the cumulative physical quantity of historical effects on tobacco leaves during transmission, thereby capturing nonlinear dynamic effects. Step S35 integrates the lag-aligned upstream feature sequences and cumulative physical quantity sequences into the original data stream to form a dynamic feature-enhanced data stream. This data stream not only includes the original observation information but also incorporates mechanism-driven dynamic characteristics, providing the model with richer and more physically realistic input representations, thereby supporting high-precision predictive control.
[0013] As a further improvement to this application, step S4 involves inputting the dynamic feature-enhanced data stream into a physical information time-series fusion Transformer model for several steps of look-ahead prediction to obtain future outlet moisture and temperature prediction sequences, including: Step S41: Input the dynamic feature enhancement data stream into the pre-trained physical information time-series fusion Transformer model to parse it into static metadata vector, historical observation time-varying input sequence, and future known time-varying input sequence; Step S42: Input the static metadata vector into the gated residual network, decompose it to obtain the variable selection context vector, the LSTM initial state context vector, and the feature-rich context vector, and integrate them to obtain the static context vector. Step S43: The historical observation time-varying input sequence, the future known time-varying input sequence, and the static context vector are combined using a weighted LSTM encoder-decoder structure to obtain the hidden state sequence. Step S44: Input the hidden state sequence into the temporal multi-head self-attention module, and obtain the attention-weighted feature sequence through query, key-value projection and scaled dot product attention calculation; Step S45: Perform gated residual connection and layer normalization operations on the attention-weighted feature sequence to obtain the comprehensive feature vector for each future time step; Step S46: Input all the integrated feature vectors into the physical information enhancement decoder, and map them to the physical state space through linear projection to obtain the future outlet moisture sequence and temperature prediction sequence.
[0014] Beneficial effects of steps S41 to S46: By constructing a prediction model that can deeply integrate multi-source information and strictly follow physical laws, the accuracy, reliability, and physical consistency of export moisture and temperature predictions are significantly improved. Specifically, step S41 parses the dynamic feature enhancement data stream into static metadata vectors, historical observation time-varying input sequences, and future known time-varying input sequences, providing a structured input basis for the model and ensuring the synergistic utilization of static batch characteristics and dynamic process variables. Step S42 processes the static metadata vectors through a gated residual network, generating variable selection context vectors, LSTM initial state context vectors, and feature-rich context vectors, integrating them into a static context vector. This enables the model to adaptively modulate static conditions such as specific tobacco leaf formulations, enhancing its generalization ability under operating conditions. Step S43 utilizes a shared-weight LSTM encoder-decoder structure to fuse historical and future time-varying input sequences and static context vectors, producing a hidden state sequence that effectively captures local temporal dependencies, providing a temporally context-rich intermediate representation for subsequent analysis. Step S44 inputs the hidden state sequence into the time-multi-head self-attention module. Through query, key-value projection, and scaled dot product attention calculation, it mines the global long-term dependency patterns within the sequence, generating an attention-weighted feature sequence to improve the model's ability to model complex dynamic associations. Step S45 performs gated residual connections and layer normalization operations on the attention-weighted feature sequence to balance novel information with historical states, producing a comprehensive feature vector for each future time step, enhancing the stability and information density of feature representation. Step S46 linearly projects the comprehensive feature vector onto the physical state space through a physical information-enhanced decoder and introduces physical residual constraints based on the laws of energy conservation and mass conservation, ensuring that the prediction results both fit the data distribution and conform to physical mechanisms, preventing outputs that violate reality, and finally obtaining a high-precision, interpretable future outlet moisture and temperature prediction sequence.
[0015] As a further improvement to this application, step S5, based on the future outlet moisture sequence and the temperature prediction sequence, solves the optimal water addition and chain vehicle speed control sequence for the future outlet moisture sequence and the temperature prediction sequence using a rolling time-domain optimization algorithm, including: Step S51: Initialize the rolling time-domain optimization problem using the future outlet moisture sequence and the temperature prediction sequence, define the prediction time domain and control time domain, load the reference setpoint sequence, and obtain the initialization optimization problem parameters; Step S52: Based on the initialized optimization problem parameters, construct an objective function including a tracking error weighted sum of squares term, a control variable change rate penalty term, and a slack variable penalty term; Step S53: Define the system dynamic constraint equations for the objective function, wherein the system dynamic constraint equations ensure that the state evolution follows the physical information temporal fusion Transformer model; Step S54: Define the magnitude constraint and rate of change constraint of the manipulable variable according to the dynamic constraint equation, and integrate them to obtain the variable constraint conditions; Step S55: Define soft constraints for the controlled variable based on the variable constraint conditions and introduce non-negative relaxation variables to obtain the soft constraint conditions. Step S56: Based on the soft constraints, the optimization problem is constructed into a nonlinear programming problem using the CasaADi symbolic computation framework, and the gradient and Hessian matrix of the nonlinear programming problem are calculated to obtain the symbolic NLP problem; Step S57: Solve the symbolic NLP problem using the IPOPT solver to obtain the optimal water addition and chain vehicle speed control sequence.
[0016] Beneficial effects of steps S51 to S57: By constructing an efficient and reliable real-time optimization decision-making mechanism, the predicted output of the physical information time-series fusion Transformer model is transformed into feasible optimal control commands. Specifically, step S51 initializes the rolling time-domain optimization problem and defines the prediction time domain, control time domain, and reference setpoint sequence, laying a structured foundation for the optimization solution and ensuring a clear spatiotemporal framework and objective orientation for the optimization process. Step S52 constructs an objective function including a weighted sum of squares of tracking error, a penalty term for the rate of change of control variable, and a penalty term for slack variables. This aims to pursue setpoint tracking accuracy while considering the smoothness of control actions and system robustness, avoiding overly aggressive or oscillating control strategies. Step S53 defines the system dynamic constraint equations, forcing the state evolution during the optimization process to strictly follow the dynamic laws of the physical information time-series fusion Transformer model, ensuring the inherent physical consistency between the decision logic and the prediction model. Step S54 further defines the amplitude constraints and rate of change of the manipulated variables based on the dynamic constraint equations. Constraints are integrated to form variable constraints, ensuring that the solved control quantity is within the physical limit of the actuator and changes gradually, improving operational safety and equipment lifespan. Step S55 introduces soft constraints and non-negative relaxation variables for the controlled variable based on the variable constraints, forming soft constraint conditions, enhancing the optimization problem's tolerance to temporary disturbances or boundary conflicts, and preventing unsolvable situations. Step S56 uses the CasaADi symbolic computing framework to construct the soft-constrained optimization problem into a nonlinear programming problem, and automatically calculates the gradient and Hessian matrix to obtain a symbolic NLP problem, providing accurate mathematical description and derivative information for efficient numerical solutions. Step S57 solves the symbolic NLP problem using the IPOPT solver, finally obtaining the optimal water addition and chain vehicle speed control sequence, completing the transformation from prediction to decision.
[0017] As a further improvement to this application, step S6 involves sending the optimal water addition amount and the chain vehicle speed control sequence to the tobacco rehumidification equipment to achieve predictive control of the tobacco rehumidification equipment, including: Step S61: Extract the optimal water addition amount and the optimal control quantity of the chain vehicle speed control sequence based on the current moment as the control command to be issued; Step S62: Perform real-time range verification on the control command to be issued to ensure that the value of the control command to be issued is within the physical limit range of the actuator, and obtain a verification-passed control command; Step S63: The verification is encoded into a write request data format based on the OPC UA protocol by the control command to obtain an OPC UA write request message; Step S64: Deploy an OPC UA client through the edge computing gateway to asynchronously send the OPC UA write request message to the tobacco rehumidification device.
[0018] Beneficial effects of steps S61 to S64: The optimal control sequence obtained from optimization calculations is safely, reliably, and timely transformed into specific actions of the underlying actuators, thus completing the final link from decision-making to execution and ensuring the closed-loop operation of the control system. Specifically, step S61 accurately extracts the control command corresponding to the current moment from the optimal control sequence. Its core function is to achieve the immediacy of the control strategy, ensuring that the latest and most relevant decisions are implemented in each control cycle, avoiding delays caused by processing the entire future sequence, and maintaining the real-time response capability of the control. Step S62 performs real-time range verification on the extracted commands. This step, through built-in physical limiting logic, acts as a critical safety barrier to prevent dangerous commands exceeding the mechanical or technological limits of the actuators due to model prediction deviations or optimization anomalies, fundamentally eliminating the risk of equipment damage or process accidents and improving the inherent safety of system operation. Step S63 encodes the verified safe commands into standardized OPC UA write request messages. This is significant in achieving seamless and semantically clear communication between high-level applications and the underlying industrial control system, utilizing OPC... UA's rich data models and built-in security mechanisms ensure the integrity, identifiability, and anti-interference of control commands during transmission, solving the protocol conversion problem in heterogeneous system integration. Step S64 asynchronously sends the command to the PLC through the edge gateway and listens for the response signal. This not only completes the final triggering of the control action, but more importantly, it establishes a clear execution feedback loop through the confirmation mechanism. This provides the upper-level controller with confirmation information on whether the command has been successfully implemented, thereby supporting the control system to monitor and diagnose the execution status and providing a basis for whether compensation or recalculation is needed for the next cycle of rolling optimization.
[0019] To achieve the above objectives, this application also provides the following technical solutions: A predictive control system for a tobacco rehumidification device, wherein the predictive control system is applied to the predictive control method described above, and the predictive control system comprises: The raw process data stream acquisition module is used to collect the inlet tobacco leaf flow rate, moisture meter reading, water addition amount, and chain speed of the tobacco rehumidification equipment in real time through the sensors, and generate the raw process data stream; The raw process data stream processing module is used to perform anomaly detection, smoothing, and Z-score standardization on the raw process data stream to obtain a cleaned and standardized time-series data stream. The original process data stream enhancement module is used to calculate the chain vehicle dynamic transmission lag time of the cleaned and standardized time-series data stream through numerical integration, and integrate it into the cleaned and standardized time-series data stream to obtain a dynamic feature enhanced data stream. The future data stream prediction module is used to input the dynamic feature-enhanced data stream into the physical information time-series fusion Transformer model to perform several steps of look-ahead prediction, and obtain the future outlet moisture sequence and temperature prediction sequence. The future optimal control sequence solving module is used to solve the optimal water addition and chain vehicle speed control sequence based on the future outlet moisture sequence and the temperature prediction sequence using a rolling time-domain optimization algorithm. The future optimal control sequence distribution module is used to distribute the optimal water addition and chain vehicle speed control sequences to the tobacco rehumidification equipment to achieve predictive control of the tobacco rehumidification equipment.
[0020] To achieve the above objectives, this application also provides the following technical solutions: An electronic device includes a processor and a memory coupled to the processor, the memory storing program instructions executable by the processor; when the processor executes the program instructions stored in the memory, it implements the predictive control method as described above.
[0021] To achieve the above objectives, this application also provides the following technical solutions: A computer-readable storage medium storing program instructions that, when executed by a processor, enable the implementation of the predictive control method described above. Attached Figure Description
[0022] Figure 1 This is a flowchart illustrating the steps of an embodiment of a predictive control method for a tobacco rehydration device according to this application. Figure 2 This is a schematic diagram of the functional modules of a predictive control system for a tobacco rehydration device according to an embodiment of this application; Figure 3 This is a schematic diagram of the structure of an embodiment of the electronic device of this application; Figure 4 This is a schematic diagram of the structure of one embodiment of the storage medium of this application. Detailed Implementation
[0023] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0024] The terms "first," "second," and "third" in this application are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first," "second," or "third" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified. All directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of this application are only used to explain the relative positional relationships and movement of components in a specific orientation (as shown in the figures). If the specific orientation changes, the directional indications also change accordingly. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0025] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0026] like Figure 1 As shown, a predictive control method for a tobacco rehumidification device is applied to a tobacco rehumidification device equipped with sensors.
[0027] Specifically, the predictive control method includes the following steps: Step S1: Real-time data collection of inlet tobacco leaf flow rate, moisture meter reading, water addition amount, and conveyor speed of the tobacco rehumidification equipment is performed using sensors to generate raw process data stream.
[0028] Further, in step S1, the inlet tobacco leaf flow rate, moisture meter reading, water addition amount, and conveyor speed of the tobacco rehumidification equipment are collected in real time by sensors to generate a raw process data stream, which specifically includes the following steps: Step S11: Deploy an OPC UA client through the edge computing gateway to establish a real-time communication connection with the DCS / PLC system of the tobacco rehumidification equipment, and synchronously collect data from the inlet tobacco leaf flow rate, the inlet moisture meter reading of the cooling zone, the water addition, the chain speed, the temperature and humidity of the circulating air in the rehumidification zone, and the moisture and temperature sensor data at the outlet, and generate an initial sensor data stream.
[0029] Preferably, an OPC UA (IEC 62541 standard) client is deployed on an edge computing gateway (e.g., an industrial server), which connects to the DCS (Distributed Control System) or PLC (Programmable Logic Controller) of the tobacco rehydration equipment via Ethernet. The communication protocol adopts the Pub-Sub mode of OPC UA to ensure target latency <100ms and high reliability.
[0030] Preferably, the sampling period can be set to 5 seconds, i.e., 0.2Hz. The sampling period can also be balanced between data freshness and system load based on industrial real-time requirements.
[0031] Preferably, the collected data specifically includes: ①Inlet tobacco flow rate (unit: kg / h), typically ranging from 5000 to 20000 kg / h, with an accuracy of ±0.5%.
[0032] ② Reading of moisture meter at the inlet of cooling zone (unit: %), range 0% 100%, accuracy ±0.1%.
[0033] ③ Water addition rate for each tidal zone (unit: L / min), ranging from 0 L / min to 50 L / min for each zone.
[0034] ④ Chain car speed (unit: m / min), range 5 m / min to 30 m / min.
[0035] ⑤ Temperature of circulating air in the humidification zone (unit: °C), ranging from 20℃ to 100℃.
[0036] ⑥ Humidity of circulating air in the humidification zone (unit: %RH), ranging from 0% to 100%.
[0037] ⑦ Export moisture (unit: %), range 0% to 100%, accuracy ±0.05%.
[0038] ⑧ Outlet temperature (unit: °C), range 20℃ to 100℃.
[0039] Step S12: Asynchronously acquire the static inherent information of tobacco and the slowly changing disturbance data of temperature and humidity in the workshop environment to obtain the static metadata stream.
[0040] Preferably, data can be obtained asynchronously from the Manufacturing Execution System (MES) and the Laboratory Information Management System (LIMS) via the HTTP / 1.1 protocol of the RESTful API.
[0041] Preferably, an example of a MES API endpoint is as follows: https: / / <mes_server> / api / batch / current returns batch data in JSON format.
[0042] Preferably, an example of a LIMS API endpoint is as follows: https: / / <lims_server> / api / tobacco / properties returns the physicochemical properties of tobacco leaves.
[0043] Preferably, the static data acquisition frequency is set to once every 5 minutes (low frequency). Because the batch information changes slowly, the environmental temperature and humidity data (workshop environment) acquisition frequency is once every 30 seconds, and it is read from the environmental sensor via the Modbus TCP protocol.
[0044] Step S13: Add a unified timestamp to all data points of the initial sensor data stream and static metadata stream using the network time protocol to obtain a timestamp data stream.
[0045] Preferably, the edge gateway clock can be synchronized with the local NTP server via Network Time Protocol (NTP, RFC 5905 standard). A system clock timestamp is applied to each data point in the initial sensor data stream and static metadata stream.
[0046] Preferably, the timestamp accuracy is required to be less than 10 milliseconds; if NTP synchronization fails, a hardware clock (RTC) is used as a backup, and the drift rate can be set to ±2 seconds per day.
[0047] Step S14: Align all data sequences of the timestamp data stream to a time grid of a preset duration using a resampling algorithm to obtain a resampled data sequence.
[0048] Preferably, a resampling algorithm aligns all sequences in the timestamp data stream to a uniform time grid with 5-second intervals, i.e., time points t, t+5s, t+10s, ..., with missing values filled by linear interpolation. The resampling time grid of the resampling algorithm is fixed at 5 seconds, consistent with the sampling period; the interpolation tolerance gap threshold is 30 seconds, and values exceeding this interval are marked as missing data and no interpolation is performed.
[0049] Preferably, the linear interpolation algorithm is based on the formula: for a missing point t in a time series, its value y(t) is calculated from the adjacent points (t1,y1) and (t2,y2): y(t)=y1+(y2-y1)×(t-t1) / (t2-t1), where t1≤t≤t2.
[0050] Step S15: Combine the resampled data sequence into a structured format to obtain the original process data stream.
[0051] Preferably, the resampled data sequence can be merged by time index using a data structuring library, such as Pandas DataFrame, with each time point corresponding to a row vector including all variable values. During structuring, the memory buffer size is set to 1000 time points, approximately 5 seconds of data; data exceeding this limit is written to a time-series database, such as InfluxDB.
[0052] Beneficial effects of steps S11 to S15: This process constructs a high-fidelity, highly consistent, and information-complete real-time data foundation for the entire predictive control system. Specifically, step S11 utilizes the OPC UA protocol to achieve synchronous high-frequency acquisition of multi-source sensor data, ensuring complete capture of the instantaneous state of process variables and overcoming the data timing discrepancies that can occur with traditional asynchronous acquisition. Step S12 integrates static batch and slowly varying disturbance information acquired by the MES / LIMS system, linking production background knowledge with real-time dynamic data and providing crucial context for the model to understand different operating conditions. Step S13 applies the NTP protocol to unify timestamps, eliminating data causal chaos caused by clock asynchrony in various subsystems and ensuring strict alignment of all data points on a unified time axis. Step S14's resampling and interpolation processes normalize data sequences of different frequencies to the same time grid, generating a completely aligned and continuous data sequence in the time dimension, providing normalized input for subsequent time-series model consumption. Step S15 finally combines the processed multi-dimensional data streams into a structured format, producing a raw process data stream that not only includes rich real-time information but also possesses high temporal and causal consistency. This series of steps works synergistically to fundamentally improve the quality and reliability of the input data, enabling subsequent anomaly detection, feature engineering, and model prediction to be based on an accurate and consistent data base. This effectively avoids model prediction bias and control decision errors caused by problems with the data itself (such as asynchrony, incompleteness, or inconsistency), laying a data foundation for the system to achieve high-precision control.
[0053] Step S2 involves performing anomaly detection, smoothing, and Z-score standardization on the original process data stream to obtain a cleaned and standardized time-series data stream.
[0054] Further, step S2 involves anomaly detection, smoothing, and Z-score standardization of the original process data stream to obtain a cleaned and standardized time-series data stream, specifically including the following steps: Step S21: Use the isolated forest algorithm to perform multivariate anomaly detection on the original process data stream and identify abnormal data points.
[0055] Preferably, unsupervised multivariate anomaly detection is performed using the Isolation Forest algorithm. This algorithm constructs multiple isolation trees by randomly selecting features and segmentation values, allowing anomalies to be isolated earlier due to their significantly different feature values compared to normal patterns. The contamination rate parameter can be set to 0.01, indicating that the expected proportion of anomalies does not exceed 1%; the number of trees can be set to 100 to balance computational efficiency and detection stability; and the random seed can be fixed at 42 to ensure reproducible results.
[0056] Step S22: Repair all abnormal data points using cubic spline interpolation to obtain the time series data stream after anomaly repair.
[0057] Preferably, the data is fitted piecewise using a cubic spline interpolation algorithm with a cubic polynomial to ensure the continuity of the second derivative of the interpolation curve, thereby smoothly connecting normal data points. The boundary condition is set as a natural spline, i.e., the second derivative at both ends is zero.
[0058] Preferably, the normal data point sequence is denoted as (t). i ,y i The location of the outlier is t. j The interpolation function S(t) satisfies S(t) = a i +b i (t−t i )+c i (t−t i ) 2 +d i (t−t i ) 3 ,t∈[t i ,t i +1]. The coefficients are determined by solving a system of tridiagonal linear equations to ensure the continuity of function values, first and second derivatives at the nodes. For continuous outlier segments, such as those longer than 5 sampling points, normal data from the preceding and following windows for 30 seconds are used as the interpolation reference.
[0059] Step S23: The time-series data stream after anomaly repair is smoothed using the Savitzky-Gore filter to obtain a smoothed time-series data stream.
[0060] Preferably, the Savitsky-Gore filter is a smoothing algorithm based on local polynomial least squares fitting, which has the advantage of preserving the peak shape and width of the signal while smoothing it. The window length is set to 11 (corresponding to a 55-second time window) to cover typical process fluctuation cycles. The polynomial order is 3.
[0061] Preferably, in the calculation process, for each data point, a local window is constructed by taking 5 points before and after it (window radius 5), and fitting a cubic polynomial y=a0+a1t+a2t. 2 +a3t 3The coefficients are solved using the least squares method, and the smoothed value at this point is the fitted value of the polynomial at the center point. The calculation is performed by convolution, and the weights of the convolution kernel are derived from the polynomial fitting.
[0062] Step S24: Perform Z-score normalization on the smoothed time-series data stream to obtain a cleaned and normalized time-series data stream.
[0063] Preferably, the mean and standard deviation of the Z-score normalization algorithm are calculated based on 30 consecutive days of historical training data, for example, the mean inlet flow rate μW = 15000 kg / h and the standard deviation σW = 2000 kg / h; the mean moisture reading is 12.0% and the standard deviation is 1.5%.
[0064] Beneficial effects of steps S21 to S24: This is reflected in the construction of a high-quality, highly consistent input data foundation for the entire predictive control system, significantly improving the accuracy and reliability of subsequent model predictions through a systematic data processing flow. Specifically, step S21 applies the isolated forest algorithm for multivariate anomaly detection, effectively identifying outliers in the high-dimensional data stream that do not conform to the normal operating condition distribution, such as outliers caused by instantaneous sensor jumps or communication interference, thus ensuring the authenticity and representativeness of the data from the source and preventing abnormal data from misleading model training and inference. Step S22, based on the detected anomalies, uses cubic spline interpolation for repair. This method can fill in missing or distorted values while maintaining the overall trend and smoothness of the data, generating a continuous and complete time-series data stream after anomaly repair, effectively preventing model training instability caused by data interruptions or sudden changes. Step S23 utilizes Savi... The Tzigi-Gore filter smooths the repaired data stream. While suppressing high-frequency random noise, this filter can better preserve the key features of the signal itself, such as peak shape and width. The smoothed time series data stream reduces random fluctuations in the data, providing a clearer input for the model to capture real physical dynamics. Step S24 finally performs Z-score standardization on the smoothed data. Using fixed mean and standard deviation parameters calculated from the historical training set, variables with different physical units and dimensions are transformed to the same numerical scale, eliminating the interference of scale differences between features on the model's weight learning. This makes the cleaned and standardized time series data stream numerically consistent and model-friendly.
[0065] Step S3: Calculate the dynamic transmission lag time of the chain vehicle in the cleaned and standardized time-series data stream through numerical integration, and integrate it into the cleaned and standardized time-series data stream to obtain the dynamic feature-enhanced data stream.
[0066] Further, step S3 involves calculating the dynamic transmission lag time of the chain vehicle in the cleaned and standardized time-series data stream through numerical integration, and integrating it into the cleaned and standardized time-series data stream to obtain a dynamic feature-enhanced data stream. This specifically includes the following steps: Step S31: Extract the chain vehicle speed time series from the standardized time series data stream after cleaning, as well as the upstream variable time series including inlet tobacco leaf flow rate, moisture meter reading, and water addition.
[0067] Preferably, time-indexed data slicing operations can be used to extract the following two types of key time-series data. The chain conveyor speed time series is sampled at a frequency of 5 seconds, with a value range of 5 m / min to 30 m / min and an accuracy of ±0.1 m / min. The upstream variable time series includes the inlet tobacco flow rate (5000 kg / h to 20000 kg / h), the cooling zone inlet moisture meter reading (0% to 100%), and the water addition in each rehumidification zone (0 L / min to 50 L / min).
[0068] Preferably, the data backtracking window length can be set to 30 minutes, i.e., 360 data points, and the real-time update frequency is synchronized with the data acquisition cycle, 5 seconds.
[0069] Step S32: Calculate the dynamic transmission lag time of the chain car speed time series under the premise of satisfying the preset integral equation using the trapezoidal rule numerical integration algorithm, and obtain the dynamic lag time series.
[0070] Preferably, the trapezoidal rule numerical integration algorithm is used to calculate the dynamic lag time based on historical chain vehicle speed data. Wherein, the lag time... Satisfy integral equation ,in, This represents the total length of the re-humidification section, and is a typical value of 15-25 meters for the equipment.
[0071] Preferably, in discrete-time systems, numerical integration is used for calculation: Here, Δt = 5 seconds, N is determined by binary search to satisfy the equation, and [k] is the time index in the discrete-time system. When converting the continuous-time integral equation into a computer-processable discrete form, the continuous time variable t is replaced by equally spaced discrete time points, and [k] is the index of the k-th discrete time point. For example, k=0 represents the initial time, k=1 represents the next sampling time, and so on. This index is associated with the actual physical time through the sampling period Δt (marked as 5 seconds in the document). Therefore, the physical time corresponding to the k-th sampling point is t = k × Δt.
[0072] Step S33: Perform a time shift operation on the upstream variable time series using a dynamic lag time series to obtain a lag-aligned upstream feature series.
[0073] Preferably, a time-shift interpolation algorithm is used to align upstream variables to the current output time point. For each upstream variable value at time point t, the corresponding effective time point is calculated. Calculation using cubic spline interpolation upstream variable value at time 1 .
[0074] Step S34: Calculate the cumulative water addition characteristics based on the chain vehicle speed time series using the cumulative summation and numerical integration algorithm to obtain the cumulative physical quantity sequence.
[0075] Preferably, a cumulative summation and numerical integration algorithm is used to calculate the weighted cumulative water addition for each zone: The weight function This represents the proportion of the material block located in the i-th water-addition zone at time s.
[0076] Next step, discretization: ,in, 1 indicates that the block is completely located in region i, (0,1) indicates a linear transition when the block crosses regions, and 0 indicates that the block is not in region i. The number of regions is... There are generally four rehumidification zones, with the zone length set according to equipment parameters, typically 3-5 meters per zone. The resulting cumulative physical quantity sequence includes the cumulative water addition at each time point.
[0077] It should be noted that the meaning of the formula symbols in this embodiment only applies to the steps they explain. The meanings of the formula symbols for other steps are not interchangeable. Although formula symbols may appear similar, they are not interchangeable because the steps they explain are different.
[0078] Step S35: Integrate the upstream feature sequence and the cumulative physical quantity sequence into the cleaned and standardized time series data stream to obtain the dynamic feature-enhanced data stream.
[0079] Preferably, a feature splicing method is used to merge the dimensions of the newly generated features with the original data, and the integrated content is a lag-aligned upstream feature sequence (3-dimensional), a cumulative physical quantity sequence (1-dimensional), and an original cleaned and standardized time series data stream (8-dimensional).
[0080] Beneficial effects of steps S31 to S35: This is reflected in the fact that the dynamic feature enhancement method effectively solves the problems of transmission lag and nonlinear cumulative effect caused by changes in the speed of the chain vehicle during the tobacco rehydration process, thereby improving the quality of input data for subsequent prediction models. Step S31 extracts the time series of the conveyor belt speed and the upstream variable time series, providing a core data foundation for lag compensation and feature construction, ensuring the integrity of key process variables. Step S32 applies the trapezoidal rule numerical integration algorithm to calculate the dynamic transmission lag time, which can accurately quantify the material transmission delay that changes in real time with the conveyor belt speed, avoiding the mismatch risk of traditional fixed lag models. Step S33 performs time shifting operations on the upstream variables based on the dynamic lag time series to generate lag-aligned upstream feature sequences, making the model input have strict causal consistency in the time dimension and strengthening the physical correlation between features and outputs. Step S34 calculates the cumulative water addition feature through accumulation and numerical integration algorithms, introducing the cumulative physical quantity of historical effects on tobacco leaves during transmission, thereby capturing nonlinear dynamic effects. Step S35 integrates the lag-aligned upstream feature sequences and cumulative physical quantity sequences into the original data stream to form a dynamic feature-enhanced data stream. This data stream not only includes the original observation information but also incorporates mechanism-driven dynamic characteristics, providing the model with richer and more physically realistic input representations, thereby supporting high-precision predictive control.
[0081] Step S4: Input the dynamic feature-enhanced data stream into the physical information time-series fusion Transformer model to perform several steps of look-ahead prediction, and obtain the future outlet moisture sequence and temperature prediction sequence.
[0082] Further, in step S4, the dynamic feature-enhanced data stream is input into the physical information time-series fusion Transformer model for several steps of look-ahead prediction to obtain the future outlet moisture sequence and temperature prediction sequence, specifically including the following steps: Step S41: Input the dynamic feature enhancement data stream into the pre-trained physical information time-series fusion Transformer model to parse it into static metadata vector, historical observation time-varying input sequence, and future known time-varying input sequence.
[0083] Preferably, the input data is spatiotemporally partitioned using a sliding window algorithm to generate the following three types of inputs: ① Static metadata vector: including the embedding vector of the tobacco leaf formulation module (8-dimensional), grade code (4-dimensional), and origin characteristics (4-dimensional), with a total of 16 dimensions.
[0084] ② Historical observation time-varying input sequence: time window length of 60 time steps (300 seconds), feature dimension of 12, sampling interval of 5 seconds.
[0085] ③ Future known time-varying input sequence: predict 36 time steps (180 seconds) in the time domain, including control setpoints and measurable disturbances.
[0086] Step S42: Input the static metadata vector into the gated residual network, decompose it to obtain the variable selection context vector, the LSTM initial state context vector, and the feature-rich context vector, and integrate them to obtain the static context vector.
[0087] Preferably, a gated residual network (GRN) is used as follows: Here, GLU stands for Gated Linear Unit, and W1 is a trainable weight matrix. The computation process involves inputting a static metadata vector s (16-dimensional), which is then processed by four independent GRN networks to generate a variable selection context vector c_selection (8-dimensional), an LSTM initial hidden state context c_h (64-dimensional), an LSTM initial cell state context c_c (64-dimensional), and a feature enrichment context c_enrichment (32-dimensional). The GRN hidden layers are 32-dimensional, resulting in a total output context vector dimension of 168 dimensions.
[0088] Step S43: The hidden state sequence is obtained by combining the historical observation time-varying input sequence, the future known time-varying input sequence and the static context vector through the LSTM encoder-decoder structure with shared weights.
[0089] Preferably, a shared-weight LSTM encoder-decoder structure is adopted, as shown below: ,in, This is the weight matrix shared by the encoder and decoder. Specifically, the input sequence length is 96 steps, including 60 historical steps and 36 future steps; the LSTM hidden state dimension is 64; the initial state is initialized by static context vectors c_h and c_c; the output hidden state sequence H∈R^{96×64}. The LSTM has 2 layers, 64 hidden units, and a gradient clipping threshold of 5.
[0090] Step S44: Input the hidden state sequence into the temporal multi-head self-attention module, and obtain the attention-weighted feature sequence through query, key-value projection and scaled dot product attention.
[0091] Preferably, a scaled dot product attention mechanism is used, and the calculation formula is as follows: Q (Query matrix) represents the information the model wants to "query" or focus on at each time step, generated from the hidden state sequence through linear projection; K (Key matrix) represents the index information of each time step in the sequence, generated from the hidden state sequence through linear projection; V (Value matrix) includes the actual content or feature representation of each time step in the sequence, generated through linear projection; d k The dimension of the key vector K can be set to 16 to stabilize the gradient and prevent the dot product result from being too large; the softmax function is used to convert the scaled dot product score into a probability distribution to ensure that the sum of the weights is 1.
[0092] Step S45: Perform gated residual connection and layer normalization operations on the attention-weighted feature sequence to obtain the comprehensive feature vector for each future time step.
[0093] Preferably, gated residual connections and layer normalization are used, with the mathematical expression: Output = LayerNorm(A + σ(W) g [A;H])⊙H), where σ is the sigmoid function, W g The gating weight matrix is calculated by inputting attention features A and the original LSTM features H; the gating weights are calculated through fully connected layers and sigmoid activation; the residual connections fuse new and old features through weighted fusion; and layer normalization is used to stabilize the training process. Specifically, the hidden layer dimension of the gating network is 32, and the layer normalization epsilon value is 0.00001. Finally, the comprehensive feature vector Φ(t,τ)∈R^{64} for each future time step is obtained.
[0094] Step S46: Input all the integrated feature vectors into the physical information enhancement decoder, and map them to the physical state space through linear projection to obtain the future outlet moisture sequence and temperature prediction sequence.
[0095] Preferably, a physical information enhancement decoder is used, and the core innovation is the introduction of physical residual constraints. The calculation process is as follows: ① Map the feature vectors to the physical state space Among them, P t+τ , T t+τ The average moisture content and average temperature of the virtual tobacco leaf block, predicted by the model at the future time t+τ, are the core physical states output by the model; W p W is the projection matrix with dimensions 2×64; Φ(t,τ) is the comprehensive feature vector generated at the prediction start time t in the future time t+τ, which is the abstract feature representation encoded by the physical information temporal fusion Transformer model; p , b pThe trainable weight matrix and bias vector are, in order, used to project the high-dimensional feature vector Φ(t,τ) onto the low-dimensional physical state space.
[0096] ② Calculate the mass conservation residual based on the laws of mass conservation and energy conservation: Where Rm is the residual of the law of conservation of mass, ideally zero, and a larger value indicates that the model prediction deviates more from the law of conservation of mass; dP / dt is the rate of change of the average moisture content P of tobacco leaves predicted by the model over time, i.e., the rate of increase or decrease of moisture; ηabs(·) is the water absorption efficiency, a function estimated in real time by a small neural network based on the current working conditions (such as tobacco variety and state), and is not a fixed constant; Q applied The amount of water or steam applied to the tobacco leaves; W i n is the mass flow rate of the inlet tobacco leaves; k m (·) represents the mass transfer coefficient, a function estimated by the neural network based on operating conditions (such as air velocity and temperature); A is the effective surface area of the tobacco leaf in contact with air; Psat(T) is the saturated water vapor partial pressure calculated according to the Antoine equation at the tobacco leaf temperature T predicted by the model; P air This refers to the partial pressure of water vapor in the air inside the dehumidifier.
[0097] And, calculate the energy conservation residual: Where Re represents the residual of the law of conservation of energy, ideally zero, and a larger value indicates that the model prediction deviates more from the law of conservation of energy; m represents the mass of the virtual tobacco leaf block; c p dT / dt is the specific heat capacity of the tobacco leaf; dT / dt is the rate of change of the average temperature T of the tobacco leaf as predicted by the model over time, i.e., the rate of temperature increase or decrease; hc(·) is the convective heat transfer coefficient, a function estimated by a neural network; T air The temperature of the air inside the dehumidifier.
[0098] ③ Combining data fitting loss and physical consistency loss: Among them, L total L is the total loss function for model training; data λ is the data fitting loss term, used to measure the difference between the model's predicted values and the actual observed values. physics L is the weighting coefficient for the physical consistency loss term, used to control the strength of physical constraint in the total loss; physics The physical consistency loss term is specifically the sum of the squares of the mass conservation residuals and energy conservation residuals over the prediction time domain. The physical loss weight λ... physicsDuring training, the quantile prediction outputs are gradually increased from 0.01 to 1, with the quantiles being 10%, 50%, and 90%. The automatic differentiation precision is 32-bit floating-point, and finally, the future outlet moisture and temperature prediction sequences, including probability distribution information, are obtained.
[0099] It should be noted that the meaning of the formula symbols in this embodiment only applies to the steps they explain. The meanings of the formula symbols for other steps are not interchangeable. Although formula symbols may appear similar, they are not interchangeable because the steps they explain are different.
[0100] Beneficial effects of steps S41 to S46: By constructing a prediction model that can deeply integrate multi-source information and strictly follow physical laws, the accuracy, reliability, and physical consistency of export moisture and temperature predictions are significantly improved. Specifically, step S41 parses the dynamic feature enhancement data stream into static metadata vectors, historical observation time-varying input sequences, and future known time-varying input sequences, providing a structured input basis for the model and ensuring the synergistic utilization of static batch characteristics and dynamic process variables. Step S42 processes the static metadata vectors through a gated residual network, generating variable selection context vectors, LSTM initial state context vectors, and feature-rich context vectors, integrating them into a static context vector. This enables the model to adaptively modulate static conditions such as specific tobacco leaf formulations, enhancing its generalization ability under operating conditions. Step S43 utilizes a shared-weight LSTM encoder-decoder structure to fuse historical and future time-varying input sequences and static context vectors, producing a hidden state sequence that effectively captures local temporal dependencies, providing a temporally context-rich intermediate representation for subsequent analysis. Step S44 inputs the hidden state sequence into the time-multi-head self-attention module. Through query, key-value projection, and scaled dot product attention calculation, it mines the global long-term dependency patterns within the sequence, generating an attention-weighted feature sequence to improve the model's ability to model complex dynamic associations. Step S45 performs gated residual connections and layer normalization operations on the attention-weighted feature sequence to balance novel information with historical states, producing a comprehensive feature vector for each future time step, enhancing the stability and information density of feature representation. Step S46 linearly projects the comprehensive feature vector onto the physical state space through a physical information-enhanced decoder and introduces physical residual constraints based on the laws of energy conservation and mass conservation, ensuring that the prediction results both fit the data distribution and conform to physical mechanisms, preventing outputs that violate reality, and finally obtaining a high-precision, interpretable future outlet moisture and temperature prediction sequence.
[0101] Step S5: Based on the future outlet moisture sequence and temperature prediction sequence, the optimal water addition and chain vehicle speed control sequence is solved by a rolling time-domain optimization algorithm.
[0102] Further, step S5, based on the future outlet moisture sequence and temperature prediction sequence, uses a rolling time-domain optimization algorithm to solve for the optimal water addition and chain vehicle speed control sequence, specifically including the following steps: Step S51: Initialize the rolling time-domain optimization problem using the future outlet moisture sequence and temperature prediction sequence, define the prediction time domain and control time domain, load the reference setpoint sequence, and obtain the initial optimization problem parameters.
[0103] Preferably, the future export moisture sequence is obtained from the Physical Information Time Series Fusion Transformer Model (Pi-TFT). and temperature prediction sequence Where k is the current time and i is the prediction step size. Define the prediction time domain Np and the control time domain Nc and load the reference setpoint sequence. For example, the export moisture target is 12.0% ± 0.5%. The prediction time domain Np = 36, corresponding to 180 seconds; based on the system lag time calibration, the control time domain Nc = 12, corresponding to 60 seconds, ensuring the optimization problem can be solved in real time; the time step Δt = 5 seconds; and the reference setpoint sequence y... ref Load from an external process database; if it is a constant setpoint, then expand to... =[12.0%, 65℃] T .
[0104] Preferably, a sliding window index is used to ensure that the predicted sequence matches the optimized time domain. Here, the two values are either the model prediction or the actual measurement at the current moment.
[0105] Step S52: Construct an objective function based on the initialization optimization problem parameters, including a weighted sum of squares of tracking error, a penalty term for the rate of change of control variable, and a penalty term for slack variables.
[0106] Preferably, the tracking error weight matrix Q = diag([1.0, 0.1]), with the moisture error weight higher than the temperature error; the control change rate weight matrix R = diag([0.01, 0.01]), corresponding to the penalties for water addition and chain vehicle speed; and the relaxation penalty factor ρ = 1000, used for the strict control of soft constraints. Therefore, the objective function adopts a weighted quadratic norm form, and its mathematical expression is: Where Jk is the multi-objective cost function to be minimized at the current time k; k is the time index of the current control cycle; Np and Nc are the lengths of the prediction time domain and the control time domain, respectively; and i is the step index within the prediction time domain. The system output prediction value at time k for future time k+i; Let Q be the trajectory of the output reference setpoint at future time k+i; Q is the weight matrix of the output tracking error, which is a positive definite diagonal matrix. Let R be the control input setpoint planned for future time k+i at time k; R is the weight matrix of the control input rate of change, which is a positive definite diagonal matrix. ρ is a slack variable used to implement soft constraints; ρ is a penalty factor for the slack variable, used to strictly punish the use of the slack variable, ensuring that the system only violates the output constraints when necessary.
[0107] Step S53: Define the system dynamic constraint equations for the objective function. The system dynamic constraint equations ensure that the state evolution follows the physical information temporal fusion Transformer model.
[0108] Preferably, the Pi-TFT model is embedded as an equality constraint in the optimization problem, forcing the predicted trajectory to conform to the model's rules. The dynamic constraint is expressed as the state transition equation: Where i∈[0,Np−1], d k∣k Given a known perturbation, such as ambient temperature and humidity, the Pi-TFT model is invoked as a function.
[0109] Preferably, in the optimization problem, the predicted output at each step is recursively computed by the model. Gradient information is provided using automatic differentiation techniques (such as through PyTorch or TensorFlow integration). The constraint Jacobian matrix is generated by backpropagation of the model.
[0110] Step S54: Define the magnitude constraints and rate of change constraints of the manipulatory variables according to the dynamic constraint equation, and integrate them to obtain the variable constraint conditions.
[0111] Preferably, a controllable variable (water addition Q) is defined. i and chain car speed v chain The amplitude and rate of change are constrained. The amplitude constraint is the range of water added, Q. min =0L / min, Q max =50L / min; Chain car speed range v min =5m / min,v max =30m / min; Rate of change constraint: Rate of change of water added ΔQ min =−5L / min / step,ΔQ max =5L / min / step; Chain car speed change rate Δv min =−1m / min / step,Δv max =1m / min / step.
[0112] Preferably, constraints can be imposed using inequalities: .
[0113] Among them, u min =[Q min ,v min ] T ,u max =[Q max ,v max ] T The rate of change constraint is calculated based on the discrete time step Δt.
[0114] Step S55: Define soft constraints for the controlled variable based on the variable constraint conditions and introduce non-negative slack variables to obtain the soft constraint conditions.
[0115] Preferably, soft constraints are added to the controlled variables (outlet moisture and temperature), and non-negative relaxation variables are introduced, such as the output constraint range: moisture P. min =10%, P max =14%; Temperature T min =20℃, T max =80℃.
[0116] Preferably, soft constraints can be characterized as: .
[0117] in, ≥0, y min =[P min ,T min ] T , y max =[P max ,T max ] T .
[0118] It should be noted that the meaning of the formula symbols in this embodiment only applies to the steps they explain. The meanings of the formula symbols for other steps are not interchangeable. Although formula symbols may appear similar, they are not interchangeable because the steps they explain are different.
[0119] Step S56: Based on the soft constraints, the optimization problem is constructed into a nonlinear programming problem using the CasADi symbolic computation framework, and the gradient and Hessian matrix of the nonlinear programming problem are calculated to obtain the symbolic NLP problem.
[0120] Preferably, the CasADi symbolic computation framework can be used to define variables, objective functions, and constraints; the CasADi symbolic computation framework uses the MX symbol type, and the automatic differentiation mode is a mixture of forward and backward directions.
[0121] Preferably, the symbolic NLP problem constructed by CasADi is shown in the following Python pseudocode: import casadi as cs # Define symbolic variables x = cs.MX.sym('x', n_vars) # n_vars = N_c * dim_u + N_p * dim_y # Decompose variables into control and relaxation quantities u = x[0: N_c * dim_u] epsilon = x[N_c * dim_u: ] # Constructing the objective function and constraints f = compute_objective(u, epsilon, y_ref, Q, R, rho) #corresponds to J_k g = cs.vertcat(dynamic_constraints, bound_constraints) # Creating an NLP Problem nlp = {'x': x,'f': f,'g': g} # Generating gradients and the Hessian function grad_f = cs.gradient(f, x) hessian_f = cs.hessian(f, x)[0] Step S57: Solve the symbolic NLP problem using the IPOPT solver to obtain the optimal water addition and chain vehicle speed control sequence.
[0122] Preferably, the IPOPT (Interior Point Optimizer) uses obstacle functions to handle inequality constraints, solves the KKT conditions through Newton iteration, and then calls the nlpsol function to solve: solver = cs.nlpsol('solver','ipopt', nlp) result = solver(x0=x0, lbg=lbg, ubg=ubg) # lbg / ubg are the upper and lower bounds of the constraint Beneficial effects of steps S51 to S57: By constructing an efficient and reliable real-time optimization decision-making mechanism, the predicted output of the physical information time-series fusion Transformer model is transformed into feasible optimal control commands. Specifically, step S51 initializes the rolling time-domain optimization problem and defines the prediction time domain, control time domain, and reference setpoint sequence, laying a structured foundation for the optimization solution and ensuring a clear spatiotemporal framework and objective orientation for the optimization process. Step S52 constructs an objective function including a weighted sum of squares of tracking error, a penalty term for the rate of change of control variable, and a penalty term for slack variables. This aims to pursue setpoint tracking accuracy while considering the smoothness of control actions and system robustness, avoiding overly aggressive or oscillating control strategies. Step S53 defines the system dynamic constraint equations, forcing the state evolution during the optimization process to strictly follow the dynamic laws of the physical information time-series fusion Transformer model, ensuring the inherent physical consistency between the decision logic and the prediction model. Step S54 further defines the amplitude constraints and rate of change of the manipulated variables based on the dynamic constraint equations. Constraints are integrated to form variable constraints, ensuring that the solved control quantity is within the physical limit of the actuator and changes gradually, improving operational safety and equipment lifespan. Step S55 introduces soft constraints and non-negative relaxation variables for the controlled variable based on the variable constraints, forming soft constraint conditions, enhancing the optimization problem's tolerance to temporary disturbances or boundary conflicts, and preventing unsolvable situations. Step S56 uses the CasaADi symbolic computing framework to construct the soft-constrained optimization problem into a nonlinear programming problem, and automatically calculates the gradient and Hessian matrix to obtain a symbolic NLP problem, providing accurate mathematical description and derivative information for efficient numerical solutions. Step S57 solves the symbolic NLP problem using the IPOPT solver, finally obtaining the optimal water addition and chain vehicle speed control sequence, completing the transformation from prediction to decision.
[0123] Step S6: The optimal water addition and chain speed control sequence is sent to the tobacco rehumidification equipment to achieve predictive control of the tobacco rehumidification equipment.
[0124] Further, in step S6, the optimal water addition and chain vehicle speed control sequence is sent to the tobacco rehumidification equipment to achieve predictive control of the tobacco rehumidification equipment, specifically including the following steps: Step S61: Extract the optimal water addition and chain car speed control sequence. The optimal control quantity based on the current moment is used as the control command to be issued.
[0125] Preferably, the optimal water addition and chain vehicle speed control sequence based on the rolling time-domain optimization output has a dimension of N. c ×2, where N c =12 represents the control time domain, and the control quantity u of the first time step (i.e., the current time k) in the sequence is obtained through an index extraction algorithm. k∣k =[Q k∣k ,vchain,k∣k ] T The extraction process is implemented using array slicing operations, with a time complexity of O(1).
[0126] Step S62: Perform real-time range verification on the control command to be issued to ensure that the value of the control command to be issued is within the physical limit range of the actuator, and obtain the verification passed control command.
[0127] Preferably, a boundary check algorithm is applied to each component of the control command to be issued. The verification rule is that the water addition amount does not exceed the closed interval formed by its minimum and maximum values. The same applies to the chain car speed.
[0128] Step S63: Encode the verification pass control command into a write request data format based on the OPC UA protocol to obtain an OPC UA write request message.
[0129] Preferably, the control instructions are encapsulated into write request messages using the OPC UA (IEC 62541 standard) encoding rules. The message structure includes a node identifier (corresponding to the PLC register address), a value (encoded as a double-precision floating-point number), a timestamp (ISO8601 format), and a quality code (default setting is 0x00000000, indicating good).
[0130] Step S64: Deploy an OPC UA client through the edge computing gateway to asynchronously send OPC UA write request messages to the tobacco rehumidification device.
[0131] Preferably, an OPC UA client is deployed on the edge computing gateway, configured in an asynchronous publish-subscribe mode. The client places the OPC UA write request message into a send queue and asynchronously sends it to the PLC's OPC UA server via TCP / IP protocol (port 4840). The client listens for server response messages and confirms the write result via a status code (e.g., 0x00000000 indicating success).
[0132] Beneficial effects of steps S61 to S64: The optimal control sequence obtained from optimization calculations is safely, reliably, and timely transformed into specific actions of the underlying actuators, thus completing the final link from decision-making to execution and ensuring the closed-loop operation of the control system. Specifically, step S61 accurately extracts the control command corresponding to the current moment from the optimal control sequence. Its core function is to achieve the immediacy of the control strategy, ensuring that the latest and most relevant decisions are implemented in each control cycle, avoiding delays caused by processing the entire future sequence, and maintaining the real-time response capability of the control. Step S62 performs real-time range verification on the extracted commands. This step, through built-in physical limiting logic, acts as a critical safety barrier to prevent dangerous commands exceeding the mechanical or technological limits of the actuators due to model prediction deviations or optimization anomalies, fundamentally eliminating the risk of equipment damage or process accidents and improving the inherent safety of system operation. Step S63 encodes the verified safe commands into standardized OPC UA write request messages. This is significant in achieving seamless and semantically clear communication between high-level applications and the underlying industrial control system, utilizing OPC... UA's rich data models and built-in security mechanisms ensure the integrity, identifiability, and anti-interference of control commands during transmission, solving the protocol conversion problem in heterogeneous system integration. Step S64 asynchronously sends the command to the PLC through the edge gateway and listens for the response signal. This not only completes the final triggering of the control action, but more importantly, it establishes a clear execution feedback loop through the confirmation mechanism. This provides the upper-level controller with confirmation information on whether the command has been successfully implemented, thereby supporting the control system to monitor and diagnose the execution status and providing a basis for whether compensation or recalculation is needed for the next cycle of rolling optimization.
[0133] Beneficial effects of steps S1 to S6: Through the predictive control method in steps S1 to S6, a significant improvement in the control accuracy and stability of the tobacco rehydration process is achieved overall. Specifically, the method first ensures the comprehensiveness of input information through high-frequency data acquisition in step S1; rigorous preprocessing in step S2 eliminates noise and anomalies, laying a reliable foundation for subsequent analysis; dynamic feature enhancement in step S3 effectively quantifies and compensates for system transmission lag, overcoming the oscillation problem caused by large lag in traditional control; physical information enhancement in step S4 introduces physical constraints of heat and moisture transfer into the model prediction, ensuring that the prediction results conform to both data patterns and physical reality, improving the reliability and interpretability of the model; rolling time-domain optimization in step S5 solves the optimal control sequence online based on high-precision prediction, realizing the transformation from passive response to active adjustment; and control command issuance in step S6 completes closed-loop execution. This coherent process enables the system to adapt to changes in operating conditions such as tobacco formulation and environmental disturbances, maintaining robust performance. Simultaneously, a built-in self-monitoring mechanism supports autonomous evolution throughout the entire lifecycle, reducing reliance on fixed models and manual intervention, ultimately achieving the goal of high-precision and high-stability automated control.
[0134] like Figure 2 As shown, this embodiment provides an example of a predictive control system for a tobacco rehydration device. In this embodiment, the predictive control system is applied to the predictive control method as described in the above embodiment.
[0135] Specifically, the predictive control system includes a raw process data stream acquisition module 1, a raw process data stream processing module 2, a raw process data stream enhancement module 3, a future data stream prediction module 4, a future optimal control sequence solving module 5, and a future optimal control sequence distribution module 6, which are connected electrically or by signal in sequence.
[0136] The system comprises the following modules: Raw process data stream acquisition module 1, which collects data in real-time from the inlet tobacco leaf flow rate, moisture meter reading, water addition, and conveyor speed of the tobacco rehumidification equipment via sensors, generating a raw process data stream; Raw process data stream processing module 2, which performs anomaly detection, smoothing, and Z-score standardization on the raw process data stream to obtain a standardized time-series data stream; Raw process data stream enhancement module 3, which calculates the conveyor dynamic transmission lag time of the standardized time-series data stream through numerical integration and integrates it into the standardized time-series data stream to obtain a dynamic feature enhancement data stream; Future data stream prediction module 4, which inputs the dynamic feature enhancement data stream into a physical information time-series fusion Transformer model for several steps of look-ahead prediction to obtain the future outlet moisture sequence and temperature prediction sequence; Future optimal control sequence solution module 5, which, based on the future outlet moisture sequence and temperature prediction sequence, uses a rolling time-domain optimization algorithm to solve for the optimal water addition and conveyor speed control sequences of the future outlet moisture sequence and temperature prediction sequence; and Future optimal control sequence distribution module 6, which distributes the optimal water addition and conveyor speed control sequences to the tobacco rehumidification equipment to achieve predictive control of the tobacco rehumidification equipment.
[0137] It should be noted that this embodiment is a functional module embodiment based on the above method embodiment. For additional content such as extensions, optimizations, limitations, examples, principle explanations, and beneficial effects of this embodiment, please refer to the above embodiments. This embodiment will not repeat them here.
[0138] Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Figure 3 As shown, the electronic device 7 includes a processor 71 and a memory 72 coupled to the processor 71.
[0139] The memory 72 stores program instructions for implementing the federated learning-based collaborative energy-saving method for government data clusters in any of the above embodiments.
[0140] The processor 71 is used to execute program instructions stored in the memory 72 for collaborative energy saving of government data clusters based on federated learning.
[0141] The processor 71 can also be referred to as a CPU (Central Processing Unit). The processor 71 may be an integrated circuit chip with signal processing capabilities. The processor 71 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor.
[0142] Furthermore, Figure 4 This is a schematic diagram of the structure of a storage medium according to an embodiment of this application. See also: Figure 4 In this embodiment of the application, the storage medium 8 stores program instructions 81 capable of implementing all the above methods. These program instructions 81 can be stored in the storage medium in the form of a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes 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, or terminal devices such as computers, servers, mobile phones, and tablets.
[0143] In the several embodiments provided in this application, it should be understood that the disclosed systems, methods, and approaches can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between systems or units may be electrical, mechanical, signal, or other forms.
[0144] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units. The above are merely embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made based on the description and drawings of this application, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A predictive control method for a tobacco rehumidification device, the predictive control method being applied to a tobacco rehumidification device equipped with sensors, characterized in that, The predictive control method includes: Step S1: The inlet tobacco leaf flow rate, moisture meter reading, water addition amount, and chain speed of the tobacco rehumidification equipment are collected in real time by the sensor to generate the raw process data stream; Step S2: Perform anomaly detection, smoothing, and Z-score standardization on the original process data stream to obtain a cleaned and standardized time-series data stream; Step S3: Calculate the dynamic transmission lag time of the chain vehicle in the cleaned and standardized time-series data stream through numerical integration, and integrate it into the cleaned and standardized time-series data stream to obtain a dynamic feature-enhanced data stream; Step S4: Input the dynamic feature-enhanced data stream into the physical information time-series fusion Transformer model to perform several steps of look-ahead prediction to obtain the future outlet moisture sequence and temperature prediction sequence; Step S5: Based on the future outlet moisture sequence and the temperature prediction sequence, solve the optimal water addition and chain vehicle speed control sequence for the future outlet moisture sequence and the temperature prediction sequence using a rolling time-domain optimization algorithm. Step S6: The optimal water addition amount and the chain vehicle speed control sequence are sent to the tobacco rehumidification equipment to realize predictive control of the tobacco rehumidification equipment.
2. The predictive control method according to claim 1, characterized in that, Step S1: Real-time data collection of the inlet tobacco leaf flow rate, moisture meter reading, water addition amount, and conveyor speed of the tobacco rehumidification equipment using the sensors, generating a raw process data stream, including: Step S11: Deploy the OPC UA client through the edge computing gateway to establish a real-time communication connection with the DCS / PLC system of the tobacco rehumidification equipment, and synchronously collect data on the inlet tobacco flow rate, the inlet moisture meter reading of the cooling zone, the water addition, the chain speed, the temperature and humidity of the circulating air in the rehumidification zone, and the moisture and temperature sensor data of the outlet, and generate an initial sensor data stream. Step S12: Asynchronously acquire the static inherent information of tobacco and the slowly changing disturbance data of temperature and humidity in the workshop environment to obtain the static metadata stream; Step S13: Add a unified timestamp to all data points of the initial sensor data stream and the static metadata stream using the Network Time Protocol to obtain a timestamp data stream; Step S14: Align all data sequences of the timestamp data stream to a time grid of a preset duration using a resampling algorithm to obtain a resampled data sequence; Step S15: Combine the resampled data sequence into a structured format to obtain the original process data stream.
3. The predictive control method according to claim 1, characterized in that, Step S2 involves performing anomaly detection, smoothing, and Z-score standardization on the original process data stream to obtain a cleaned and standardized time-series data stream, including: Step S21: Perform multivariate anomaly detection on the original process data stream using the isolated forest algorithm to identify abnormal data points; Step S22: Repair all abnormal data points using cubic spline interpolation to obtain the time series data stream after anomaly repair; Step S23: The anomaly-corrected time-series data stream is smoothed using a Savitzky-Gore filter to obtain a smoothed time-series data stream; Step S24: Perform Z-score normalization on the smoothed time-series data stream to obtain a cleaned and normalized time-series data stream.
4. The predictive control method according to claim 1, characterized in that, Step S3: Calculate the chain vehicle dynamic transmission lag time of the cleaned and standardized time-series data stream using numerical integration, and integrate it into the cleaned and standardized time-series data stream to obtain a dynamic feature-enhanced data stream, including: Step S31: Extract the chain vehicle speed time series from the standardized cleaning time series data stream, as well as the upstream variable time series including inlet tobacco leaf flow rate, moisture meter reading, and water addition amount; Step S32: Calculate the dynamic transmission lag time of the chain vehicle speed time series under the premise of satisfying the preset integral equation using the trapezoidal rule numerical integration algorithm to obtain the dynamic lag time series. Step S33: Perform a time shift operation on the upstream variable time series using the dynamic lag time series to obtain a lag-aligned upstream feature series; Step S34: Calculate the cumulative water addition characteristics based on the chain vehicle speed time series using an accumulation and numerical integration algorithm to obtain a cumulative physical quantity sequence; Step S35: Integrate the upstream feature sequence and the accumulated physical quantity sequence into the cleaned and standardized time-series data stream to obtain a dynamic feature-enhanced data stream.
5. The predictive control method according to claim 1, characterized in that, Step S4 involves inputting the dynamic feature-enhanced data stream into the physical information time-series fusion Transformer model for several steps of look-ahead prediction to obtain the future outlet moisture sequence and temperature prediction sequence, including: Step S41: Input the dynamic feature enhancement data stream into the pre-trained physical information time-series fusion Transformer model to parse it into static metadata vector, historical observation time-varying input sequence, and future known time-varying input sequence; Step S42: Input the static metadata vector into the gated residual network, decompose it to obtain the variable selection context vector, the LSTM initial state context vector, and the feature-rich context vector, and integrate them to obtain the static context vector. Step S43: The historical observation time-varying input sequence, the future known time-varying input sequence, and the static context vector are combined using a weighted LSTM encoder-decoder structure to obtain the hidden state sequence. Step S44: Input the hidden state sequence into the temporal multi-head self-attention module, and obtain the attention-weighted feature sequence through query, key-value projection and scaled dot product attention calculation; Step S45: Perform gated residual connection and layer normalization operations on the attention-weighted feature sequence to obtain the comprehensive feature vector for each future time step; Step S46: Input all the integrated feature vectors into the physical information enhancement decoder, and map them to the physical state space through linear projection to obtain the future outlet moisture sequence and temperature prediction sequence.
6. The predictive control method according to claim 1, characterized in that, Step S5, based on the future outlet moisture sequence and the temperature prediction sequence, solve the optimal water addition and chain vehicle speed control sequence for the future outlet moisture sequence and the temperature prediction sequence using a rolling time-domain optimization algorithm, including: Step S51: Initialize the rolling time-domain optimization problem using the future outlet moisture sequence and the temperature prediction sequence, define the prediction time domain and control time domain, load the reference setpoint sequence, and obtain the initialization optimization problem parameters; Step S52: Based on the initialized optimization problem parameters, construct an objective function including a tracking error weighted sum of squares term, a control variable change rate penalty term, and a slack variable penalty term; Step S53: Define the system dynamic constraint equations for the objective function, wherein the system dynamic constraint equations ensure that the state evolution follows the physical information temporal fusion Transformer model; Step S54: Define the magnitude constraint and rate of change constraint of the manipulable variable according to the dynamic constraint equation, and integrate them to obtain the variable constraint conditions; Step S55: Define soft constraints for the controlled variable based on the variable constraint conditions and introduce non-negative relaxation variables to obtain the soft constraint conditions. Step S56: Based on the soft constraints, the optimization problem is constructed into a nonlinear programming problem using the CasaADi symbolic computation framework, and the gradient and Hessian matrix of the nonlinear programming problem are calculated to obtain the symbolic NLP problem; Step S57: Solve the symbolic NLP problem using the IPOPT solver to obtain the optimal water addition and chain vehicle speed control sequence.
7. The predictive control method according to claim 1, characterized in that, Step S6, the optimal water addition amount and the chain vehicle speed control sequence are sent to the tobacco rehumidification equipment to achieve predictive control of the tobacco rehumidification equipment, including: Step S61: Extract the optimal water addition amount and the optimal control quantity of the chain vehicle speed control sequence based on the current moment as the control command to be issued; Step S62: Perform real-time range verification on the control command to be issued to ensure that the value of the control command to be issued is within the physical limit range of the actuator, and obtain a verification-passed control command; Step S63: The verification is encoded into a write request data format based on the OPC UA protocol by the control command to obtain an OPC UA write request message; Step S64: Deploy an OPC UA client through the edge computing gateway to asynchronously send the OPC UA write request message to the tobacco rehumidification device.
8. A predictive control system for a tobacco rehydration device, wherein the predictive control system is applied to the predictive control method as described in any one of claims 1 to 7, characterized in that, The predictive control system includes: The raw process data stream acquisition module is used to collect the inlet tobacco leaf flow rate, moisture meter reading, water addition amount, and chain speed of the tobacco rehumidification equipment in real time through the sensors, and generate the raw process data stream; The raw process data stream processing module is used to perform anomaly detection, smoothing, and Z-score standardization on the raw process data stream to obtain a cleaned and standardized time-series data stream. The original process data stream enhancement module is used to calculate the chain vehicle dynamic transmission lag time of the cleaned and standardized time-series data stream through numerical integration, and integrate it into the cleaned and standardized time-series data stream to obtain a dynamic feature enhanced data stream. The future data stream prediction module is used to input the dynamic feature-enhanced data stream into the physical information time-series fusion Transformer model to perform several steps of look-ahead prediction, and obtain the future outlet moisture sequence and temperature prediction sequence. The future optimal control sequence solving module is used to solve the optimal water addition and chain vehicle speed control sequence based on the future outlet moisture sequence and the temperature prediction sequence using a rolling time-domain optimization algorithm. The future optimal control sequence distribution module is used to distribute the optimal water addition and chain vehicle speed control sequences to the tobacco rehumidification equipment to achieve predictive control of the tobacco rehumidification equipment.
9. An electronic device, characterized in that, The method includes a processor and a memory coupled to the processor, the memory storing program instructions executable by the processor; when the processor executes the program instructions stored in the memory, it implements the predictive control method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program instructions that, when executed by a processor, enable the predictive control method as described in any one of claims 1 to 7.