Full-automatic online PAT intermittent crystallization control method, medium and system

Through the fully automatic online PAT batch crystallization control method, the neural network is used to optimize the crystallization parameters, and the problem of difficulty in achieving accurate online control in the existing technology is solved, and the efficiency and product quality of the crystallization process are improved.

CN119015736AActive Publication Date: 2024-11-26PHARMAVISION QINGDAO INTELLIGENT TECH LTD

Patent Information

Application Number
CN202411298124.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2024-11-26
Estimated Expiration
2044-09-18

AI Technical Summary

Technical Problem

Existing PAT batch crystallization control methods are difficult to achieve precise online control, especially when complex dynamic behaviors and invisible parameters are difficult to measure directly.

Method used

The fully automatic online PAT intermittent crystallization control method is adopted to obtain historical data, calculate invisible parameters, and use long and short-term memory networks to establish a multi-branch neural network model, optimize the crystallization process parameters, adjust the equipment operating parameters in real time, and realize fully automatic online control.

Benefits of technology

Accurate control of the intermittent crystallization process of PAT is achieved, crystallization efficiency and product quality are improved, and continuous optimization and adaptive adjustment are possible, solving the problem of difficulty in achieving accurate online control in traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119015736A_ABST
    Figure CN119015736A_ABST
Patent Text Reader

Abstract

The invention provides a full-automatic online PAT intermittent crystallization control method, medium and system, and belongs to the technical field of PAT crystallization, and the full-automatic online PAT intermittent crystallization control method comprises the following steps: firstly, collecting historical data to obtain visible and invisible parameters of a crystallization process, and integrating the visible and invisible parameters into crystallization process parameters; then, according to the characteristics of the crystallization process, time, stage and change point segmentation is carried out on parameters, and a training data set is constructed; and establishing a multi-branch neural network model by adopting a long-short-term memory network, and training by utilizing the training data set to obtain a PAT intermittent crystallization process parameter optimization model. And online visible and invisible parameters of the current production process are obtained, segmentation is carried out according to the same method, the optimization model is input, and optimal crystallization process control parameters are obtained. And finally, adjusting operation parameters of crystallization equipment in real time according to an optimization result, and realizing full-automatic online PAT intermittent crystallization control. The technical problem that an existing PAT intermittent crystallization control method is difficult to achieve accurate online control is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of PAT crystallization, and in particular, relates to a fully automatic online PAT intermittent crystallization control method, medium and system. Background Art

[0002] PAT intermittent crystallization is an important unit operation widely used in the chemical industry. In the fields of pharmaceuticals, food, chemicals, etc., the intermittent crystallization process can effectively separate and extract target products, such as active pharmaceutical ingredients, food additives, high-purity chemicals, etc. Compared with continuous crystallization, the PAT intermittent crystallization process has higher flexibility and controllability, and can be customized according to the characteristics of different products.

[0003] Generally speaking, the PAT intermittent crystallization process includes the following main steps: first, dissolve the raw material solute in the solvent to form a saturated solution; then, by cooling, evaporation or adding anti-solvent, the solution is made supersaturated; then, crystal nucleation and crystal growth are carried out, and finally, the target product is obtained through post-processing such as separation, washing, and drying. In this process, process parameters such as temperature, stirring intensity, feed rate, and cooling rate have an important influence on the crystallization effect.

[0004] However, the kinetic behavior of the PAT intermittent crystallization process is very complex, involving multiple physical and chemical processes, such as dissolution, supersaturation, nucleation, growth, and maturation, which are affected by many factors such as temperature, concentration, and stirring. At the same time, there are some key parameters in the crystallization process that are difficult to measure directly, such as saturation, supersaturation, crystallization kinetic parameters, and secondary nucleation rate. These invisible parameters are crucial to understanding and controlling the crystallization process, but traditional empirical models are difficult to accurately predict.

[0005] In summary, the existing PAT intermittent crystallization control method is difficult to achieve precise online control. Summary of the invention

[0006] In view of this, the present invention provides a fully automatic online PAT intermittent crystallization control method, medium and system, which can solve the technical problem that the existing PAT intermittent crystallization control method is difficult to achieve accurate online control.

[0007] The present invention is achieved in that:

[0008] A first aspect of the present invention provides a fully automatic online PAT intermittent crystallization control method, which comprises the following steps:

[0009] S10, obtaining historical data, specifically collecting visible parameters of the crystallization process and crystallization effect parameters of each PAT instrument in the online PAT intermittent crystallization process,

[0010] S20, calculating invisible parameters of the crystallization process using the collected visible parameters of the crystallization process, and merging the visible parameters of the crystallization process and the invisible parameters of the crystallization process into crystallization process parameters;

[0011] S30, according to the characteristics of the crystallization process, the crystallization process parameters are segmented by time, by crystallization stage, and by parameter change point, to obtain a crystallization process parameter time segment group, a crystallization process parameter stage segment group, and a crystallization process parameter change point segment group;

[0012] S40, establishing a training data set, including a crystallization process parameter time segment group, a crystallization process parameter stage segment group, a crystallization process parameter change point segment group, and a crystallization effect parameter;

[0013] S50, using a long short-term memory network as a basic network structure, establishing a multi-branch neural network model, using the training data set for training, and obtaining a PAT intermittent crystallization process parameter optimization model;

[0014] S60, obtaining visible parameters of the crystallization process of each PAT instrument in the online PAT intermittent crystallization process of the current production process, calculating invisible parameters of the crystallization process, and segmenting the parameters according to the method in S30;

[0015] S70, inputting the segmented parameters of the current production process into the PAT intermittent crystallization process parameter optimization model obtained in S50, to obtain optimized crystallization process control parameters, including an optimal temperature curve, an optimal stirring rate, an optimal feed rate, and an optimal cooling rate;

[0016] S80, outputting the obtained optimized crystallization process control parameters to the control personnel for real-time adjustment of the operating parameters of the crystallization equipment, including adjustment of the temperature and feed rate of the feed tank, adjustment of the temperature, heating and cooling rate and stirring rate of the crystallization kettle, so as to realize full-automatic online PAT intermittent crystallization control.

[0017] Specifically, the step S10 specifically includes: collecting visible parameters of the crystallization process and crystallization effect parameters of each PAT instrument in the online PAT intermittent crystallization process from the previous production records or specially designed experiments within the enterprise. The visible parameters of the crystallization process include temperature, particle size, morphology, turbidity, concentration, stirring rate, feed rate, cooling rate, etc.; the crystallization effect parameters include crystal yield, crystal purity, crystal size distribution, crystal morphology uniformity, crystallization time, etc. By obtaining these historical data, a complete data basis is provided for subsequent model training and optimization.

[0018] The specific steps of step S20 include: using the visible parameters of the crystallization process, through the saturation calculation equation, supersaturation calculation equation, crystallization kinetics equation and secondary nucleation rate equation, etc., to calculate the invisible parameters of the crystallization process, including saturation, supersaturation, crystallization kinetics parameters, secondary nucleation rate, etc. These invisible parameters describe the key features of the PAT intermittent crystallization process and provide necessary input for subsequent parameter optimization.

[0019] The specific steps of step S30 include: segmenting the crystallization process parameters according to time, crystallization stage and parameter change point. Segmenting by time means dividing the entire crystallization process into several time periods at equal intervals; segmenting by crystallization stage means dividing the crystallization process into dissolution stage, cooling stage, nucleation stage, crystal growth stage and crystal maturation stage; segmenting by parameter change point means segmenting according to significant change points such as temperature inflection point, turbidity mutation point, concentration mutation point, particle size mutation point, supersaturation peak point, crystallization rate peak point and secondary nucleation rate peak point. This multi-dimensional parameter segmentation helps to more comprehensively characterize the dynamic characteristics of the PAT intermittent crystallization process.

[0020] The specific steps of step S40 include: constructing a comprehensive training data set based on the crystallization process parameter time segmentation group, crystallization process parameter stage segmentation group, crystallization process parameter change point segmentation group and corresponding crystallization effect parameters obtained in the above steps. The training data set includes time segmentation group data reflecting the time-varying law of crystallization process parameters, stage segmentation group data reflecting the characteristics of parameters in different crystallization stages, change point segmentation group data reflecting the change points of key parameters, and crystallization effect parameter data related to the final crystallization quality and efficiency. These comprehensive training data provide a solid foundation for the establishment of the subsequent PAT intermittent crystallization process parameter optimization model.

[0021] The specific steps of step S50 include: using a long short-term memory network (LSTM) as the basic network structure, constructing a multi-branch neural network model including a time segmentation branch network, a stage segmentation branch network, a change point segmentation branch network, an invisible parameter estimation branch network and a fusion network. The time segmentation branch network adopts a bidirectional LSTM structure, which can capture the context information of the time series data; the stage segmentation branch network adopts a convolutional neural network structure, which can extract the spatial features of each crystallization stage; the change point segmentation branch network adopts an LSTM structure enhanced by an attention mechanism, which can adaptively focus on the key points of parameter changes; the invisible parameter estimation branch network adopts an improved deep residual network structure, which can more accurately estimate the invisible parameters of the crystallization process; the fusion network adopts a combination of a multi-layer perceptron and an attention mechanism, which can adaptively fuse the features of each branch network.

[0022] The specific steps of steps S60 and S70 include: firstly, obtaining the online visible parameter data of the current PAT intermittent crystallization process, including temperature, particle size, morphology, turbidity, concentration, stirring rate, feed rate, cooling rate, etc., and using the aforementioned parameter calculation equation to deduce the corresponding invisible parameters, including saturation, supersaturation, crystallization kinetic parameters and secondary nucleation rate. Then, these segmented parameters of the current production process are input into the aforementioned trained multi-branch neural network model, and the model will output the optimized crystallization process control parameters, including the optimal temperature curve, optimal stirring rate, optimal feed rate and optimal cooling rate, etc. Finally, these optimized parameters are fed back to the crystallization equipment for real-time adjustment, thereby realizing fully automatic online PAT intermittent crystallization process control.

