[关键词]
[摘要]
目的 针对中药提取过程存在强耦合、长时滞及非线性特点,以及传统深度时序模型在工况变化时易产生预测滞后和极值平滑等问题,提出一种结合标准操作规程(standard operating procedure,SOP)先验的中药提取过程关键工艺参数解耦数字孪生建模方法SOP引导的通道独立分块时间序列Transformer(SOP-guided channel-independent patch time series Transformer,SGC-PatchTST)。方法 该模型以PatchTST为基础架构,从3个方面进行改进:采用正交解耦后期融合机制,将离散SOP指令转化为工艺意图特征,并利用柔性门控进行融合以抑制工况切换产生的滞后;构建主支路和副支路进行解耦的结构,对回流温度进行独立建模,以削弱多变量耦合造成的干扰;设计极值敏感混合损失函数,将局部统计与极值惩罚相结合,在Patch分块低通滤波条件下增强模型的极值拟合与抗噪能力。所有基线模型均统一采用OneCycleLR学习率调度与早停策略。实验数据按批次独立划分训练集、验证集、测试集,杜绝跨批次数据泄漏。研究使用中药提取车间实际生产数据构建预测模型并进行自回归多步推演评估。结果 在50批次分层划分下,SGC-PatchTST(优化超参数τ=1.5σ,λ=2.0)的上、下温度单次评估平均绝对误差(mean absolute error,MAE)分别降至0.36 ℃ 和0.35 ℃(较标准PatchTST模型分别大幅降低40.0%和50.2%),且二者的95%分位数误差(P95 error)分别控制在1.31 ℃ 和1.33 ℃,抗极值偏差能力显著提升。同时,得益于主副解耦架构,受外部干扰明显的回流温度MAE降至较低的0.04℃,而核心安全参数(罐内压力)的微小波动预测亦保持在0.000 6 MPa的较高精度。此外,在3次独立分层划分下,核心上、下温度MAE均值分别保持在0.33 ℃(变异系数6.8%)和0.32℃(变异系数6.4%),证实了较高的统计稳健性。6路组合消融实验和25组超参数网格搜索分别验证了各模块的贡献和超参数鲁棒性。结论 该SGC-PatchTST方法在预测准确性和时效性上均达到了比较理想的程度,具有较强的物理合理性,可为后续基于模型的强化学习控制提供支持。
[Key word]
[Abstract]
Objective To address the strong coupling, long time delays, and nonlinear characteristics inherent in the traditional Chinese medicine (TCM) extraction process, as well as the issues of prediction lag and extreme-value smoothing commonly exhibited by traditional deep time-series models during operating condition transitions, a decoupled digital twin modeling method of key process parameters for the TCM extraction process, integrating Standard Operating Procedure (SOP) priors, named SOP-guided channel-independent patch time series Transformer (SGC-PatchTST), is proposed. Methods Based on the PatchTST architecture, the proposed model introduces three major enhancements: 1. An orthogonal decoupling late-fusion mechanism is employed to transform discrete SOP instructions into process-intention features, utilizing a soft-gating mechanism for fusion to suppress the lag caused by operating condition switches; 2. A decoupled structure comprising primary and auxiliary branches is constructed to independently model the reflux temperature, thereby mitigating the interference caused by multivariable coupling; 3. An extrema-sensitive hybrid loss function is designed, combining local statistics with extreme-value penalties to enhance the model's extrema-fitting and noise-resistance capabilities under the low-pass filtering conditions of Patch-based tokenization. All baseline models uniformly adopt the OneCycleLR learning rate schedule and an early-stopping strategy. Experimental data are independently partitioned into training, validation, and test sets on a batch-by-batch basis to strictly eliminate cross-batch data leakage. Actual production data from a TCM extraction workshop are utilized to construct the predictive model and evaluate it via autoregressive multi-step inference. Results Under a 50-batch stratified split, the single-evaluation Mean Absolute Errors (MAEs) of the upper and lower temperatures for SGC-PatchTST (optimized hyperparameters τ=1.5σ,λ=2.0) decrease to 0.36 ℃ and 0.35 ℃, respectively (which are 40.0% and 50.2% lower than the standard PatchTST model, respectively). Its capability to resist extreme deviations is significantly enhanced, with the 95% percentile errors (P95 errors) for the upper and lower temperatures controlled at 1.31 ℃ and 1.33 ℃, respectively. At the same time, benefiting from the decoupled primary and secondary architectures, the MAE of the reflux temperature, which is susceptible to external disturbances, is reduced to a lower value of 0.04 ℃. The prediction of minor fluctuations in the core safety parameter (in-tank pressure) is also maintained at a relatively high precision of 0.000 6 MPa. Furthermore, under three independent stratified splits, the average upper and lower temperature MAEs remain at 0.33 ℃ (coefficient of variation, CV = 6.8%) and 0.32 ℃ (CV = 6.4%), respectively, confirming its good statistical robustness. A six-step combination ablation study and a 25-group hyperparameter grid search validate the contribution of each module and the hyperparameter robustness, respectively. Conclusion The proposed SGC-PatchTST method achieves an ideal level of prediction accuracy and timeliness while demonstrating strong physical plausibility, providing reliable support for subsequent model-based reinforcement learning control.
[中图分类号]
TP18;R283.3
[基金项目]
国家长三角科技创新共同体联合攻关项目(2023CSJGG1700);连云港市重点研发计划(产业前瞻与关键技术)(CG2423)