Batch cooling crystallization process data-driven modeling and multi-objective optimization method
Patent Information
- Application Number
- CN202611244233.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-17
- Publication Date
- 2026-10-20
AI Technical Summary
[0005]本发明要解决的技术问题是:针对现有批次冷却结晶过程依赖机理模型求解复杂、难以准确描述主要操作条件与产品二维晶体尺寸分布之间动态映射关系,以及离线多目标优化轨迹难以适应初始状态偏差、测量噪声和过程扰动的问题,提供一种批次冷却结晶过程数据驱动建模与多目标优化方法,该方法以综合神经网络建立过程操作条件与产品二维晶体尺寸分布之间的代理模型,并在此基础上结合离线多目标优化和在线动态多目标优化,实现晶体长宽比、晶体尺寸分布集中程度和单位产品收率的协同调控
通过高效实验设计减少建模所需批次实验数量;通过数据驱动模型直接建立操作条件与产品晶体尺寸分布之间的映射关系,降低对复杂机理模型和高成本参数辨识的依赖;通过多目标优化同时调控晶体尺寸分布集中度、目标尺寸收率、单位产品收率和晶体长宽比;通过在线动态优化提高优化策略对初始条件偏差、操作扰动和测量噪声的适应能力。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention belongs to the field of industrial process optimization and control technology, and relates to a data-driven modeling and multi-objective optimization method for batch cooling crystallization process. It is a method to achieve coordinated control of two-dimensional crystal size distribution, crystal morphology and product yield of batch cooling crystallization products through data-driven proxy modeling and dynamic multi-objective optimization. Background Technology
[0002] Batch cooling crystallization is a crucial separation and purification unit operation in pharmaceutical, fine chemical, and functional materials production. The size distribution, aspect ratio, morphological consistency, and yield of the crystal products directly affect subsequent filtration, drying, conveying, tableting, and product stability. As the quality requirements for crystal products have gradually expanded from a single average particle size to include crystal size distribution, two-dimensional morphology, and the synergistic control of multiple quality indicators, traditional crystallization process modeling and optimization methods relying on mechanistic models face challenges such as computational complexity, difficulties in parameter identification, and model mismatch.
[0003] In existing research, Zheng et al. (Y. Zheng, X. Wang, Z. Wu, “Machine learning modeling and predictive control of the batch crystallization process,” Ind. Eng. Chem. Res., vol. 61, no. 16, pp. 5578-5592, 2022.) used data-driven models to predict key quality indicators of the batch crystallization process and combined them with predictive control methods for operational optimization. This type of method can reduce the dependence on complex particle number balance equations, but it usually focuses on low-dimensional quality variables or single process indicators, and is insufficient in describing the dynamic mapping relationship between the cooling trajectory and the two-dimensional crystal size distribution of the product, making it difficult to simultaneously reflect the crystal length, width, and morphological evolution characteristics. For batch cooling crystallization processes with significant morphological changes, relying solely on one-dimensional particle size or average size indicators is insufficient to meet the requirements of morphological consistency and synergistic optimization of multiple quality attributes in crystal products. In the field of multi-objective optimization, Cao et al. (Y. Cao, D. Acevedo, ZK Nagy, CD Laird, “Real-time feasible multi-objective optimization based nonlinear model predictive control of particlesize and shape in a batch crystallization process,” Control Eng. Pract., vol.69, pp. 1-8, 2017.) applied nonlinear model predictive control or real-time multi-objective optimization methods to batch crystallization processes to coordinate conflicting objectives such as crystal size, morphology, and yield. However, such methods often rely on accurate mechanistic models or online rolling solutions to complex optimization problems, making them susceptible to uncertainties in kinetic parameters, initial state deviations, measurement noise, and external disturbances in practice. When the weights of the optimization objectives or the process state change, the fixed operating trajectories obtained offline are difficult to adapt in a timely manner, while online optimization may face problems such as high computational burden, slow strategy convergence, and large fluctuations in control actions.
[0004] Therefore, existing technologies still lack a dynamic multi-objective optimization method for batch cooling crystallization processes that can accurately establish a nonlinear mapping relationship between key operating conditions and the two-dimensional crystal size distribution of the product based on a comprehensive neural network data-driven model. Furthermore, it can utilize offline multi-objective optimization results to form expert knowledge, enabling online optimization strategies to adaptively adjust the cooling trajectory according to the real-time process status. This allows for the coordinated control of crystal size distribution, crystal aspect ratio, and product yield under process uncertainties and disturbances. Summary of the Invention
[0005] The technical problem this invention aims to solve is: addressing the issues of existing batch cooling crystallization processes relying on complex mechanistic models that struggle to accurately describe the dynamic mapping relationship between key operating conditions and the two-dimensional crystal size distribution of the product, as well as the difficulty of offline multi-objective optimization trajectories adapting to initial state deviations, measurement noise, and process disturbances. This invention provides a data-driven modeling and multi-objective optimization method for batch cooling crystallization processes. This method uses a comprehensive neural network to establish a proxy model between process operating conditions and the two-dimensional crystal size distribution of the product. Based on this, it combines offline multi-objective optimization and online dynamic multi-objective optimization to achieve coordinated control of crystal aspect ratio, crystal size distribution concentration, and unit product yield.
[0006] The technical solution adopted in this invention is as follows: A data-driven modeling and multi-objective optimization method for batch cooling crystallization processes is proposed. The first step involves collecting data on two-dimensional crystal size distribution, solution concentration, and solution temperature under different cooling conditions during the batch cooling crystallization process, and establishing a comprehensive neural network model to characterize the dynamic mapping relationship between operating conditions and two-dimensional crystal size distribution. The second step involves offline multi-objective optimization based on the comprehensive neural network model to obtain a Pareto-optimal cooling trajectory that balances crystal aspect ratio, the concentration of two-dimensional crystal size distribution, and unit product yield, and constructing an expert knowledge base. The third step combines the expert knowledge base with real-time process variables to construct an online dynamic multi-objective optimization strategy based on cross-attention and dynamic imitation weights, enabling the cooling trajectory to adaptively adjust according to the current batch operating status.
[0007] The method specifically includes the following steps: The first step is to establish a comprehensive neural network model. To establish the mapping relationship between the main operating conditions of the batch cooling crystallization process and the two-dimensional crystal size distribution, a comprehensive neural network model integrating convolutional neural networks and recurrent neural networks was constructed. The convolutional neural network was used to extract spatial features from the two-dimensional crystal size distribution image, while the recurrent neural network was used to capture the nonlinear relationship between the operating conditions and the extracted spatial features. The batch run time was divided into... There are several control intervals, and the initial solution supersaturation, cooling temperature trajectory, and control interval information are used as model inputs. The input for each control interval is ,in The initial solution is supersaturated. For the first Control the solution temperature within the control zone. , The total number of control intervals divided for the batch cooling curve. The two-dimensional crystal size distribution is represented as: (1) in, For the first Two-dimensional crystal size distribution within each control region, Indicates the first The length grid of each control zone and width grid Crystal number density within; , , and These represent the number of grid cells along the length and width of the crystal, respectively. , , and These are the upper limits of the grid in the length and width directions of the crystal, respectively. and These are the grid dimensions in the length and width directions, respectively.
[0008] The spatial features of the two-dimensional crystal size distribution are extracted using a convolutional neural network. The first convolutional layer The output of the Zhang feature map is: (2) in, and The first k Within the first control interval In the nth convolutional layer Input and output of the feature map; This represents the number of convolutional layers; The number of feature maps; For the first In the nth convolutional layer Convolution kernel of Zhang's feature map; For the first The first convolutional layer Bias terms of the Zhang feature map; is a non-linear activation function. The pooling layer is represented as: (3) in, For the first k Within the first control interval In the first pooling layer The output of the feature map, is the pooling function. After convolution and pooling, all feature maps output from the last pooling layer are concatenated and vectorized sequentially to obtain the . k Spatial characteristic vectors of two-dimensional crystal size distribution in each control interval: , This means that the concatenated feature maps will be expanded into column vectors in a predetermined order. Indicates the first The first control interval Spatial features, , This represents the number of spatial features.
[0009] A recurrent neural network is used to describe the dynamic relationship between the operation condition sequence and spatial features. Its hidden state and predicted spatial features are as follows: (4) in, For the first Hidden states of a recurrent neural network within a control interval; For the first Hidden states of a recurrent neural network within a control interval; The input weight matrix; This is the weight matrix in the hidden state; To output the weight matrix; For output bias terms; For recurrent neural networks based on input vectors The obtained spatial feature vectors.
[0010] The two-dimensional crystal size distribution is then reconstructed through a fully connected decoding layer: (5) in, The fully connected layers are connected sequentially. For the first The first control interval The input of a fully connected layer , As input to the first connection layer; The vectorized predicted two-dimensional crystal size distribution; This represents the number of fully connected layers. and The first The weight matrix and bias terms of each fully connected layer; Indicates matrix rearrangement; The first one is obtained by reconstruction through a fully connected decoding layer. Predicted two-dimensional crystal size distribution within each control interval.
[0011] The two-dimensional distribution difference function is used to evaluate the deviation between the actual two-dimensional crystal size distribution and the predicted two-dimensional crystal size distribution: (6) in, A two-dimensional distribution difference measure. For true two-dimensional crystal size distribution, To predict the size distribution of two-dimensional crystals; and The actual two-dimensional crystal size distribution and the predicted two-dimensional crystal size distribution are shown in the unfolded form. Normalized number density at each grid location; .
[0012] The training of a comprehensive neural network includes pre-training of convolutional networks and optimization of recurrent networks. The reconstruction loss of the convolutional network is: (7) The validation error and the training objective of the integrated neural network are: (8) in, This represents the reconstruction loss for convolutional networks. This is the set of parameters and hyperparameters for convolutional networks and their fully connected decoding layers; Number of training batches; and The first i The training batch in the ... k The true two-dimensional crystal size distribution and the reconstructed two-dimensional crystal size distribution of each control interval; To verify the error; The number of spatial features; and The first in the verification batch The first control interval One real spatial feature and one predicted spatial feature; This is the training loss of the integrated neural network; This provides the weights, biases, and hyperparameters for both convolutional neural networks and recurrent neural networks. After training, the integrated neural network can quickly predict the size distribution of two-dimensional crystals based on candidate cooling trajectories, providing a surrogate model for subsequent offline multi-objective optimization and online dynamic multi-objective optimization.
[0013] The second step is offline multi-objective optimization. Based on the integrated neural network model established in the first step, the initial solution supersaturation is... Using the segmented cooling rate as offline optimization decision variables, a multi-objective optimization problem is constructed, considering the crystal aspect ratio, the concentration of 2D crystal size distribution, and the unit product yield. Offline optimization decision vector. It can be represented as: (9) in, For the first The cooling rate of each control zone.
[0014] Offline optimization decision vector Input the integrated neural network model established in the first step to obtain the corresponding two-dimensional crystal size distribution prediction results: (10) in, This represents the integrated neural network model established in the first step; This is a set of parameters for a comprehensive neural network.
[0015] Crystal aspect ratio Defined as: (11) in, For the first Crystal aspect ratio within each control interval For the first Two-dimensional crystal size distribution within a control interval Step moment, and These are the order of moments in the length and width directions, respectively; and These are the crystal length and width, respectively; For the first Two-dimensional crystal size distribution moments of the total characteristic width of the crystal in each control interval; For the first The two-dimensional crystal size distribution moment of the total characteristic length of the crystal in each control interval.
[0016] The degree of concentration of size distribution in two-dimensional crystals is expressed using the information entropy index. express: (12) in, For the first Information entropy of each control interval; The smaller the value, the more concentrated the two-dimensional crystal size distribution of the product, and vice versa.
[0017] Unit product yield index Defined as: (13) in, and These represent the initial and final solution concentrations, respectively. This represents the volume of the solution. Seed loading rate, which is the ratio of seed mass to initial solute mass.
[0018] The offline multi-objective optimization problem is represented as: (14) in, to The constraints are absolute supersaturation, batch endpoint temperature, temperature change in a single control interval, and initial solution supersaturation. For the first Absolute oversaturation in each control interval; This represents the upper limit of permissible absolute oversaturation. This refers to the final temperature of the batch. The lower limit of the allowable endpoint temperature; and These are the lower and upper limits of temperature change within adjacent control intervals, respectively. and These represent the lower and upper limits of the initial solution's supersaturation, respectively. and The temperature can be set to the corresponding range according to the temperature drop range allowed by the temperature control device.
[0019] The offline multi-objective optimization problem shown in equation (14) is solved using an enhanced goal achievement method or a non-dominated sorting genetic algorithm to obtain a Pareto solution set. To select a comprehensive compromise solution from the Pareto solution set, the th... The distance between each Pareto solution and the ideal reference point : (15) in, The number of Pareto solutions; , and The first The crystal aspect ratio, the concentration of two-dimensional crystal size distribution, and the yield per unit product corresponding to each Pareto solution; , and These are the ideal reference values obtained through single-objective optimization under the same constraints.
[0020] Finally, the Pareto solution with the smallest distance was selected as the optimal offline compromise solution: (16) in, , and These represent the optimal crystal aspect ratio, information entropy, and unit product yield corresponding to this scheme. This is the minimum Euclidean distance. According to... The corresponding temperature trajectory, process variables, predicted two-dimensional crystal size distribution, and product quality indicators are used to construct an expert knowledge base for subsequent online dynamic multi-objective optimization.
[0021] The third step is online dynamic multi-objective optimization. The Pareto optimal temperature trajectory and corresponding process variables obtained in the second step are organized into an expert knowledge base. Using the real-time measured crystallization process state as input, the solution temperature for the next control interval is output online to adapt to initial condition deviations, concentration disturbances, temperature measurement noise, and changes in the optimization target weights. The real-time process status of each control interval is represented as follows: (17) in, For the first Real-time process state vectors for each control interval; and The first The solution concentration and solution temperature in each control zone; They represent the first The two-dimensional crystal size distribution moments corresponding to the total number of crystals, total crystal feature width, total crystal feature length, and total crystal volume in each control interval.
[0022] For each set of offline Pareto solutions obtained in the second step An expert knowledge base was created by segmenting the cooling curves, corresponding process states, and quality indicators. : (18) in, For the first Number of expert trajectories; For the first The expert trajectory in the first The first control interval Process variables with spatial characteristics; For the first The expert trajectory in the first The first control interval Manipulated variables for spatial characteristics.
[0023] Before constructing the Generative Adversarial Imitation Learning Model (CAGAIL) based on cross-attention, a comprehensive reward function is first constructed based on the crystal aspect ratio, information entropy, and unit product yield: (19) in, For the first Normalized composite quality return for each control interval; , and These are the target weights for crystal aspect ratio, information entropy, and unit product yield, respectively, and the sum of the three is 1. , and These are the normalized th The aspect ratio, information entropy, and unit product yield of the crystal in each control interval.
[0024] (20) (twenty one) (twenty two) in, For the first The absolute oversaturation of each control interval, For the first The upper limit of absolute supersaturation allowed in each control interval is used to avoid spontaneous nucleation induced by excessively high supersaturation. For the first Manipulated variable for temperature change within a control interval; and These are the lower and upper limits of the allowable temperature variation of the temperature control device within a single control range, respectively. This refers to the final temperature of the batch. The lower limit of the permissible batch endpoint temperature; The total number of control intervals divided for batch operation.
[0025] The absolute oversaturation constraint, temperature change constraint, and endpoint temperature constraint from step two are incorporated into the comprehensive reward function as penalty terms: (twenty three) in, For the first Constraint penalty terms for each control interval; , and These represent low, medium, and high penalty values, respectively. It is a preset small positive number; To simultaneously consider product quality and operational feasibility, the first The overall return of each control interval.
[0026] After determining the comprehensive reward function, a Generative Adversarial Imitation Learning (CAGAIL) model based on cross-attention is constructed. CAGAIL is an overall architecture for online dynamic multi-objective optimization, comprising a cross-attention module, an execution network, an evaluation network, a discriminator, and an auxiliary inverse network. The cross-attention module extracts expert manipulation information related to the current process state from an expert knowledge base; the execution network generates manipulated variables; the evaluation network evaluates the expected cumulative reward of the execution network in the current state; the discriminator distinguishes between expert experience and the experience generated by the execution network; and the auxiliary inverse network constrains the physical feasibility of the manipulated variables through batch run consistency loss. Since the Generative Adversarial Imitation Learning (GAIL) model consisting of an execution network, evaluation network, and discriminator is well-known, this description only discusses the construction of the cross-attention module and the auxiliary inverse network, and further explains the network update formula. First, the cross-attention module is constructed. The normalized time index is... Concatenate into expert process variables: (twenty four) in, For the first The expert trajectory in the first The first control interval Process variables with spatial characteristics; For normalized time index; For the extended time The expert trajectory in the first The first control interval Expert process variables for spatial characteristics; For the first The expert trajectory in the first A matrix consisting of all time-extended expert process variables for each control interval; For the first The expert trajectory in the first Expert-manipulated variable matrix for each control interval; That is, the temperature change manipulated variable obtained by converting the offline cooling rate in the second step. For the first The duration of each control interval; This refers to the number of expert trajectories.
[0027] Then, the features of real-time process variables, expert process variables, and expert manipulated variables are constructed: (25) in, For the first Real-time process variables within a control interval Features; For expert process variable matrix Features; To allow experts to manipulate variable characteristics; and These are the trainable weights in the cross-attention module.
[0028] Attention weights are calculated using the standard scaled dot product method: (26) in, For the first Attention weight vectors for each control interval; This is the normalization function; The feature dimension of the expert process variables.
[0029] Attention-weighted analysis of expert-manipulated variables yields optimal reference experience: (27) in, For the first The optimal reference experience for each control interval is essentially a weighted expert manipulation variable reference extracted from the expert knowledge base based on the current process variables. and They are different; the former belongs to manipulated variable information, while the latter belongs to process variable information. The manipulated variables actually executed online are not directly equal to... Instead, it is a combination of execution networks. and Generated later.
[0030] The real-time process variables and the optimal reference experience are concatenated into an augmented process variable, and the actual manipulated variables for the current control interval are output: (28) in, Indicates the first Augmented process variables for each control interval; For the first The actual manipulated variables output by the execution network within each control interval; This indicates that the parameters in the CAGAIL model are The execution network's function is to map the current augmented process state to the actual manipulated variables; For use in strategy exploration Gaussian white noise in each control interval.
[0031] To constrain the physical feasibility of online manipulation variables, subsequent process variables are predicted based on the first step of the integrated neural network, and the manipulated variables are reconstructed through an auxiliary inverse network: (29) in, This indicates the prediction obtained from the integrated neural network. Two-dimensional crystal size distribution within the control region; For the prediction augmentation process variables of the next control interval; To predict the manipulators corresponding to the augmented process variables; For parameters Auxiliary reverse network; Manipulating variables through the process of reconstructing the reverse network; This results in consistency loss during batch execution. To execute the network decision set; For mathematical expectation; It is the square norm 2.
[0032] The dynamic imitation weights are further updated based on quality performance, operational constraint satisfaction, and attention confidence. (30) in, , and These represent the second Pareto compromise optimal solution corresponding to the first step. Quality indicators for each control interval; This indicates that the execution network in the current CAGAIL model generates the manipulated variables based on the optimal reference experience extracted by the cross-attention module, and then calculates the result according to formula (23). The return for each control interval; The first term representing expert knowledge The return for each control interval; For the rate of return.
[0033] (31) in, for Constraint satisfaction rate at any given time; and These represent the total number of safety constraints and performance constraints, respectively. and They are respectively The number of safety and performance constraints that have been satisfied at any given moment; for Attention confidence at any given moment; For attention weight information entropy; The number of attention weights; For the first Each attention weight; for Dynamic imitation weights at any given time.
[0034] Evaluation Network From parameters Characterization, with the first Augmented process variables for each control interval and the actual manipulated variables generated by the execution network As input, output scalar It is used to evaluate the expected cumulative overall return that the execution network can obtain under the current operating conditions.
[0035] The execution network aims to improve the output of the evaluation network. Its training gradient consists of the evaluation network gradient, the discriminator gradient, and the batch run consistency loss gradient, and the relative contribution of the evaluation network training and expert experience imitation is adjusted by dynamic imitation weights. (32) in, To achieve the overall training objectives of the network; For gradient; For parameters The discriminator; These are the weighting coefficients for batch execution consistency loss. Discriminator Used to distinguish between expert process variable-manipulation variable pairs in the expert knowledge base and process variable-manipulation variable pairs generated by the execution network; and The first The expert trajectory in the first Expert process variables and expert manipulation variables for each control interval.
[0036] In parallel with performing network updates, the evaluation network is trained according to the Bellman equation, with its loss function and objective value as follows: (33) in, To evaluate the network loss function; For the first The target evaluation value for each control interval; For the first The overall return of each control interval; Discount factor; Defined for formula (29) Control intervals predict augmented process variables; and These are the target networks for the evaluation network and the execution network, respectively. and The corresponding target network parameters are updated using a soft update method.
[0037] During the policy training phase, the CAGAIL model utilizes the expert knowledge base and the integrated neural network established in the first step to train the execution network, evaluation network, discriminator, auxiliary inverse network, and cross-attention module. After training, it enters the third step, the online execution phase. At this stage, the integrated neural network, the cross-attention module with fixed parameters, and the execution network are retained to generate manipulated variables for the current control interval based on real-time process variables. The evaluation network, discriminator, and auxiliary inverse network only participate in training and do not participate in the online manipulated variable calculation during actual batch execution.
[0038] The beneficial effects of this invention are: The number of batch experiments required for modeling is reduced through efficient experimental design; the mapping relationship between operating conditions and product crystal size distribution is directly established through data-driven models, reducing the dependence on complex mechanism models and high-cost parameter identification; crystal size distribution concentration, target size yield, unit product yield and crystal aspect ratio are simultaneously controlled through multi-objective optimization; and the adaptability of the optimization strategy to initial condition deviations, operating disturbances and measurement noise is improved through online dynamic optimization. Attached Figure Description
[0039] Figure 1 This is a diagram of the experimental apparatus for batch cooling crystallization of glutamic acid according to the present invention.
[0040] Figure 2 This is a schematic diagram of the integrated neural network model structure of the present invention.
[0041] Figure 3 This is a flowchart illustrating the dynamic optimization process of the present invention.
[0042] Figure 4 The figure shows the prediction results of the two-dimensional crystal size distribution of potassium dihydrogen phosphate in batches using a comprehensive neural network model. In the figure, (a) is the crystal length distribution and (b) is the crystal width distribution.
[0043] Figure 5 The results of offline multi-objective optimization of potassium dihydrogen phosphate are shown, where (a) is the Pareto front of the batch endpoint and (b) is the corresponding optimized cooling trajectory.
[0044] Figure 6 Figure 1 shows the stability verification results of different dynamic optimization methods under process uncertainty. (a) is the cumulative reward trajectory under scenario A, (b) is the solute concentration trajectory under scenario A, (c) is the cumulative reward trajectory under scenario B, and (d) is the solute concentration trajectory under scenario B. Scenario A is the case where the initial process variables have Gaussian bias, and scenario B is the case where the process is subjected to continuous step disturbances.
[0045] Figure 7Comparison of product crystals obtained after applying different online optimization methods to KDP crystallization, where (a) is a crystal morphology image under a microscope and (b) is the aspect ratio distribution of the crystals. Detailed Implementation
[0046] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings and technical solutions.
[0047] This embodiment takes the batch cooling crystallization process of potassium dihydrogen phosphate (KDP) with seed crystals as an example, and adopts the same... Figure 1 The experiment was conducted using the same experimental platform as the batch cooling crystallization experiment of glutamic acid shown. The experimental platform includes a jacketed batch crystallizer, a temperature control unit, a stirring unit, a temperature measurement unit, a solution concentration measurement unit, and a crystal microscopy imaging unit; this device can be used for KDP batch cooling crystallization experiments by changing the crystallizing material, seed crystals, and corresponding process settings. Figure 1 This is used to illustrate the crystallization apparatus, temperature control, process measurement, and crystal image acquisition environment during the implementation of the present invention.
[0048] The initial solution supersaturation, constant or segmented cooling rate, seed addition amount, seed size distribution, batch run time, and stirring conditions were selected as the main operating variables during the batch cooling crystallization process. For the potassium dihydrogen phosphate cooling crystallization example, the cooling rate range was set to 0.01 ℃ / min to 0.04 ℃ / min, the initial supersaturation was set to 1.01, the batch run time was set to 90 min, the stirring speed was set to 250 rpm, and the seed size range was set to 112 μm to 125 μm.
[0049] In the experiment, a saturated KDP solution was first prepared and added to the crystallizer. The solution was allowed to reach a stable state at a preset initial temperature. Subsequently, a predetermined amount of seed crystals was added and the stirring device was started. The jacket temperature was adjusted according to the set segmented cooling trajectory to allow the solution to complete batch cooling crystallization within the allowable supersaturation range. During the experiment, solution temperature, solution concentration, and crystal microscopic images were acquired in each control interval. The crystal length and width were extracted from the microscopic images, and the two-dimensional crystal size distribution was statistically obtained.
[0050] The main operating variables in this embodiment include the initial solution supersaturation. and the temperature difference between each control zone .in, The initial solution supersaturation at the start of the batch; The solution temperature in each control zone is denoted as The duration of the control interval is denoted as Then the temperature drop in the control range is The method specifically includes the following steps: The first step is to establish a comprehensive neural network model.
[0051] KDP batch experimental data obtained under different initial solution supersaturation and segmented cooling trajectories were used to construct training samples. The model input consists of the operating conditions, solution temperature, and control range information for each control range. ,in, For the first The input feature vectors of each control interval; and the two-dimensional crystal size distribution corresponding to each control interval. As the model output target, according to formulas (1)-(7) in the invention, a convolutional neural network is first used to extract the spatial features of the two-dimensional crystal size distribution, then a recurrent neural network is used to learn the dynamic relationship between the operating conditions and the spatial features as the batch time evolves, and finally the predicted two-dimensional crystal size distribution is obtained by reconstructing it through a fully connected decoding layer. . Figure 2 This diagram illustrates the structure of a comprehensive neural network model, reflecting the process of obtaining prediction results for the two-dimensional crystal size distribution after convolutional feature extraction, recurrent dynamic mapping, and fully connected decoding. After model training, the KDP validation batches that were not used in training are input into the model to obtain the corresponding two-dimensional crystal size distribution prediction results. Figure 4 As shown, the predicted two-dimensional crystal size distribution is in good agreement with the experimentally measured distribution within the main crystal length and width regions, indicating that the established integrated neural network can describe the nonlinear dynamic mapping relationship between the KDP segmented cooling operation conditions and the two-dimensional crystal size distribution.
[0052] The second step is to implement offline multi-objective optimization.
[0053] Based on the integrated neural network model trained in the first step, the initial solution supersaturation and the segmented cooling rate are used as offline optimization decision variables. The offline optimization decision vector is represented as follows: The candidate operating conditions are input into the integrated neural network model to obtain the corresponding predicted two-dimensional crystal size distribution, and the crystal aspect ratio is calculated according to the formula in the invention. The degree of concentration of two-dimensional crystal size distribution and unit product yield The optimization process simultaneously satisfies constraints on absolute supersaturation, temperature change, final temperature, and initial supersaturation. The Pareto solution set is obtained using the multi-objective optimization method described in the invention, and a compromise optimal solution is selected based on the principle of minimizing the distance to the ideal reference point. Figure 5The offline multi-objective optimization results for KDP are used to represent the trade-offs between different candidate cooling trajectories and the crystal aspect ratio, the concentration of 2D crystal size distribution, and unit product yield, as well as the compromise optimal cooling trajectory obtained by Pareto solution set selection. The selected offline compromise optimal solution and its corresponding process state, manipulated variables, and quality index are further used to construct an expert knowledge base for online dynamic optimization.
[0054] The third step is to implement online dynamic multi-objective optimization.
[0055] according to Figure 3 The dynamic optimization process shown constructs an expert knowledge base from the offline Pareto optimal cooling trajectory obtained in the second step, along with its process states, manipulated variables, and product quality indicators. When running online, the first... The real-time process state of each control interval is represented as follows: The crystal moment was calculated from the predicted two-dimensional crystal size distribution, while the solution concentration and temperature were obtained from the process measurement unit.
[0056] During the training phase, the ratio between expert experience imitation and autonomous strategy exploration is adjusted by dynamically imitating weights, so that the model can make full use of the offline Pareto optimal trajectory in the early stage of training and gradually improve its autonomous adaptability to process disturbances in subsequent training. Figure 3 This is used to illustrate the relationship between offline expert knowledge generation, real-time process variable input, comprehensive reward calculation, cross-attention retrieval, execution network output, safety constraint judgment, and online cooling trajectory update. Figure 6 To verify the stability of different dynamic optimization methods under process uncertainty, the results are used to compare the dynamic response performance of offline multi-objective optimization, deep deterministic policy gradient (DDPG), generative adversarial imitation learning (GAIL), and the generative adversarial imitation learning (CAGAIL) method based on cross-attention of this invention under conditions of initial condition deviation, operational perturbation, or measurement noise. The results show that the method of this invention can adjust the cooling trajectory according to real-time process variables, maintain a relatively stable process response, and take into account crystal morphology, the concentration of two-dimensional crystal size distribution, and product yield. Figure 7 Comparison images of product crystals obtained after KDP crystallization using different online optimization methods such as offline multi-objective optimization, DDPG, MPC, GAIL, and CAGAIL, including microcrystalline morphology and crystal aspect ratio distribution. Figure 7 This demonstrates that the online dynamic optimization method of the present invention can improve the crystal morphology and aspect ratio consistency of KDP products, and enhance the product quality stability under uncertain conditions during batch cooling crystallization processes.
Claims
1. A data-driven modeling and multi-objective optimization method for batch cooling crystallization processes, characterized in that, The first step involves collecting data on the two-dimensional crystal size distribution, solution concentration, and solution temperature under different cooling conditions during batch cooling crystallization. A comprehensive neural network model is then established to characterize the dynamic mapping relationship between operating conditions and the two-dimensional crystal size distribution. The second step involves offline multi-objective optimization based on this comprehensive neural network model to obtain a Pareto-optimal cooling trajectory that balances crystal aspect ratio, the concentration of the two-dimensional crystal size distribution, and the yield per unit product. An expert knowledge base is then constructed. The third step combines the expert knowledge base with real-time process variables to construct an online dynamic multi-objective optimization strategy based on cross-attention and dynamic imitation weights, enabling the cooling trajectory to adaptively adjust according to the current batch operating status.
2. The data-driven modeling and multi-objective optimization method for batch cooling crystallization process according to claim 1, characterized in that, The first step is as follows: To establish the mapping relationship between the main operating conditions of the batch cooling crystallization process and the two-dimensional crystal size distribution, a comprehensive neural network model integrating convolutional neural networks and recurrent neural networks was constructed. The convolutional neural network was used to extract spatial features from the two-dimensional crystal size distribution image, and the recurrent neural network was used to capture the nonlinear relationship between the operating conditions and the extracted spatial features. Divide the batch execution time into The model input includes three control intervals, with the initial solution supersaturation, cooling temperature trajectory, and control interval information as model inputs; the third... The input for each control interval is ,in The initial solution is supersaturated. For the first Control the solution temperature within the control zone. , The total number of control intervals divided for the batch cooling curve; the two-dimensional crystal size distribution is represented as: (1) in, For the first Two-dimensional crystal size distribution within each control region, Indicates the first The length grid of each control zone and width grid Crystal number density within; , , and These represent the number of grid cells along the length and width of the crystal, respectively. , , and These are the upper limits of the grid in the length and width directions of the crystal, respectively. and These are the grid dimensions in the length and width directions, respectively; The spatial features of the two-dimensional crystal size distribution are extracted using a convolutional neural network. The first convolutional layer The output of the Zhang feature map is: (2) in, and The first k Within the first control interval The first convolutional layer Input and output of the feature map; This represents the number of convolutional layers; The number of feature maps; For the first The first convolutional layer Convolution kernel of Zhang's feature map; For the first The first convolutional layer Bias terms of the Zhang feature map; The activation function is non-linear; the pooling layer is represented as: (3) in, For the first k Within the first control interval In the first pooling layer The output of the feature map, The pooling function is used; after convolution and pooling, all feature maps output from the last pooling layer are concatenated and vectorized sequentially to obtain the first... k Spatial characteristic vectors of two-dimensional crystal size distribution in each control interval: , This means that the concatenated feature maps will be expanded into column vectors in a predetermined order. Indicates the first The first control interval Spatial features, , The number of spatial features; A recurrent neural network is used to describe the dynamic relationship between the operation condition sequence and spatial features. Its hidden state and predicted spatial features are as follows: (4) in, For the first Hidden states of a recurrent neural network within a control interval; For the first Hidden states of a recurrent neural network within a control interval; The input weight matrix; This is the weight matrix in the hidden state; To output the weight matrix; For output bias terms; For recurrent neural networks based on input vectors The obtained spatial feature vectors; The two-dimensional crystal size distribution is then reconstructed through a fully connected decoding layer: (5) in, Each fully connected layer is connected sequentially. For the first The first control interval The input of a fully connected layer , As input to the first connection layer; The vectorized predicted two-dimensional crystal size distribution; This represents the number of fully connected layers. and The first The weight matrix and bias terms of each fully connected layer; Indicates matrix rearrangement; The first one is obtained by reconstruction through a fully connected decoding layer. Predicted two-dimensional crystal size distribution for each control interval; The two-dimensional distribution difference function is used to evaluate the deviation between the actual two-dimensional crystal size distribution and the predicted two-dimensional crystal size distribution: (6) in, A two-dimensional distribution difference measure. For true two-dimensional crystal size distribution, To predict the size distribution of two-dimensional crystals; and The actual two-dimensional crystal size distribution and the predicted two-dimensional crystal size distribution are shown in the unfolded... Normalized number density at each grid location; ; The training of the integrated neural network includes pre-training of the convolutional network and optimization of the recurrent network; the reconstruction loss of the convolutional network is: (7) The validation error and the training objective of the integrated neural network are: (8) in, This represents the reconstruction loss for convolutional networks. This is the set of parameters and hyperparameters for convolutional networks and their fully connected decoding layers; Number of training batches; and The first i The training batch in the ... k The true two-dimensional crystal size distribution and the reconstructed two-dimensional crystal size distribution of each control interval; To verify the error; The number of spatial features; and The first in the verification batch The first control interval One real spatial feature and one predicted spatial feature; This is the training loss of the integrated neural network; This is the set of weights, biases, and hyperparameters for convolutional neural networks and recurrent neural networks.
3. The data-driven modeling and multi-objective optimization method for batch cooling crystallization process according to claim 1, characterized in that, The second step is as follows: Based on the integrated neural network model established in the first step, the initial solution supersaturation is... Using the segmented cooling rate as the offline optimization decision variable, a multi-objective optimization problem is constructed, considering the crystal aspect ratio, the concentration of two-dimensional crystal size distribution, and the unit product yield; the offline optimization decision vector... Represented as: (9) in, For the first The cooling rate of each control zone; Offline optimization decision vector Input the integrated neural network model established in the first step to obtain the corresponding two-dimensional crystal size distribution prediction results: (10) in, This represents the integrated neural network model established in the first step; For the comprehensive neural network parameter set; Crystal aspect ratio Defined as: (11) in, For the first Crystal aspect ratio within each control interval For the first Two-dimensional crystal size distribution within a control interval Step moment, and These are the order of moments in the length and width directions, respectively; and These are the crystal length and width, respectively; For the first Two-dimensional crystal size distribution moments of the total characteristic width of the crystal in each control interval; For the first Two-dimensional crystal size distribution moments of the total characteristic length of the crystal in each control interval; The degree of concentration of size distribution in two-dimensional crystals is expressed using the information entropy index. express: (12) in, For the first Information entropy of each control interval; The smaller the value, the more concentrated the two-dimensional crystal size distribution of the product, and vice versa; Unit product yield index Defined as: (13) in, and These represent the initial and final solution concentrations, respectively. This represents the volume of the solution. Seed loading rate, which is the ratio of seed mass to initial solute mass; The offline multi-objective optimization problem is represented as: (14) in, to The constraints are absolute supersaturation, batch endpoint temperature, temperature change in a single control interval, and initial solution supersaturation. For the first The absolute oversaturation of each control interval; This represents the upper limit of permissible absolute oversaturation. This refers to the final temperature of the batch. The lower limit of the allowable endpoint temperature; and These are the lower and upper limits of temperature change within adjacent control intervals, respectively. and These are the lower and upper limits of the initial solution supersaturation, respectively. and The temperature range is set according to the allowable temperature drop range of the temperature control device; The offline multi-objective optimization problem shown in formula (14) is solved using the enhanced goal achievement method or the non-dominated sorting genetic algorithm to obtain the Pareto solution set; in order to select a comprehensive compromise scheme from the Pareto solution set, the th... The distance between each Pareto solution and the ideal reference point : (15) in, The number of Pareto solutions; , and The first The crystal aspect ratio, the concentration of two-dimensional crystal size distribution, and the yield per unit product corresponding to each Pareto solution; , and These are the ideal reference values obtained through single-objective optimization under the same constraints; Finally, the Pareto solution with the smallest distance was selected as the optimal offline compromise solution: (16) in, , and These represent the optimal crystal aspect ratio, information entropy, and unit product yield corresponding to this scheme. The minimum Euclidean distance; according to The corresponding temperature trajectory, process variables, predicted two-dimensional crystal size distribution, and product quality indicators are used to construct an expert knowledge base for subsequent online dynamic multi-objective optimization.
4. The data-driven modeling and multi-objective optimization method for batch cooling crystallization process according to claim 1, characterized in that, The third step is as follows: The Pareto optimal temperature trajectory and corresponding process variables obtained in the second step are organized into an expert knowledge base. Using the real-time measured crystallization process state as input, the solution temperature for the next control interval is output online to adapt to initial condition deviations, concentration disturbances, temperature measurement noise, and changes in the optimization target weights. The real-time process state of each control interval is represented as follows: (17) in, For the first Real-time process state vectors for each control interval; and The first The solution concentration and solution temperature in each control zone; They represent the first The two-dimensional crystal size distribution moments corresponding to the total number of crystals, total crystal feature width, total crystal feature length, and total crystal volume in each control interval; For each set of offline Pareto solutions obtained in the second step An expert knowledge base was created by segmenting the cooling curves, corresponding process states, and quality indicators. : (18) in, For the first Number of expert trajectories; For the first The expert trajectory in the first The first control interval Process variables with spatial characteristics; For the first The expert trajectory in the first The first control interval Manipulated variables for spatial characteristics; Before constructing the generative adversarial imitation learning model CAGAIL based on cross-attention, a comprehensive reward function is first constructed based on the crystal aspect ratio, information entropy, and unit product yield: (19) in, For the first Normalized composite quality return for each control interval; , and These are the target weights for crystal aspect ratio, information entropy, and unit product yield, respectively, and the sum of the three is 1. , and These are the normalized th Crystal aspect ratio, information entropy, and unit product yield for each control interval; (20) (21) (22) in, For the first The absolute oversaturation of each control interval, For the first The upper limit of absolute supersaturation allowed in each control interval is used to avoid spontaneous nucleation induced by excessively high supersaturation. For the first Manipulated variable for temperature change within a control interval; and These are the lower and upper limits of the allowable temperature variation of the temperature control device within a single control range, respectively. This refers to the final temperature of the batch. The lower limit of the permissible batch endpoint temperature; The total number of control intervals divided for batch operation; The absolute oversaturation constraint, temperature change constraint, and endpoint temperature constraint from step two are incorporated into the comprehensive reward function as penalty terms: (23) in, For the first Constraint penalty terms for each control interval; , and These represent low, medium, and high penalty values, respectively. It is a preset small positive number; To simultaneously consider product quality and operational feasibility, the first The overall return of each control interval; After determining the comprehensive reward function, a generative adversarial imitation learning model CAGAIL based on cross-attention is constructed. CAGAIL is an overall architecture for realizing online dynamic multi-objective optimization, including a cross-attention module, an execution network, an evaluation network, a discriminator, and an auxiliary inverse network. The cross-attention module is used to extract expert manipulation information related to the current process state from the expert knowledge base. The execution network is used to generate manipulation variables. The evaluation network is used to evaluate the expected cumulative reward of the execution network in the current state. The discriminator is used to distinguish between expert experience and the experience generated by the execution network. The auxiliary inverse network is used to constrain the physical implementability of the manipulation variables through batch run consistency loss.
5. The data-driven modeling and multi-objective optimization method for batch cooling crystallization process according to claim 4, characterized in that, First, construct the cross-attention module; then, normalize the time index... Concatenate into expert process variables: (24) in, For the first The expert trajectory in the first The first control interval Process variables with spatial characteristics; For normalized time index; For the extended time The expert trajectory in the first The first control interval Expert process variables for spatial characteristics; For the first The expert trajectory in the first A matrix consisting of all time-extended expert process variables for each control interval; For the first The expert trajectory in the first Expert-manipulated variable matrix for each control interval; That is, the temperature change manipulated variable obtained by converting the offline cooling rate in the second step. For the first The duration of each control interval; The number of expert trajectories; Then, the features of real-time process variables, expert process variables, and expert manipulated variables are constructed: (25) in, For the first Real-time process variables within a control interval Features; For expert process variable matrix Features; To allow experts to manipulate variable characteristics; and These are the trainable weights in the cross-attention module; Attention weights are calculated using the standard scaled dot product method: (26) in, For the first Attention weight vectors for each control interval; This is the normalization function; The feature dimension of the expert process variables; Attention-weighted analysis of expert-manipulated variables yields optimal reference experience: (27) in, For the first The optimal reference experience for each control interval is essentially a weighted expert manipulation variable reference extracted from the expert knowledge base based on the current process variables. and The former is different; it belongs to manipulated variable information, while the latter belongs to process variable information. The manipulated variables actually executed online are not directly equal to... Instead, it is a combination of execution networks. and Generated later; The real-time process variables and the optimal reference experience are concatenated into an augmented process variable, and the actual manipulated variables for the current control interval are output: (28) in, Indicates the first Augmented process variables for each control interval; For the first The actual manipulated variables output by the execution network within each control interval; This indicates that the parameters in the CAGAIL model are The execution network's function is to map the current augmented process state to the actual manipulated variables; For use in strategy exploration Gaussian white noise in each control interval; To constrain the physical feasibility of online manipulation variables, subsequent process variables are predicted based on the first step of the integrated neural network, and the manipulated variables are reconstructed through an auxiliary inverse network: (29) in, This indicates the prediction obtained from the integrated neural network. Two-dimensional crystal size distribution within the control region; For the prediction augmentation process variables of the next control interval; To predict the manipulators corresponding to the augmented process variables; For parameters Auxiliary reverse network; Manipulating variables through the process of reconstructing the reverse network; This results in consistency loss during batch execution. To execute the network decision set; For mathematical expectation; It is the square norm 2; The dynamic imitation weights are further updated based on quality performance, operational constraint satisfaction, and attention confidence. (30) in, , and These represent the second Pareto compromise optimal solution corresponding to the first step. Quality indicators for each control interval; This indicates that the execution network in the current CAGAIL model generates the manipulated variables based on the optimal reference experience extracted by the cross-attention module, and then calculates the result according to formula (23). The return for each control interval; The first term representing expert knowledge The return for each control interval; For the rate of return; (31) in, for Constraint satisfaction rate at any given time; and These represent the total number of safety constraints and performance constraints, respectively. and They are respectively The number of safety and performance constraints that have been satisfied at any given moment; for Attention confidence at any given moment; For attention weight information entropy; The number of attention weights; For the first Each attention weight; for Dynamic imitation weights at any given moment; Evaluation Network From parameters Characterization, with the first Augmented process variables for each control interval and the actual manipulated variables generated by the execution network As input, output scalar This is used to evaluate the expected cumulative overall return that the execution network can obtain under current operating conditions; The execution network aims to improve the output of the evaluation network. Its training gradient consists of the evaluation network gradient, the discriminator gradient, and the batch run consistency loss gradient, and the relative contribution of the evaluation network training and expert experience imitation is adjusted by dynamic imitation weights. (32) in, To achieve the overall training objectives of the network; For gradient; For parameters The discriminator; Weighting coefficients for batch run consistency loss; discriminator Used to distinguish between expert process variable-manipulation variable pairs in the expert knowledge base and process variable-manipulation variable pairs generated by the execution network; and The first The expert trajectory in the first Expert process variables and expert manipulated variables for each control interval; In parallel with performing network updates, the evaluation network is trained according to the Bellman equation, with its loss function and objective value as follows: (33) in, To evaluate the network loss function; For the first The target evaluation value for each control interval; For the first The overall return of each control interval; Discount factor; Defined for formula (29) Control intervals predict augmented process variables; and These are the target networks for the evaluation network and the execution network, respectively. and The corresponding target network parameters are updated using a soft update method; In the policy training phase, the CAGAIL model uses an expert knowledge base and the integrated neural network established in the first step to train the execution network, evaluation network, discriminator, auxiliary inverse network, and cross-attention module. After training, it enters the third step, the online execution phase. At this time, the integrated neural network, the cross-attention module with fixed parameters, and the execution network are retained to generate the manipulated variables of the current control interval based on the real-time process variables. The evaluation network, discriminator, and auxiliary inverse network only participate in training and do not participate in the calculation of online manipulated variables in the actual batch operation.