[0023] Furthermore, it also includes continuously monitoring the crystallization process, and continuously adding the newly acquired data to the training data set, and regularly updating the PAT intermittent crystallization process parameter optimization model to achieve continuous optimization and adaptive adjustment of the model. This can not only ensure that the model is always highly consistent with the latest production process, but also improve the prediction and optimization capabilities by continuously learning new data, and finally achieve continuous optimization of fully automatic online PAT intermittent crystallization control.

[0024] On the basis of the above technical solution, a fully automatic online PAT intermittent crystallization control method of the present invention can also be improved as follows:

[0025] Among them, the multi-branch neural network model includes a time segment branch network, a stage segment branch network, a change point segment branch network, an invisible parameter estimation branch network and a fusion network.

[0026] Furthermore, the time segment branch network is used to process time series data, the input is a time segment group of crystallization process parameters, the output is a time series feature vector, and the structure is a bidirectional LSTM network;

[0027] The stage segmentation branch network is used to process data of different crystallization stages, the input is the stage segmentation group of crystallization process parameters, the output is the stage feature vector, and the structure is a convolutional neural network;

[0028] The change point segmented branch network is used to process parameter change point data, the input is the crystallization process parameter change point segmented group, the output is the change point feature vector, and the structure is an LSTM network enhanced by the attention mechanism;

[0029] The invisible parameter estimation branch network is used to estimate the invisible parameters of the crystallization process, the input is the visible parameters of the crystallization process, the output is the estimated invisible parameters of the crystallization process, and the structure is an improved deep residual network;

[0030] The fusion network is used to integrate the outputs of each branch network. The input is the output feature vector of each branch network, and the output is the optimized crystallization process control parameter. The structure is a combination of a multi-layer perceptron and an attention mechanism.

[0031] The specific structure of the improved deep residual network is as follows:

[0032] 1. Input layer: Receive 8 visible parameters of the crystallization process, including temperature, particle size, morphology, turbidity, concentration, stirring rate, feed rate, and cooling rate. Each parameter corresponds to an input neuron, for a total of 8 input neurons;

[0033] 2. Feature extraction layer: It consists of 5 residual blocks, corresponding to the 5 main stages of the crystallization process (dissolution, cooling, nucleation, crystal growth, and crystal ripening); each residual block contains two 1D convolutional layers with a kernel size of 3, a stride of 1, and a padding of 1; the number of output channels of the first convolutional layer is 16, and the number of output channels of the second convolutional layer is 32; each convolutional layer is followed by batch normalization and a LeakyReLU activation function (negative slope of 0.01); the residual connection adds the input directly to the output of the second convolutional layer;

[0034] 3. Global average pooling layer: Perform global average pooling on the output of the feature extraction layer to compress the feature map of each channel into a scalar value; the output dimension is 32, corresponding to the number of output channels of the last residual block of the feature extraction layer;

[0035] 4. Fully connected layer: It contains 3 fully connected layers, corresponding to the three key stages in the crystallization process (nucleation, crystal growth, and crystal ripening); the input dimension of the first fully connected layer is 32 and the output dimension is 64; the input dimension of the second fully connected layer is 64 and the output dimension is 32; the input dimension of the third fully connected layer is 32 and the output dimension is 16; each fully connected layer is followed by a LeakyReLU activation function (with a negative slope of 0.01);

[0036] 5. Output layer: The last fully connected layer maps the features to 4 invisible parameter spaces. The input dimension is 16 and the output dimension is 4, corresponding to 4 estimated invisible parameters of the crystallization process: saturation, supersaturation, crystallization kinetic parameters, and secondary nucleation rate.

[0037] The advantages of this network structure are:

[0038] The number of residual blocks (5) corresponds to the five main stages of the PAT intermittent crystallization process, allowing the network to better capture the characteristics of each stage. Residual connections help solve the gradient vanishing problem of deep networks and make the network easier to train, especially when processing long-term series of crystallization process data;

[0039] The LeakyReLU activation function (negative slope is 0.01) can alleviate the "neuron death" problem that may be caused by ReLU, while maintaining nonlinear characteristics, which is conducive to capturing nonlinear relationships in the crystallization process;

[0040] The batch normalization layer helps to accelerate network convergence and improve the generalization ability of the model, which is particularly important for adapting to different batches of PAT intermittent crystallization processes;

[0041] The global average pooling layer can reduce the number of parameters and the risk of overfitting, while retaining the global feature information of the entire crystallization process;

[0042] The number of fully connected layers (3) corresponds to the three key stages in the crystallization process, which helps the network better learn the characteristics and interrelationships of these stages;

[0043] The four neurons in the output layer directly correspond to the four invisible parameters that need to be estimated, making the output of the network closely connected to the key parameters of the crystallization process;

[0044] Through this improved deep residual network structure, the invisible parameter estimation branch network can more accurately capture the characteristics of the PAT intermittent crystallization process and estimate key invisible parameters, providing important input for the entire PAT intermittent crystallization process parameter optimization model.

[0045] Furthermore, the visible parameters of the crystallization process specifically include temperature, particle size, morphology, turbidity, concentration, stirring rate, feed rate, and cooling rate; the crystallization effect parameters specifically include crystal yield, crystal purity, crystal size distribution, crystal morphology uniformity, and crystallization time.

[0046] Furthermore, invisible parameters of the crystallization process include saturation, supersaturation, crystallization kinetic parameters, and secondary nucleation rate.

[0047] Furthermore, the crystallization stage includes a dissolution stage, a cooling stage, a nucleation stage, a crystal growth stage, and a crystal maturation stage; segmenting by time specifically divides the entire crystallization process into a number of time periods at equal intervals; segmenting by parameter change points specifically segmentes according to significant change points of the crystallization process parameters, and the significant change points specifically include temperature inflection points, turbidity mutation points, concentration mutation points, particle size mutation points, supersaturation peak points, crystallization rate peak points, and secondary nucleation rate peak points.

[0048] Furthermore, the step of calculating the invisible parameters of the crystallization process using the collected visible parameters of the crystallization process adopts a parameter calculation equation group, specifically including a saturation calculation equation, a supersaturation calculation equation, a crystallization kinetics equation, and a secondary nucleation rate equation;

[0049] 1. The saturation calculation equation is specifically expressed as follows:

[0050]

[0051] Where S is saturation (dimensionless); ΔH f is the dissolution enthalpy of the solute (J / mol); R is the gas constant, which is 8.314 J / (mol·K); T is the current solution temperature (K); T m is the melting point of the solute (K).

[0052] The parameter acquisition method is:

[0053] T is directly measured by the temperature sensor. m is the physical property of the solute, obtained by consulting the literature or experimental determination. f The results were obtained by differential scanning calorimetry (DSC) experiment. The specific steps are as follows:

[0054] Step 1: Prepare samples and reference materials;

[0055] Step 2: Set the temperature program of the DSC instrument, usually 1-10K / min;

[0056] Step 3: Record the heat flow difference between the sample and the reference as it changes with temperature;

[0057] Step 4: Calculate the area of ​​the melting peak by integration to obtain ΔH f value.

[0058] 2. The supersaturation calculation equation is specifically expressed as follows:

[0059]

[0060] Where σ is the degree of supersaturation (dimensionless); C is the current solution concentration (g / L); C * is the saturation concentration (g / L).

[0061] The parameter acquisition method is:

[0062] C is directly measured by online concentration measuring instruments (such as infrared spectrometer). * Calculated by the following equation:

[0063]

[0064] Where A is the pre-exponential factor (g / L); E a is the activation energy of dissolution (J / mol); R is the gas constant, which is 8.314 J / (mol·K); T is the current solution temperature (K).

[0065] A and E a It is obtained by fitting experimental data. The specific steps are as follows:

[0066] Step 1: Measure the saturation concentration of the solution at different temperatures;

[0067] Step 2: Draw lnC * For the 1 / T image;

[0068] Step 3: Obtain the slope - E through linear regression a / R and the intercept lnA, thus calculating A and E a value.

[0069] 3. The crystallization kinetics equation is specifically expressed as follows:

[0070]

[0071] Where G is the crystal growth rate (m / s); k g is the growth rate coefficient (m / s); σ is the supersaturation (dimensionless); g is the growth exponent (dimensionless); E g is the growth activation energy (J / mol); R is the gas constant, which is 8.314 J / (mol·K); T is the current solution temperature (K); σ c is the critical supersaturation (dimensionless).

[0072] The parameter acquisition method is:

[0073] k g , g, E g and σ c It is obtained by fitting experimental data. The specific steps are as follows:

[0074] Step 1: Measure the crystal growth rate at different temperatures and supersaturations;

[0075] Step 2: Use nonlinear least squares method to fit the experimental data and get k g , g, E g and σ c The value of .

[0076] 4. The secondary nucleation rate equation is specifically expressed as follows:

[0077]

[0078] Where B is the secondary nucleation rate (pieces / (m 3 ·s));k b is the nucleation rate coefficient (cells / (m 3 ·s));M T is the mass concentration of suspended crystals (kg / m 3); j is the suspended crystal mass concentration index (dimensionless); σ is the supersaturation (dimensionless); b is the supersaturation index (dimensionless); E b is the nucleation activation energy (J / mol); R is the gas constant, which is 8.314 J / (mol·K); T is the current solution temperature (K); ω is the stirring rate (rad / s).

[0079] The parameter acquisition method is:

[0080] M T Calculated by online particle size analyzer and concentration meter:

[0081] M T =CC * ;

[0082] ω is directly measured by the rotation speed of the stirrer.

[0083] k b , j, b and E b It is obtained by fitting experimental data. The specific steps are as follows:

[0084] Step 1: Measure the secondary nucleation rate at different temperatures, supersaturation, suspended crystal mass concentration and stirring rate;

[0085] Step 2: Take the logarithm of both sides of the equation and get:

[0086]

[0087] Step 3: Use multiple linear regression to fit the experimental data and obtain lnk b , j, b and E b The value of .

[0088] Through these equations, the invisible parameters of the crystallization process (saturation, supersaturation, crystallization kinetic parameters, secondary nucleation rate) can be calculated using the visible parameters of the crystallization process (temperature, concentration, stirring rate, etc.). These equations take into account the effects of factors such as temperature, concentration, stirring rate, etc. on the crystallization process, and can more accurately describe the changes in key parameters in the PAT intermittent crystallization process.

