Abstract:This paper proposes a data-driven anomaly monitoring and tracing method for the complex characteristics of continuous pharmaceutical processes, such as multi-operating conditions, non-stationarity, and strong coupling among variables. It combines the advantages of Dirichlet Process Gaussian Mixture Model (DPGMM), Variational Autoencoder (VAE), and Cointegration Analysis (CA) to achieve efficient anomaly detection and source tracing in continuous pharmaceutical processes. Firstly, the framework uses DPGMM as the core method for operating condition identification, effectively solving the problem of distinguishing similar operating conditions in continuous pharmaceutical processes. Secondly, to address the non-stationarity of continuous pharmaceutical processes and the impact of closed-loop control on the correlation among variables, a process monitoring method integrating CA and VAE is designed, which effectively reduces false alarms and improves the accuracy and reliability of monitoring. Meanwhile, through the means of reconstructing the data set and drawing contribution plots, the precise location of faulty variables is achieved, overcoming the ”contamination” phenomenon among variables. Finally, the feasibility and effectiveness of the proposed scheme are verified through a simulation case study of the Feeder Blending-Twin screw granulation (FBTG) process.