[0089] The crystallization process parameters are segmented according to significant change points. The specific steps are:

[0090] Time series analysis of each crystallization process parameter;

[0091] The local mean and variance of the parameters are calculated using the sliding window method;

[0092] Set a threshold. When the parameter change exceeds the threshold, it is marked as a significant change point.

[0093] Comprehensively analyze the significant change points of multiple parameters and remove redundant points;

[0094] The crystallization process was divided into multiple time periods according to the significant change points retained.

[0095] Furthermore, the method further comprises the following steps: continuously monitoring the crystallization process, adding newly acquired data to the training data set, and regularly updating the PAT intermittent crystallization process parameter optimization model to achieve continuous optimization and adaptive adjustment of the model.

[0096] A second aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores program instructions, and when the program instructions are run in a computer, they are used to execute the above-mentioned fully automatic online PAT intermittent crystallization control method.

[0097] A third aspect of the present invention provides a fully automatic online PAT intermittent crystallization control system, which includes the above-mentioned computer-readable storage medium.

[0098] Compared with the prior art, the fully automatic online PAT intermittent crystallization control method, medium and system provided by the present invention have the following beneficial effects:

[0099] 1. Comprehensive use of historical process data

[0100] This method makes full use of the previous PAT intermittent crystallization process data within the enterprise, including measurable crystallization process parameters and corresponding crystallization effect parameters. Through in-depth analysis of these data, a comprehensive training data set can be established, laying a solid foundation for subsequent model optimization.

[0101] 2. Accurately estimate key invisible parameters

[0102] This method not only uses measurable crystallization process parameters, but also can infer key invisible parameters that are difficult to measure directly through relevant calculation equations, such as saturation, supersaturation, crystallization kinetic parameters, secondary nucleation rate, etc. These invisible parameters are crucial to understanding and controlling the crystallization process, but traditional empirical models are difficult to accurately predict.

[0103] 3. Construct a multi-branch neural network model

[0104] This method uses an innovative multi-branch neural network model, which can fully mine the time series characteristics, stage characteristics, and parameter change characteristics of PAT intermittent crystallization process data, and output optimized crystallization process control parameters in combination with the estimation of invisible parameters. This model structure is closer to the complex dynamic characteristics of the actual process.

[0105] 4. Realize fully automatic online control

[0106] This method feeds back the optimized crystallization process control parameters, such as temperature curve, stirring rate, feed rate, cooling rate, etc., to the crystallization equipment for adjustment in real time. By continuously monitoring and updating the optimization model, the fully automatic online control of the PAT intermittent crystallization process can be achieved, and the crystallization efficiency and product quality can be continuously improved.

[0107] Compared with the prior art, the fully automatic online PAT intermittent crystallization control method of the present invention can more comprehensively utilize historical process data, more accurately estimate key invisible parameters, and build a more practical optimization model, thereby realizing automatic and intelligent crystallization process control. The technical problem that the existing PAT intermittent crystallization control method is difficult to achieve accurate online control is solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0108] Figure 1 A flow chart of the method provided by the present invention;

[0109] Figure 2 Schematic diagram of the online PAT crystallization device used in Example 2;

[0110] In the figure, 1. feed tank; 2. peristaltic pump; 3. temperature control; 4. crystallization tank, 5. PAT equipment probe, 6. product tank, 7 stirring paddle. DETAILED DESCRIPTION

[0111] In order to make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0112] like Figure 1 As shown, it is a flow chart of a fully automatic online PAT intermittent crystallization control method provided by the first aspect of the present invention, and the method comprises the following steps:

[0113] S10, obtaining historical data, specifically collecting visible parameters of the crystallization process and crystallization effect parameters of each PAT instrument in the online PAT intermittent crystallization process,

[0114] S20, using the collected visible parameters of the crystallization process to calculate invisible parameters of the crystallization process, and merging the visible parameters of the crystallization process and the invisible parameters of the crystallization process into crystallization process parameters;

[0115] S30, according to the characteristics of the crystallization process, the crystallization process parameters are segmented by time, by crystallization stage, and by parameter change point, to obtain a crystallization process parameter time segment group, a crystallization process parameter stage segment group, and a crystallization process parameter change point segment group;

[0116] S40, establishing a training data set, including a crystallization process parameter time segment group, a crystallization process parameter stage segment group, a crystallization process parameter change point segment group, and a crystallization effect parameter;

[0117] S50, using a long short-term memory network as a basic network structure, establishing a multi-branch neural network model, using a training data set for training, and obtaining a PAT intermittent crystallization process parameter optimization model;

[0118] S60, obtaining visible parameters of the crystallization process of each PAT instrument in the online PAT intermittent crystallization process of the current production process, calculating invisible parameters of the crystallization process, and segmenting the parameters according to the method in S30;

[0119] S70, inputting the segmented parameters of the current production process into the PAT intermittent crystallization process parameter optimization model obtained in S50, to obtain optimized crystallization process control parameters, including an optimal temperature curve, an optimal stirring rate, an optimal feed rate, and an optimal cooling rate;

[0120] S80, outputting the obtained optimized crystallization process control parameters to the control personnel for real-time adjustment of the operating parameters of the crystallization equipment, including adjustment of the temperature and feed rate of the feed tank, adjustment of the temperature, heating and cooling rate and stirring rate of the crystallization kettle, so as to realize full-automatic online PAT intermittent crystallization control.

[0121] The specific implementation methods of the above steps are described in detail below:

[0122] Step S10: First, the method needs to obtain past PAT intermittent crystallization process data, including visible parameters of each PAT instrument in the crystallization process and corresponding crystallization effect parameters. Visible parameters include temperature, particle size, morphology, turbidity, concentration, stirring rate, feed rate, cooling rate, etc. Crystallization effect parameters include crystal yield, crystal purity, crystal size distribution, crystal morphology uniformity, crystallization time, etc. These historical data can come from previous production records within the enterprise, or can be obtained through specially designed experimental collection. Regardless of the source of the data, this method requires that the complete visible parameters of the crystallization process and the corresponding crystallization effect parameters can be obtained to provide a basis for subsequent model training and optimization.

[0123] Step S20: In addition to visible parameters that can be measured directly, the crystallization process also has some invisible key parameters, such as saturation, supersaturation, crystallization kinetic parameters, secondary nucleation rate, etc. These invisible parameters are usually not directly measurable, but can be estimated based on the visible parameters through relevant calculation equations.

[0124] First, saturation can be calculated using the following equation:

[0125]

[0126] Where S is saturation (dimensionless); ΔH f is the dissolution enthalpy of the solute (J / mol); R is the gas constant, which is 8.314 J / (mol·K); T is the current solution temperature (K); T m is the melting point temperature of the solute (K). T can be directly measured by a temperature sensor, T m It is necessary to consult the literature or experimentally determine, ΔH f It can be determined experimentally by differential scanning calorimetry (DSC).

[0127] Secondly, supersaturation can be calculated by the following equation:

[0128]

[0129] Where σ is the degree of supersaturation (dimensionless); C is the current solution concentration (g / L); C * is the saturation concentration (g / L). Among them, C can be directly measured by an online concentration measuring instrument (such as an infrared spectrometer), and C * It needs to be calculated by the following equation:

[0130]

[0131] Where A is the pre-exponential factor (g / L); E a is the activation energy of dissolution (J / mol); R is the gas constant, which is 8.314 J / (mol·K); T is the current solution temperature (K). A and E a It can be obtained by measuring the saturation concentration at different temperatures and performing linear regression fitting.

[0132] Again, the crystallization kinetic parameters can be calculated by the following equations:

[0133]

[0134] Where G is the crystal growth rate (m / s); k g is the growth rate coefficient (m / s); σ is the supersaturation (dimensionless); g is the growth exponent (dimensionless); E g is the growth activation energy (J / mol); R is the gas constant, which is 8.314 J / (mol·K); T is the current solution temperature (K); σ c is the critical supersaturation (dimensionless). g , g, E g and σ c It needs to be obtained by fitting experimental data.

[0135] Finally, the secondary nucleation rate can be calculated by the following equation:

[0136]

[0137] Where B is the secondary nucleation rate (pieces / (m 3 ·s));k b is the nucleation rate coefficient (cells / (m 3 ·s));M T is the mass concentration of suspended crystals (kg / m 3 ); j is the suspended crystal mass concentration index (dimensionless); σ is the supersaturation (dimensionless); b is the supersaturation index (dimensionless); E b is the nucleation activation energy (J / mol); R is the gas constant, which is 8.314 J / (mol·K); T is the current solution temperature (K); ω is the stirring rate (rad / s). T It can be calculated by online particle size analyzer and concentration meter, ω can be directly measured by the speed of the stirrer, k b , j, b and E b It needs to be obtained by fitting experimental data.

[0138] Through the above equations, the visible parameters of the crystallization process (such as temperature, concentration, stirring rate, etc.) can be used to calculate the corresponding invisible parameters of the crystallization process (saturation, supersaturation, crystallization kinetic parameters, secondary nucleation rate). These invisible parameters describe the key characteristics of the PAT intermittent crystallization process and provide the necessary input for subsequent parameter optimization.

[0139] Step S30: In order to better analyze the characteristics of the crystallization process, the method divides the crystallization process parameters into segments according to time, crystallization stage and parameter change point.

[0140] First, segment by time. The specific method is to divide the entire crystallization process into several time periods at equal intervals. This can reflect the change pattern of the crystallization process over time.

[0141] Secondly, segment the parameters according to the crystallization stage. The crystallization process mainly includes the dissolution stage, cooling stage, nucleation stage, crystal growth stage and crystal maturation stage. Segmenting the crystallization process parameters according to these key stages helps to capture the characteristics of different stages.

[0142] Finally, segment the parameters according to the parameter change points. The parameters of the crystallization process do not change uniformly and continuously, but there are some significant change points, such as temperature inflection point, turbidity mutation point, concentration mutation point, particle size mutation point, supersaturation peak point, crystallization rate peak point, and secondary nucleation rate peak point. Dividing the parameters into different time periods where these significant change points are located can better analyze the key nodes of the crystallization process.

[0143] The specific segmentation method is as follows: First, perform a time series analysis on each crystallization process parameter, and use the sliding window method to calculate the local mean and variance of the parameter. Then set a certain threshold, and when the parameter change exceeds the threshold, it is marked as a significant change point. Finally, conduct a comprehensive analysis of the significant change points of multiple parameters, remove redundant change points, and determine the final parameter segmentation points based on this, dividing the entire crystallization process into multiple time periods.

[0144] Through this multi-dimensional parameter segmentation method, the dynamic characteristics of the PAT intermittent crystallization process can be more comprehensively characterized, providing richer data features for subsequent model training and optimization.

[0145] Step S40: Based on the crystallization process parameter time segment group, crystallization process parameter stage segment group, crystallization process parameter change point segment group and corresponding crystallization effect parameters obtained in the above steps, the method constructs a comprehensive training data set.

[0146] The training dataset consists of the following parts:

[0147] 1. Crystallization process parameter time segment group: This part of the data reflects the change pattern of crystallization process parameters over time.

[0148] 2. Crystallization process parameter stage segmentation group: This part of the data reflects the parameter characteristics of different crystallization stages.

[0149] 3. Crystallization process parameter change point segmentation group: This part of the data reflects the key change points of the crystallization process parameters.

[0150] 4. Crystallization effect parameters: This part of the data includes crystal yield, crystal purity, crystal size distribution, crystal morphology uniformity, crystallization time, etc., which are directly related to the final crystallization quality and efficiency.

[0151] By integrating these parameter data of different dimensions into a training data set, comprehensive data support can be provided for the establishment of subsequent PAT intermittent crystallization process parameter optimization model.

[0152] Step S50: This method uses a multi-branch neural network model to optimize the parameters of the PAT intermittent crystallization process. The basic network structure of the model is a long short-term memory network (LSTM), and multiple branch networks are added to capture features of different dimensions.

[0153] Specifically, the multi-branch neural network model consists of the following parts:

[0154] 1. Time Segment Branching Network

[0155] This branch network is used to process the time series data of crystallization process parameters. It adopts a bidirectional LSTM (Bi-LSTM) network structure, which can effectively capture the context information in the time series data. The input is the time segment group of crystallization process parameters, and the output is the time series feature vector.

[0156] 2. Phased Segmented Branch Network

[0157] This branch network is used to process data from different crystallization stages. It uses a convolutional neural network (CNN) structure to extract spatial features of each crystallization stage. The input is a stage segmentation group of crystallization process parameters, and the output is a stage feature vector.

[0158] 3. Change point segmented branch network

[0159] This branch network is used to process the change point data of crystallization process parameters. It adopts the LSTM network structure enhanced by the attention mechanism, which can adaptively focus on the key points of parameter changes. The input is the segmented group of crystallization process parameter change points, and the output is the change point feature vector.

[0160] 4. Invisible Parameter Estimation Branch Network

[0161] This branch network is used to estimate the invisible parameters of the crystallization process, such as saturation, supersaturation, crystallization kinetic parameters, and secondary nucleation rate. It uses an improved deep residual network (ResNet) structure to more accurately capture the relationship between visible and invisible parameters. The input is the visible parameters of the crystallization process, and the output is the estimated invisible parameters of the crystallization process.

[0162] 5. Converged Network

[0163] The network is used to synthesize the output feature vectors of each branch network and output the final optimized crystallization process control parameters. It adopts a combination of multi-layer perceptron (MLP) and attention mechanism, which can adaptively integrate the features of each branch network.

[0164] Through the design of this multi-branch neural network, the time series characteristics, stage characteristics, change point characteristics and the complex relationship between visible and invisible parameters of PAT intermittent crystallization process data can be fully explored, so as to obtain a more accurate and comprehensive crystallization process parameter optimization model. The key algorithm design and network structure are as follows:

[0165] The time segment branch network adopts a bidirectional LSTM structure, which can capture the contextual information in time series data.

[0166] The stage segmentation branch network adopts a CNN structure, which can extract the spatial features of each crystallization stage.

[0167] The change point segmentation branch network adopts an LSTM structure enhanced by the attention mechanism, which can adaptively focus on the key points of parameter changes.

[0168] The invisible parameter estimation branch network adopts an improved deep residual network structure, which can more accurately capture the relationship between visible and invisible parameters. The deep residual network consists of 5 residual blocks, each of which corresponds to a major stage of the crystallization process, and uses LeakyReLU activation function and batch normalization layer to improve network performance. The number of fully connected layers (3) corresponds to the three key stages of the crystallization process.

[0169] The fusion network adopts a combined structure of MLP and attention mechanism, which can adaptively fuse the features of each branch network.

[0170] Through the design of this multi-branch neural network, the complex characteristics of the PAT intermittent crystallization process can be learned more comprehensively, and more optimized crystallization process control parameters can be obtained, providing key support for the realization of fully automatic online control.

[0171] Step S60: In the actual production process, the method first needs to obtain the online visible parameter data of the current PAT intermittent crystallization process. These visible parameters include temperature, particle size, morphology, turbidity, concentration, stirring rate, feed rate, cooling rate, etc. These parameters can be directly measured by corresponding online detection instruments, for example, temperature can be measured by a temperature sensor, concentration can be measured by an online infrared spectrometer, and stirring rate can be directly obtained by the rotation speed of the stirrer.

[0172] After obtaining these visible parameter data, it is also necessary to use the aforementioned parameter calculation equation to calculate the corresponding invisible parameters of the crystallization process. These invisible parameters include saturation, supersaturation, crystallization kinetic parameters and secondary nucleation rate. The specific calculation method is as follows:

[0173] 1. Saturation is calculated using the formula:

[0174]

[0175] Where T is the current solution temperature, T m is the melting point temperature of the solute, ΔH f is the dissolution enthalpy of the solute. T can be directly obtained by measurement, T m It is necessary to consult the literature or experimentally determine ΔH f It can be determined by DSC experiment.

[0176] 2. Supersaturation is calculated using the formula:

[0177]

[0178] Where C is the current solution concentration, C * is the saturation concentration. C can be obtained by measuring with an online infrared spectrometer, C * Then we need to use the formula Calculate, where A and E a It needs to be obtained through experimental measurement and fitting.

[0179] 3. The crystallization kinetic parameters are calculated using the formula:

[0180]

[0181] Among them, k g , g, E g and σ c It needs to be obtained through experimental data fitting.

[0182] 4. The secondary nucleation rate is calculated using the formula:

[0183]

[0184] Among them, M T It can be calculated by online particle size analyzer and concentration meter, ω can be directly measured by the rotation speed of the stirrer, k b , j, b and E b It needs to be obtained through experimental data fitting.

[0185] Through these calculation formulas, the key invisible parameters of the crystallization process can be deduced using the online measurable parameters of the current production process. These invisible parameters are crucial to the control of the crystallization process and provide the necessary input for subsequent parameter optimization.

[0186] Step S70: After obtaining the segmentation parameters (time segmentation, stage segmentation, change point segmentation) of the current production process and the calculated invisible parameters, the method inputs these data into the aforementioned trained multi-branch neural network model.

[0187] The multi-branch neural network model includes the following key branch networks:

[0188] 1. Time Segment Branch Network: It adopts a bidirectional LSTM structure and can capture contextual information in time series data.

[0189] 2. Stage segmented branch network: Using CNN structure, it can extract the spatial features of each crystallization stage.

[0190] 3. Change point segmented branch network: It adopts the LSTM structure enhanced by the attention mechanism, which can adaptively focus on the key points of parameter changes.

[0191] 4. Invisible parameter estimation branch network: The improved deep residual network structure can more accurately estimate the invisible parameters of the crystallization process.

[0192] 5. Fusion network: It adopts the combined structure of MLP and attention mechanism, which can adaptively fuse the features of each branch network.

[0193] The segmented parameters of the current production process are input into this multi-branch neural network model, and the model will output the optimized crystallization process control parameters. These optimized parameters include the optimal temperature curve, optimal stirring rate, optimal feed rate, and optimal cooling rate.

[0194] Specifically, the time segmented branch network and the stage segmented branch network can extract the timing characteristics and stage characteristics of the crystallization process; the change point segmented branch network can capture the key parameter change points; the invisible parameter estimation branch network can predict the key invisible parameters of the crystallization process; finally, the fusion network comprehensively utilizes these features to output the optimized crystallization process control parameters.

[0195] These optimized control parameters can be fed back to the crystallization equipment in real time to adjust the temperature and feed rate of the feed tank, the temperature, heating and cooling rate, and stirring rate of the crystallization kettle, so as to achieve fully automatic online PAT intermittent crystallization process control. By continuously optimizing these key parameters, the yield, purity, particle size distribution, morphology uniformity and other indicators of the crystallization process can be continuously improved to achieve the best crystallization effect.

[0196] The entire optimization process is a closed-loop feedback system. In actual production, it is necessary to continuously monitor the crystallization process, continuously add newly acquired data to the training data set, and regularly update the optimization model to achieve adaptive adjustment and continuous optimization of the model. This can ensure that the model is always highly consistent with the latest production process, and improve the prediction and optimization capabilities by continuously learning new data.

[0197] Through the above steps, the fully automatic online PAT intermittent crystallization control method of the present invention can make full use of the historical data of the crystallization process, establish a multi-branch neural network model, accurately estimate key invisible parameters, and output optimized crystallization process control parameters. These optimized parameters can be fed back to the crystallization equipment in real time for adjustment, thereby realizing fully automatic online PAT intermittent crystallization process control and continuously improving crystallization efficiency and product quality.

[0198] Step S80, output the optimized crystallization process control parameters to the controller for real-time adjustment of the operating parameters of the crystallization equipment, including adjustment of the temperature and feed rate of the feed tank, adjustment of the temperature, heating and cooling rate and stirring rate of the crystallization kettle, so as to realize full-automatic online PAT intermittent crystallization control. The controller can directly operate the corresponding equipment to realize, or directly use software such as SIMATIC SIPAT data integration platform for control, or use a control system to realize, wherein the specific implementation of the control system is described as follows:

[0199] 1. Control system architecture design

[0200] First, a complete control system architecture needs to be established, including the following main parts:

[0201] a) Central control unit: used to receive the control parameters output by the optimization model and generate specific control instructions based on these parameters.

[0202] b) Data acquisition system: real-time collection of measurement data from various PAT instruments, including temperature, particle size, morphology, turbidity, concentration, etc.

[0203] c) Actuator: including feed pump, agitator, heating / cooling system, etc., used to execute control instructions.

[0204] d) Human-machine interface: used for operators to monitor and intervene in the process.

[0205] e) Communication network: ensure data transmission and instruction issuance between various parts.

[0206] 2. Feed tank temperature control

[0207] According to the optimal temperature curve given by the optimization model, it is very important to control the temperature of the feed tank. The specific implementation steps are as follows:

[0208] a) Discretize the optimal temperature curve to obtain the target temperature value at each time point.

[0209] b) Using the PID (Proportional-Integral-Derivative) control algorithm, the heating or cooling power is calculated based on the deviation between the current temperature and the target temperature. The output of the PID controller can be expressed as:

[0210]

[0211] Where u(t) is the control output, e(t) is the error signal, K p , K i , K d They are proportional, integral and differential gains respectively.

[0212] c) According to the output of the PID controller, the power of the heater or cooler is adjusted to achieve precise temperature control.

[0213] d) Monitor temperature changes in real time and dynamically adjust PID parameters through adaptive algorithms to meet control requirements at different stages.

[0214] 3. Feed rate control

[0215] The optimal feed rate given by the optimization model needs to be achieved by accurately controlling the speed of the feed pump. The specific steps are as follows:

[0216] a) Convert the optimal feed rate curve into a speed curve of the feed pump.

[0217] b) Use a frequency converter to control the speed of the feed pump motor to achieve a continuously adjustable feed rate.

[0218] c) Use a closed-loop control system to provide real-time feedback of the actual feed rate through the flow meter, compare it with the set value, and dynamically adjust the motor speed.

[0219] d) Considering that the viscosity of the material may change with temperature, it is necessary to adjust the characteristic curve of the feed pump in real time to ensure the accuracy of the feed rate.

[0220] 4. Crystallization kettle temperature control

[0221] The temperature control of the crystallization kettle is one of the most critical parts of the whole process, and it is necessary to accurately follow the optimal temperature curve given by the optimization model. The implementation steps are as follows:

[0222] a) Decompose the optimal temperature curve into multiple stages, such as dissolution, cooling, nucleation, crystal growth and ripening stages.

[0223] b) For each stage, design a specific temperature control strategy:

[0224] Dissolution stage: rapid heating and constant temperature;

[0225] Cooling stage: cooling at the optimal cooling rate;

[0226] Nucleation stage: precisely control the temperature to avoid overcooling;

[0227] Crystal growth stage: slowly cool down to maintain appropriate supersaturation;

[0228] Ripening stage: maintain constant temperature or slowly increase the temperature;

[0229] c) Use PID control system, the outer loop controls the temperature of the crystallization kettle, and the inner loop controls the jacket coolant temperature. This dual-loop control can respond to external disturbances more quickly and improve the accuracy of temperature control.

[0230] d) Considering the nonlinear characteristics of the crystallization process, the model predictive control (MPC) algorithm can be used in combination with the process model to predict future temperature changes and make control adjustments in advance.

[0231] e) Monitor the temperature distribution in the crystallization kettle in real time and use multi-point temperature sensors to ensure the uniformity of the temperature in the kettle. If the temperature is found to be uneven, adjust the stirring rate or change the heating / cooling method.

[0232] 5. Heating and cooling rate control

[0233] The realization of the optimal cooling rate requires precise control of the heating and cooling rate of the crystallization kettle. The specific implementation method is as follows:

[0234] a) Based on the optimal temperature curve, calculate the target heating and cooling rates for each time period.

[0235] b) Use the predictive control algorithm to predict the temperature change in the future based on the current temperature and target rate.

[0236] c) Dynamically adjust the heating or cooling power to make the actual heating and cooling rate consistent with the target value. The following control law can be used:

[0237] P=K1(r set -r actual )+K2∫(r set -r actual )dt;

[0238] Where P is the heating / cooling power, r set To set the heating and cooling rate, r actual is the actual heating and cooling rate, K1 and K2 are control parameters.

[0239] d) Taking into account the thermal inertia of the system, adjust the control action in advance at the rate change point to avoid overshoot or lag.

[0240] e) Monitor the temperature gradient in the crystallization kettle in real time to ensure that the temperature of the entire crystallization system changes evenly.

[0241] 6. Stirring rate control

[0242] The stirring rate directly affects the heat transfer, mass transfer and suspension state of the crystals during the crystallization process. According to the optimal stirring rate given by the optimization model, the specific control steps are as follows:

[0243] a) Convert the optimal stirring rate curve into a speed control signal for the stirrer motor.

[0244] b) Use a frequency converter to precisely control the speed of the agitator motor to achieve a continuously adjustable stirring rate.

[0245] c) A closed-loop control system is used to provide real-time feedback of the actual stirring rate through a speed sensor, which is then compared with the set value and adjusted dynamically.

[0246] d) Considering the changes in suspension viscosity and density during the crystallization process, the stirring power needs to be adjusted in real time to maintain the set stirring rate. The following power compensation formula can be used:

[0247] P actual =P set ·(1+K μ Δμ+K ρ Δρ);

[0248] Among them, P actual is the actual stirring power, P set is the setting stirring power, Δμ and Δρ are the changes of viscosity and density respectively, K |μ and K |ρ is the compensation coefficient.

[0249] e) Different stirring modes may be required at different crystallization stages. For example, a higher stirring rate may be required in the nucleation stage to promote uniform nucleation, while a lower stirring rate may be required in the crystal growth stage to avoid breakage. Therefore, the stirring strategy needs to be dynamically adjusted according to the current crystallization stage.

[0250] 7. Multi-parameter collaborative control

[0251] In actual operation, the control of the above parameters is not independent of each other, but requires coordinated control to achieve the best effect. The specific implementation method is as follows:

[0252] a) Establish a multivariable control model to consider the mutual influence between various control parameters. For example, changes in stirring rate will affect the heat transfer effect, which in turn affects temperature control.

[0253] b) Using fuzzy control strategy, dynamically adjust the control priority according to the current crystallization stage and the status of each parameter. For example, in the nucleation stage, more attention may be paid to the precise control of temperature and supersaturation, while in the crystal growth stage, more attention may be paid to the coordination of stirring rate and cooling rate.

[0254] c) Use artificial intelligence algorithms, such as reinforcement learning, to find the best multi-parameter collaborative control strategy through continuous trial and optimization.

[0255] d) Establish a parameter coupling compensation mechanism to automatically adjust other related parameters when a certain parameter changes to maintain the overall optimal state.

[0256] 8. Handling of abnormal situations

[0257] In actual production, various abnormal situations may occur, and a complete exception handling mechanism needs to be established:

[0258] a) Set the safety threshold of parameter changes. When a parameter exceeds the preset range, an alarm is triggered and corresponding emergency measures are taken.

[0259] b) Establish a fault diagnosis system that can quickly identify equipment failures or process anomalies and provide treatment suggestions.

[0260] c) Design a safe fallback strategy that can smoothly transition to a suboptimal or safe operating state when optimal control cannot be maintained.

[0261] d) A manual intervention interface shall be retained to allow operators to take over the system and exercise manual control when necessary.

[0262] 9. Data recording and analysis

[0263] In order to continuously improve the control effect, detailed data recording and analysis of the entire control process is required:

[0264] a) Real-time recording of the set and actual values ​​of all control parameters, as well as various process parameters measured by PAT instruments.

[0265] b) Calculate control performance indicators, such as set point tracking error, control stability, energy consumption, etc.

[0266] c) Conduct data mining and analysis regularly to identify deficiencies in control strategies.

[0267] d) Based on the analysis results, continuously optimize the control algorithm and parameter settings to achieve continuous improvement of the control system.

[0268] A second aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores program instructions, and when the program instructions are run in a computer, they are used to execute the above-mentioned fully automatic online PAT intermittent crystallization control method.

[0269] A third aspect of the present invention provides a fully automatic online PAT intermittent crystallization control system, which includes the above-mentioned computer-readable storage medium.

[0270] Specifically, the principle of the present invention is:

[0271] First, this method makes full use of the previous PAT intermittent crystallization process data within the enterprise, including the measurable parameters of each PAT instrument in the crystallization process, such as temperature, particle size, morphology, turbidity, concentration, stirring rate, feed rate, cooling rate, etc., as well as the corresponding crystallization effect parameters, such as crystal yield, crystal purity, crystal size distribution, crystal morphology uniformity, crystallization time, etc. These historical data lay the foundation for the establishment of a comprehensive training data set.

[0272] Secondly, this method uses a series of physical and chemical equations, such as saturation calculation equation, supersaturation calculation equation, crystallization kinetics equation, secondary nucleation rate equation, etc., to convert the measurable crystallization process parameters into key invisible parameters that are difficult to measure directly, including saturation, supersaturation, crystallization kinetics parameters, secondary nucleation rate, etc. These invisible parameters are crucial to understanding and controlling the PAT intermittent crystallization process, but traditional empirical models are difficult to accurately predict.

[0273] Then, the method divides the crystallization process parameters into multiple dimensions according to time, crystallization stage and parameter change point, so as to fully characterize the complex dynamic characteristics of the PAT intermittent crystallization process. Time segmentation can reflect the change law of parameters over time, stage segmentation corresponds to the key steps of crystallization, and parameter change point segmentation captures the key turning points of process parameters. This multi-dimensional data feature provides rich input for subsequent model training and optimization.

[0274] Next, the method uses an innovative multi-branch neural network model for training. The basic network structure of the model is the long short-term memory network (LSTM), and multiple branches are added, including time segmentation branch network, stage segmentation branch network, change point segmentation branch network, invisible parameter estimation branch network, and fusion network.

[0275] Among them, the time segmentation branch network adopts a bidirectional LSTM structure, which can capture the contextual information in the time series data; the stage segmentation branch network adopts a CNN structure, which can extract the spatial characteristics of each crystallization stage; the change point segmentation branch network adopts an LSTM structure enhanced by an attention mechanism, which can adaptively focus on the key points of parameter changes; the invisible parameter estimation branch network adopts an improved deep residual network structure, which can more accurately estimate the invisible parameters of the crystallization process; the fusion network adopts a combination of MLP and attention mechanism, which can adaptively fuse the characteristics of each branch network.

[0276] The design of this multi-branch neural network model can fully explore the time series characteristics, stage characteristics, parameter change characteristics and the complex relationship between visible and invisible parameters of the PAT intermittent crystallization process data, thereby obtaining a more accurate and comprehensive crystallization process parameter optimization model. Compared with the existing mechanism model, statistical model and adaptive control method, this method can better capture the complex dynamic characteristics of the actual process and provide strong support for fully automatic online control.

[0277] In actual production, this method will obtain the online measurable parameters of the current PAT intermittent crystallization process in real time, and use the aforementioned calculation equation to deduce the key invisible parameters. Then, these segmented parameters of the current production process are input into the trained multi-branch neural network model, and the model will output the optimized crystallization process control parameters, such as temperature curve, stirring rate, feed rate, cooling rate, etc. Finally, these optimized parameters will be fed back to the crystallization equipment in real time for adjustment, thereby realizing the fully automatic online control of the PAT intermittent crystallization process.

[0278] By continuously monitoring the crystallization process and updating the optimization model, this method can achieve adaptive adjustment and continuous optimization of parameters, further improving the efficiency of the crystallization process and product quality.

[0279] In order to better understand and implement the present invention, a specific embodiment 1 of the present invention is provided below. The steps of this embodiment 1 are described as follows: First, in step S10, it is necessary to obtain historical data of the PAT intermittent crystallization process. These data include visible parameters of each PAT instrument in the crystallization process and corresponding crystallization effect parameters. The visible parameters can be directly obtained by online measuring instruments, including temperature T, particle size d, morphology M, turbidity τ, concentration C, stirring rate ω, feed rate v in and cooling rate v cool The crystallization effect parameters need to be determined experimentally, including crystal yield Y, crystal purity P, crystal size distribution Ψ(d), crystal morphology uniformity Ω and crystallization time t crs Obtaining these historical data lays the foundation for subsequent model training and optimization.

[0280] In step S20, the invisible parameters of the crystallization process need to be calculated using the visible parameters, including saturation S, supersaturation σ, crystallization kinetics parameter G, and secondary nucleation rate B.

[0281] First, the saturation S can be calculated by the following equation:

[0282]

[0283] Among them, ΔH fis the dissolution enthalpy of the solute (J / mol), R is the gas constant (8.314 J / (mol·K)), T m is the melting point temperature of the solute (K). T can be directly measured by a temperature sensor, while T m It is necessary to consult the literature or conduct experimental determination. f It can be determined by differential scanning calorimetry (DSC) experiment. The specific steps are as follows: prepare the sample and reference material, set the temperature program of the DSC instrument (usually 1-10K / min), record the change of the heat flow difference between the sample and the reference material with temperature, and then calculate the area of ​​the melting peak by integration to obtain ΔH f value.

[0284] Secondly, the supersaturation σ can be calculated by the following equation:

[0285]

[0286] Where C is the current solution concentration (g / L), C * is the saturation concentration (g / L). C can be directly measured by an online concentration measuring instrument (such as an infrared spectrometer). * The following equation is required for calculation:

[0287]

[0288] Where A is the pre-exponential factor (g / L), E a is the activation energy of dissolution (J / mol). A and E a It can be obtained by measuring the saturated concentration of the solution at different temperatures and performing linear regression fitting.

[0289] Again, the crystallization kinetic parameters include the crystal growth rate G and the secondary nucleation rate B. The crystal growth rate G can be calculated by the following equation:

[0290]

[0291] Among them, k g is the growth rate coefficient (m / s), g is the growth exponent (dimensionless), E g is the growth activation energy (J / mol), σ c is the critical supersaturation (dimensionless). These parameters need to be obtained by fitting experimental data.

[0292] The secondary nucleation rate B can be calculated by the following equation:

[0293]

[0294] Among them, k b is the nucleation rate coefficient (pieces / (m3·s)), MT is the mass concentration of suspended crystals (kg / m3), j is the mass concentration index of suspended crystals (dimensionless), b is the supersaturation index (dimensionless), E b is the nucleation activation energy (J / mol), and ω is the stirring rate (rad / s). T It can be calculated by online particle size analyzer and concentration meter, and ω can be directly measured by the speed of the stirrer. b , j, b and E b It needs to be obtained by fitting experimental data.

[0295] Through the above equations, the visible parameters of the crystallization process (such as temperature, concentration, stirring rate, etc.) can be used to calculate the corresponding invisible parameters of the crystallization process (saturation, supersaturation, crystallization kinetic parameters, secondary nucleation rate). These invisible parameters describe the key characteristics of the PAT intermittent crystallization process and provide necessary input for subsequent parameter optimization.

[0296] In step S30, the crystallization process parameters are segmented according to time, crystallization stage and parameter change point.

[0297] First, segment by time. The specific method is to divide the entire crystallization process into N time periods at equal intervals, and the length of each time period is Δt = t total / N, where t total is the total time of the entire crystallization process. This can reflect the change of the crystallization process over time.

[0298] Secondly, segment by crystallization stage. The crystallization process mainly includes dissolution stage, cooling stage, nucleation stage, crystal growth stage and crystal maturation stage. The crystallization process parameters can be segmented according to these key stages.

[0299] Finally, the parameters are segmented according to the parameter change points. The crystallization process parameters do not change uniformly and continuously, but there are some significant change points, such as the temperature inflection point T inflection , turbidity mutation point τ critical , concentration mutation point C critical , particle size mutation point d critical , supersaturation peak point σ peak , Crystallization rate peak point (G) peak And the secondary nucleation rate peak point (B) peak Etc. These parameter change points can be identified using the following steps:

[0300] 1. Perform time series analysis on each crystallization process parameter;

[0301] 2. Use the sliding window method to calculate the local mean μ of the parameter local and variance

[0302] 3. Set a suitable threshold δ, when the parameter change exceeds δσ local When , it is marked as a significant change point;

[0303] 4. Comprehensively analyze the significant change points of multiple parameters, remove redundant change points, and obtain the final parameter segmentation points.

[0304] Through this multi-dimensional parameter segmentation method, the dynamic characteristics of the PAT intermittent crystallization process can be more comprehensively characterized, providing rich data features for subsequent model training and optimization.

[0305] In step S40, a comprehensive training data set needs to be established. The training data set includes the following parts:

[0306] 1. Crystallization process parameter time segment group in Represents the visible parameter vector for the i-th time period.

[0307] 2. Crystallization process parameter stage segmentation group in Represents the visible parameter vector of the jth crystallization stage.

[0308] 3. Crystallization process parameter change point segmentation group in The visible parameter vector representing the kth parameter change point.

[0309] 4. Crystallization effect parameters Including crystal yield, crystal purity, crystal size distribution, crystal morphology uniformity and crystallization time.

[0310] By integrating these parameter data of different dimensions into a training data set, comprehensive data support can be provided for the establishment of subsequent PAT intermittent crystallization process parameter optimization model.

[0311] In step S50, a multi-branch neural network model is used to optimize the parameters of the PAT intermittent crystallization process. The basic network structure of the model is a long short-term memory network (LSTM), and multiple branch networks are added to capture features of different dimensions.

[0312] Specifically, the multi-branch neural network model includes the following parts:

[0313] 1. Time-segmented branching network

[0314] This branch network is used to process the time series data of crystallization process parameters. It uses a bidirectional LSTM (Bi-LSTM) network structure, which can effectively capture the context information in the time series data. The input is the crystallization process parameter time segment group Output is a time series feature vector

[0315] 2. Phased Segmented Branch Network

[0316] This branch network is used to process data from different crystallization stages. It uses a convolutional neural network (CNN) structure to extract the spatial features of each crystallization stage. The input is the crystallization process parameter stage segmentation group The output is the stage feature vector

[0317] 3. Change point segmented branch network

[0318] This branch network is used to process the change point data of the crystallization process parameters. It uses the LSTM network structure enhanced by the attention mechanism, which can adaptively focus on the key points of parameter changes. The input is the segmented group of crystallization process parameter change points. The output is the change point feature vector

[0319] 4. Invisible Parameter Estimation Branch Network

[0320] This branch network is used to estimate the invisible parameters of the crystallization process, including saturation S, supersaturation σ, crystallization kinetic parameters G, B; it uses an improved deep residual network (ResNet) structure, which can more accurately capture the relationship between visible and invisible parameters. The input is the visible parameters of the crystallization process

[0321] Output is the estimated invisible parameters of the crystallization process

[0322] 5. Converged Network

[0323] The network is used to synthesize the output feature vectors of each branch network and output the final optimized crystallization process control parameters. It uses a combination of multi-layer perceptron (MLP) and attention mechanism, which can adaptively integrate the features of each branch network. The input is The output is the optimized crystallization process control parameters, including the optimal temperature curve T opt (t), optimal stirring rate ω opt , optimal feed rate v in,opt and the optimal cooling rate v cool,opt wait.

[0324] The design of this multi-branch neural network can fully explore the time series characteristics, stage characteristics, change point characteristics and the complex relationship between visible and invisible parameters of PAT intermittent crystallization process data, thereby obtaining a more accurate and comprehensive crystallization process parameter optimization model.

[0325] Specifically, the time segmentation branch network adopts the Bi-LSTM structure, which can capture the contextual information in the time series data; the stage segmentation branch network adopts the CNN structure, which can extract the spatial characteristics of each crystallization stage; the change point segmentation branch network adopts the LSTM structure enhanced by the attention mechanism, which can adaptively focus on the key points of parameter changes; the invisible parameter estimation branch network adopts the improved deep residual network structure, which can more accurately estimate the invisible parameters of the crystallization process.

[0326] First, the improved deep residual network used by the invisible parameter estimation branch network has the following structure:

[0327] 1. Input layer: receives 8 visible parameters of the crystallization process, Each parameter corresponds to an input neuron, for a total of 8 input neurons.

[0328] 2. Feature extraction layer: It consists of 5 residual blocks, each of which corresponds to a major stage of the crystallization process (dissolution, cooling, nucleation, crystal growth, crystal ripening). Each residual block contains two 1D convolutional layers with a kernel size of 3, a stride of 1, and a padding of 1. The number of output channels of the first convolutional layer is 16, and the number of output channels of the second convolutional layer is 32. Each convolutional layer is followed by batch normalization and a LeakyReLU activation function (negative slope of 0.01). The residual connection adds the input directly to the output of the second convolutional layer.

[0329] 3. Global average pooling layer: Perform global average pooling on the output of the feature extraction layer to compress the feature map of each channel into a scalar value. The output dimension is 32, which corresponds to the number of output channels of the last residual block of the feature extraction layer.

[0330] 4. Fully connected layers: Contains 3 fully connected layers, corresponding to the three key stages in the crystallization process (nucleation, crystal growth, and crystal ripening). The first fully connected layer has an input dimension of 32 and an output dimension of 64; the second fully connected layer has an input dimension of 64 and an output dimension of 32; the third fully connected layer has an input dimension of 32 and an output dimension of 16. Each fully connected layer is followed by a LeakyReLU activation function (negative slope of 0.01).

[0331] 5. Output layer: The last fully connected layer maps the features to 4 invisible parameter spaces. The input dimension is 16 and the output dimension is 4, corresponding to 4 estimated invisible parameters of the crystallization process:

[0332] This improved deep residual network structure has the following advantages:

[0333] 1. The number of residual blocks (5) corresponds to the five main stages of the PAT intermittent crystallization process, allowing the network to better capture the characteristics of each stage. Residual connections help solve the gradient vanishing problem of deep networks and make the network easier to train, especially when processing long-term series of crystallization process data.

[0334] 2. The LeakyReLU activation function can alleviate the "neuron death" problem that may be caused by ReLU, while maintaining nonlinear characteristics, which is conducive to capturing nonlinear relationships in the crystallization process.

[0335] 3. The batch normalization layer helps to accelerate network convergence and improve the generalization ability of the model, which is especially important for adapting to different batches of PAT intermittent crystallization processes.

[0336] 4. The global average pooling layer can reduce the number of parameters and reduce the risk of overfitting, while retaining the global feature information of the entire crystallization process.

[0337] 5. The number of fully connected layers (3) corresponds to the three key stages in the crystallization process, which helps the network better learn the characteristics and relationships of these stages.

[0338] 6. The four neurons in the output layer directly correspond to the four invisible parameters that need to be estimated, making the output of the network closely linked to the key parameters of the crystallization process.

[0339] Through this improved deep residual network structure, the invisible parameter estimation branch network can more accurately capture the characteristics of the PAT intermittent crystallization process and estimate key invisible parameters, providing important input for the entire PAT intermittent crystallization process parameter optimization model.

[0340] Next, the specific structure of the fusion network is introduced. The fusion network is used to synthesize the output feature vectors of each branch network and output the final optimized crystallization process control parameters. It adopts a combination structure of a multi-layer perceptron (MLP) and an attention mechanism, as follows:

[0341] 1. Input layer: receives the output feature vectors of each branch network, in, is the output of the time segment branch network, is the output of the stage segmentation branch network, is the output of the change point segmentation branch network, Estimate the output of the branch network for unseen parameters.

[0342] 2. Attention layer: The attention mechanism is used to assign different weights to the feature vectors of each branch network to adaptively fuse their information. Attention weight α i The calculation formula is as follows:

[0343]

[0344] Among them, w i is the learnable attention weight vector.

[0345] 3. Fully connected layer: contains 2 fully connected layers. The input dimension of the first fully connected layer is the sum of the output feature vectors of each branch network, and the output dimension is 128. The input dimension of the second fully connected layer is 128, and the output dimension is the dimension of the crystallization process control parameters, including T opt (t),ω opt ,v in,opt ,v cool,opt Each fully connected layer is followed by a ReLU activation function.

[0346] The design of this fusion network can adaptively focus on the importance of each branch network output, make full use of diverse information such as time series characteristics, stage characteristics, change point characteristics and invisible parameter estimation, and output the final optimized crystallization process control parameters.

[0347] In steps S60 and S70, the segmented parameters of the current production process are input into the trained multi-branch neural network model, and the optimized crystallization process control parameters are obtained.

[0348] Specifically, we first need to obtain the online visible parameter data of the current PAT intermittent crystallization process. Then, the corresponding invisible parameters are calculated using the above parameter calculation equation.

[0349] Next, the segmentation parameters of these current production processes, including the time segment group Phase segment group And the change point segment group and the estimated invisible parameters Input into the previously trained multi-branch neural network model.

[0350] Each branch network of the multi-branch neural network model will extract time series features, stage features, and change point features, and combine them with invisible parameter estimation. After processing by the fusion network, the optimized crystallization process control parameters, T, are finally output. opt(t),ω opt ,v in,opt ,v cool,opt .

[0351] These optimized control parameters can be fed back to the crystallization equipment in real time to adjust the temperature and feed rate of the feed tank, the temperature, heating and cooling rate, and stirring rate of the crystallization kettle, so as to achieve fully automatic online PAT intermittent crystallization process control. By continuously optimizing these key parameters, the yield, purity, particle size distribution, morphology uniformity and other indicators of the crystallization process can be continuously improved to achieve the best crystallization effect.

[0352] The entire optimization process is a closed-loop feedback system. In actual production, it is necessary to continuously monitor the crystallization process, continuously add newly acquired data to the training data set, and regularly update the optimization model to achieve adaptive adjustment and continuous optimization of the model. This can ensure that the model is always highly consistent with the latest production process, and improve the prediction and optimization capabilities by continuously learning new data.

[0353] Through the above steps, the fully automatic online PAT intermittent crystallization control method of the present invention can make full use of the historical data of the crystallization process, establish a multi-branch neural network model, accurately estimate key invisible parameters, and output optimized crystallization process control parameters. These optimized parameters can be fed back to the crystallization equipment in real time for adjustment, thereby realizing fully automatic online PAT intermittent crystallization process control and continuously improving crystallization efficiency and product quality.

[0354] In order to better understand and implement the present invention, the following provides Example 2 of a specific application scenario of the present invention:

[0355] A pharmaceutical company produces an important amino acid raw material drug and uses the PAT intermittent crystallization process for separation and purification. The company has always attached great importance to the optimization and automation of production processes and has accumulated a large amount of historical data on the PAT intermittent crystallization process, including various measurable crystallization process parameters and corresponding crystallization effect parameters. Based on these historical data, the company decided to adopt the fully automatic online PAT intermittent crystallization control method of the present invention to achieve intelligent optimization and automatic control of the crystallization process. Figure 2As shown, the present embodiment 2 involves the use of an online PAT crystallization device, including a feed tank, a crystallization tank (reactor), a product tank, a temperature control system, a stirring system, a material conveying system, an online process analysis PAT instrument and a closed-loop control software system. When operating, more detailed and specific experimental steps can be formulated according to specific materials and crystallization conditions. Prepare a certain amount and a certain temperature of supersaturated solution and import it into the feed tank. The feed tank is constant at a given temperature so that the solute is completely dissolved, and the feed tank should be a clear solution at this time. The peristaltic pump connecting the feed tank and the crystallization tank is turned on, and the clarified liquid is pumped into the crystallization tank at a specific flow rate, and the crystallization tank is set to a certain constant value. Continue stirring for a period of time at a specific stirring rate, cool down at a certain rate, and be equipped with an online PAT device, such as an imaging particle shape and particle size analyzer, an online turbidity meter, and a probe inserted into the crystallization tank to monitor the important parameters in the tank in real time, such as concentration, supersaturation, turbidity, morphology, and particle size distribution. Changes. And parameter adjustment is performed by the method provided by the present invention to achieve full automation and unmanned operation of the crystallization process. After a certain period of time, the desired crystals are obtained and the material is input into a storage tank.

[0356] First, the company extracted PAT intermittent crystallization process data for 25 batches over a five-year period from historical production records, including:

[0357] 1. Measurable crystallization process parameters:

[0358] Table 1 Measurable parameters of crystallization process

[0359] parameter unit temperature ℃ granularity μm Morphology - Turbidity NTU concentration g / L Stirring speed rpm Feed rate L / min Cooling rate ℃ / min

[0360] 2. Crystallization effect parameters:

[0361] Table 2 Crystallization effect parameters

[0362] parameter unit Crystal yield % Crystal purity % Crystal size distribution - Crystal morphology uniformity - Crystallization time h

[0363] By analyzing these historical data, the company established a comprehensive training data set, including time segment groups, stage segment groups, change point segment groups of crystallization process parameters, and corresponding crystallization effect parameters.

[0364] Next, the company uses these training data to train and optimize the multi-branch neural network model described in the present invention. The specific steps are as follows:

[0365] 1. Calculation of invisible parameters of the crystallization process

[0366] Based on historical data, the company calculated the invisible parameters of the crystallization process, including saturation S, supersaturation σ, crystallization kinetic parameters G and B, etc.

[0367] The saturation S is calculated using the following equation:

[0368]

[0369] Among them, ΔH f =25.3 kJ / mol is the dissolution enthalpy of the solute (amino acid), R = 8.314 J / (mol·K) is the gas constant, T m =298.15K is the melting point temperature of the solute.

[0370] The supersaturation σ is calculated using the following equation:

[0371]

[0372] Where C is the current solution concentration, which is measured by online infrared spectrometer, C * is the saturation concentration, according to Calculated, A = 210g / L, E a =30.5 kJ / mol.

[0373] The crystallization kinetic parameters G and B were calculated using the following equations:

[0374]

[0375]

[0376] Among them, M T =CC * is the mass concentration of suspended crystals, and ω is the stirring rate.

[0377] 2. Segmentation of crystallization process parameters

[0378] Based on historical data, the company divided the crystallization process parameters into time segments, stage segments and change point segments.

[0379] Time segmentation: The entire crystallization process is divided into 10 time periods at equal intervals, and the length of each time period is Δt = 0.5h.

[0380] Stage segmentation: The crystallization process is divided into five main stages, namely dissolution stage (0-1h), cooling stage (1-2h), nucleation stage (2-3h), crystal growth stage (3-4h) and crystal maturation stage (4-5h).

[0381] Change point segmentation: Based on historical data analysis, the following 6 key parameter change points were determined:

[0382] Temperature inflection point: T inflection =45℃;

[0383] Turbidity mutation point: τ critical=300NTU;

[0384] Concentration mutation point: C critical =125g / L;

[0385] Particle size mutation point: d critical =80μm;

[0386] Supersaturation peak point: σ peak =0.35;

[0387] Secondary nucleation rate peak point: (B) peak =2.8×10 9 pcs / (m 3 s);

[0388] 3. Establish a multi-branch neural network model

[0389] Based on the aforementioned training data set, the company uses the multi-branch neural network model described in the present invention for training and optimization. The specific model structure is as follows:

[0390] (1) Time-segmented branch network

[0391] Using a bidirectional LSTM structure, the input is the measurable parameters of the crystallization process in 10 time periods. Output is a time series feature vector

[0392] (2) Phased Segmented Branch Network

[0393] Using the CNN structure, the input is the measurable parameters of the crystallization process in the five crystallization stages. The output is the stage feature vector

[0394] (3) Change point segmented branch network

[0395] The LSTM structure enhanced by the attention mechanism is adopted, and the crystallization process with 6 parameter change points as input can measure the parameters. The output is the change point feature vector

[0396] (4) Invisible Parameter Estimation Branch Network

[0397] The improved deep residual network structure is adopted, and the input is 8 measurable parameters of the crystallization process. Output is the estimated invisible parameters of the crystallization process

[0398] (5) Converged Network

[0399] Using a combination of MLP and attention mechanism, the input is The output is the optimized crystallization process control parameters, T opt (t),ω opt ,v in,opt ,v cool,opt .

[0400] 4. Online implementation and continuous optimization

[0401] In actual production, the company applied the fully automatic online PAT intermittent crystallization control method of the present invention to the crystallization process of amino acid drugs. The specific steps are as follows:

[0402] (1) Obtaining current production process data: Real-time acquisition of measurable parameters of the current PAT intermittent crystallization process, including temperature, particle size, morphology, turbidity, concentration, stirring rate, feed rate, cooling rate, etc., and calculation of invisible parameters such as saturation, supersaturation, crystallization kinetic parameters and secondary nucleation rate. At the same time, these parameters are segmented by time, stage and change point.

[0403] (2) Input optimization model: Input the segmented parameters of the current production process into the trained multi-branch neural network model. The model will output the optimized crystallization process control parameters, including the temperature curve T opt (t), stirring rate ω opt , feed rate v in,opt and cooling rate v cool,opt .

[0404] (3) Real-time adjustment of crystallization equipment: Based on the output of the optimization model, the company adjusts the operating parameters of the crystallization equipment in real time, such as the temperature and feed rate of the feed tank, the temperature, heating and cooling rate, and stirring rate of the crystallization kettle, etc., to achieve fully automatic online PAT intermittent crystallization control.

[0405] (4) Continuous monitoring and optimization: The company continuously monitors the crystallization process, continuously adds newly acquired data to the training data set, and regularly updates the optimization model to ensure that the model can be adaptively adjusted and continuously optimized. Through this closed-loop control, the efficiency of the crystallization process and product quality can be further improved.

[0406] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A fully automatic online PAT intermittent crystallization control method, characterized in that: The following steps are involved: S10, obtaining historical data, specifically collecting visible parameters of the crystallization process and crystallization effect parameters of each PAT instrument in the online PAT intermittent crystallization process, S20, using the collected visible parameters of the crystallization process to calculate invisible parameters of the crystallization process, and merging the visible parameters of the crystallization process and the invisible parameters of the crystallization process into crystallization process parameters; S30, according to the characteristics of the crystallization process, the crystallization process parameters are segmented by time, by crystallization stage, and by parameter change point, to obtain a crystallization process parameter time segment group, a crystallization process parameter stage segment group, and a crystallization process parameter change point segment group; S40, establishing a training data set, including a crystallization process parameter time segment group, a crystallization process parameter stage segment group, a crystallization process parameter change point segment group, and a crystallization effect parameter; S50, using a long short-term memory network as a basic network structure, establishing a multi-branch neural network model, using the training data set for training, and obtaining a PAT intermittent crystallization process parameter optimization model; S60, obtaining visible parameters of the crystallization process of each PAT instrument in the online PAT intermittent crystallization process of the current production process, calculating invisible parameters of the crystallization process, and segmenting the parameters according to the method in S30; S70, inputting the segmented parameters of the current production process into the PAT intermittent crystallization process parameter optimization model obtained in S50, to obtain optimized crystallization process control parameters, including an optimal temperature curve, an optimal stirring rate, an optimal feed rate, and an optimal cooling rate; S80, outputting the obtained optimized crystallization process control parameters to the control personnel for real-time adjustment of the operating parameters of the crystallization equipment, including adjustment of the temperature and feed rate of the feed tank, adjustment of the temperature, heating and cooling rate and stirring rate of the crystallization kettle, so as to realize full-automatic online PAT intermittent crystallization control.

2. A fully automatic online PAT intermittent crystallization control method according to claim 1, characterized in that: The multi-branch neural network model includes a time segment branch network, a stage segment branch network, a change point segment branch network, an invisible parameter estimation branch network and a fusion network.

3. A fully automatic online PAT intermittent crystallization control method according to claim 2, characterized in that: The time segment branch network is used to process time series data, the input is the time segment group of crystallization process parameters, the output is the time series feature vector, and the structure is a bidirectional LSTM network; The stage segmentation branch network is used to process data of different crystallization stages, the input is the stage segmentation group of crystallization process parameters, the output is the stage feature vector, and the structure is a convolutional neural network; The change point segmented branch network is used to process parameter change point data, the input is the crystallization process parameter change point segmented group, the output is the change point feature vector, and the structure is an LSTM network enhanced by the attention mechanism; The invisible parameter estimation branch network is used to estimate the invisible parameters of the crystallization process, the input is the visible parameters of the crystallization process, the output is the estimated invisible parameters of the crystallization process, and the structure is an improved deep residual network; The fusion network is used to integrate the outputs of each branch network. The input is the output feature vector of each branch network, and the output is the optimized crystallization process control parameter. The structure is a combination of a multi-layer perceptron and an attention mechanism.

4. A fully automatic online PAT intermittent crystallization control method according to claim 3, characterized in that: The visible parameters of the crystallization process specifically include temperature, particle size, morphology, turbidity, concentration, stirring rate, feed rate, and cooling rate; the crystallization effect parameters specifically include crystal yield, crystal purity, crystal size distribution, crystal morphology uniformity, and crystallization time.

5. A fully automatic online PAT intermittent crystallization control method according to claim 4, characterized in that: The invisible parameters of the crystallization process include saturation, supersaturation, crystallization kinetic parameters, and secondary nucleation rate.

6. A fully automatic online PAT intermittent crystallization control method according to claim 5, characterized in that: The crystallization stages include a dissolution stage, a cooling stage, a nucleation stage, a crystal growth stage, and a crystal maturation stage; segmenting by time specifically divides the entire crystallization process into a number of time periods at equal intervals; segmenting by parameter change points specifically segments according to significant change points of the crystallization process parameters, and the significant change points specifically include temperature inflection points, turbidity mutation points, concentration mutation points, particle size mutation points, supersaturation peak points, crystallization rate peak points, and secondary nucleation rate peak points.

7. A fully automatic online PAT intermittent crystallization control method according to claim 6, characterized in that: The step of calculating the invisible parameters of the crystallization process using the collected visible parameters of the crystallization process adopts a parameter calculation equation group, specifically including a saturation calculation equation, a supersaturation calculation equation, a crystallization kinetics equation and a secondary nucleation rate equation; The crystallization process parameters are segmented according to significant change points. The specific steps are: Time series analysis of each crystallization process parameter; The local mean and variance of the parameters are calculated using the sliding window method; Set a threshold. When the parameter change exceeds the threshold, it is marked as a significant change point. Comprehensively analyze the significant change points of multiple parameters and remove redundant points; The crystallization process was divided into multiple time periods according to the significant change points retained.

8. A fully automatic online PAT intermittent crystallization control method according to claim 7, characterized in that: The method also includes the following steps: continuously monitoring the crystallization process, adding newly acquired data to the training data set, and regularly updating the PAT intermittent crystallization process parameter optimization model to achieve continuous optimization and adaptive adjustment of the model.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program instructions, and when the program instructions are run in a computer, they are used to execute the fully automatic online PAT intermittent crystallization control method according to any one of claims 1 to 8.

10. A fully automatic online PAT intermittent crystallization control system, characterized in that: A computer-readable storage medium comprising the computer-readable storage medium of claim 9.

Citation Information

Patent Citations

  • In-situ online infrared spectrum monitoring equipment, system and method for crystallization process control

    CN113324944A

  • Ultrasonic device for inducing crystallization of hexafluorophosphoric acid and control method thereof

    CN115845428A

  • Control system for crystallizing apparatus, and computer readable recording medium

    JP2003200002A

  • Online optimal control of batch crystallization processes

    WO2008081216A1

Cited By

  • Lithium hexafluorophosphate production control system and method thereof

    CN119607607A

  • Grease product production control method and system based on intelligent digitization

    CN120079132A

  • Banbury mixing process intelligent model prediction control method based on reinforcement learning

    CN120406110A

  • Mine water evaporation-freezing crystallization process monitoring system and method

    CN120887489A

  • Monitoring System and Method for Mine Water Evaporation-Freeze Crystallization Process

    CN120887489B