A full-automatic online PAT intermittent crystallization control method, medium and system
By constructing a multi-branch neural network model and combining visible parameters to calculate invisible parameters, precise control of the PAT intermittent crystallization process was achieved, solving the problem of difficulty in achieving precise online control in existing technologies and improving crystallization efficiency and product quality.
Patent Information
- Application Number
- CN202411298124.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2044-09-18
AI Technical Summary
Existing PAT intermittent crystallization control methods struggle to achieve precise online control, especially in terms of accurate prediction and real-time adjustment of invisible parameters.
The fully automatic online PAT intermittent crystallization control method is adopted. By acquiring historical data, a multi-branch neural network model is constructed using a long short-term memory network. The invisible parameters are calculated by combining the visible parameters, and the operating parameters of the crystallization equipment are adjusted in real time to achieve fully automatic online control.
Precise control of the PAT intermittent crystallization process has been achieved, improving crystallization efficiency and product quality. Through continuous monitoring and model optimization, automated and intelligent crystallization process management has been realized.
Smart Images

Figure CN119015736B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of PAT crystallization technology, and specifically relates to a fully automatic online PAT intermittent crystallization control method, medium and system. Background Technology
[0002] PAT (Pulse Acrylamide Acid) batch crystallization is an important unit operation widely used in the chemical industry. In pharmaceuticals, food, and chemicals, batch crystallization processes can effectively separate and extract target products, such as active pharmaceutical ingredients, food additives, and high-purity chemicals. Compared to continuous crystallization, PAT batch crystallization offers greater flexibility and controllability, allowing for customized crystallization control based on the characteristics of different products.
[0003] Generally, the PAT batch crystallization process includes the following main steps: First, the raw material solute is dissolved in a solvent to form a saturated solution; then, the solution is made supersaturated by cooling, evaporation, or adding an antisolvent; next, nucleation and crystal growth occur; 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 a significant impact on the crystallization effect.
[0004] However, the kinetics of PAT batch crystallization are highly complex, involving multiple physicochemical processes such as dissolution, supersaturation, nucleation, growth, and ripening. These processes are influenced by factors such as temperature, concentration, and agitation. Furthermore, several key parameters are difficult to measure directly during crystallization, including saturation, supersaturation, crystallization kinetic parameters, and secondary nucleation rate. These invisible parameters are crucial for understanding and controlling the crystallization process, but traditional empirical models struggle to predict them accurately.
[0005] In summary, existing PAT intermittent crystallization control methods are 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 existing PAT intermittent crystallization control methods are difficult to achieve precise online control.
[0007] This invention is implemented as follows:
[0008] The first aspect of the present invention provides a fully automated online PAT intermittent crystallization control method, comprising the following steps:
[0009] S10. Acquire historical data, specifically by collecting the visible parameters of the crystallization process and the crystallization effect parameters of each PAT instrument during the online PAT intermittent crystallization process.
[0010] S20. Using the collected visible parameters of the crystallization process, calculate the invisible parameters of the crystallization process, and combine the visible parameters and the invisible parameters of the crystallization process into crystallization process parameters.
[0011] S30. Based on the characteristics of the crystallization process, the crystallization process parameters are segmented according to time, crystallization stage, and parameter variation point to obtain the crystallization process parameter time segmentation group, the crystallization process parameter stage segmentation group, and the crystallization process parameter variation point segmentation group.
[0012] S40. Establish a training dataset, including time segment groups of crystallization process parameters, stage segment groups of crystallization process parameters, and segment groups of crystallization process parameter variation points, as well as crystallization effect parameters.
[0013] S50. Using a long short-term memory network as the basic network structure, a multi-branch neural network model is established. The model is trained using the training dataset to obtain the parameter optimization model for the PAT intermittent crystallization process.
[0014] S60. Obtain the visible parameters of the crystallization process of each PAT instrument in the online PAT intermittent crystallization process of the current production process, calculate the invisible parameters of the crystallization process, and segment the parameters according to the method in S30.
[0015] S70. Input the segmented parameters of the current production process into the PAT batch crystallization process parameter optimization model obtained in S50 to obtain the optimized crystallization process control parameters, including the optimal temperature curve, optimal stirring rate, optimal feed rate and optimal cooling rate.
[0016] S80. The optimized crystallization process control parameters are output to the controller for real-time adjustment of the crystallization equipment's operating parameters, including adjusting the temperature and feed rate of the feed tank, and adjusting the temperature, heating / cooling rate, and stirring rate of the crystallizer, to achieve fully automatic online PAT intermittent crystallization control.
[0017] Specifically, step S10 includes: collecting visible crystallization process parameters and crystallization effect parameters of each PAT instrument in the online PAT intermittent crystallization process from the company's past production records or specially designed experiments. The visible crystallization process parameters include temperature, particle size, morphology, turbidity, concentration, stirring rate, feed rate, and cooling rate; the crystallization effect parameters include crystal yield, crystal purity, crystal particle size distribution, crystal morphology uniformity, and crystallization time. By acquiring this historical data, a complete data foundation is provided for subsequent model training and optimization.
[0018] Specifically, step S20 includes: using the visible parameters of the crystallization process, and through saturation calculation equations, supersaturation calculation equations, crystallization kinetic equations, and secondary nucleation rate equations, calculating the invisible parameters of the crystallization process, including saturation, supersaturation, crystallization kinetic parameters, and secondary nucleation rate. These invisible parameters describe the key characteristics 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 variation points. Segmentation by time involves dividing the entire crystallization process into several equally spaced time periods; segmentation by crystallization stage involves dividing the crystallization process into a dissolution stage, a cooling stage, a nucleation stage, a crystal growth stage, and a crystal ripening stage; segmentation by parameter variation points involves segmenting based on significant changes such as temperature inflection points, turbidity abrupt change points, concentration abrupt change points, particle size abrupt change points, supersaturation peak points, crystallization rate peak points, and secondary nucleation rate peak points. This multi-dimensional parameter segmentation helps to more comprehensively characterize the dynamic characteristics of the PAT intermittent crystallization process.
[0020] Specifically, step S40 includes the following steps: constructing a comprehensive training dataset based on the time-segmented groups of crystallization process parameters, the stage-segmented groups of crystallization process parameters, the change-point groups of crystallization process parameters, and the corresponding crystallization effect parameters obtained in the preceding steps. This training dataset includes time-segmented data reflecting the changes in crystallization process parameters over time, stage-segmented data reflecting the characteristics of parameters at different crystallization stages, change-point grouped data reflecting the changes in key parameters, and crystallization effect parameter data related to the final crystallization quality and efficiency. This comprehensive training data provides a solid foundation for the subsequent establishment of a PAT intermittent crystallization process parameter optimization model.
[0021] The specific steps of step S50 include: using a Long Short-Term Memory (LSTM) network as the basic network structure to construct a multi-branch neural network model, including a time-segmented branch network, a stage-segmented branch network, a change-point segmented branch network, an invisible parameter prediction branch network, and a fusion network. Specifically, the time-segmented branch network uses a bidirectional LSTM structure to capture the contextual information of the time series data; the stage-segmented branch network uses a convolutional neural network structure to extract the spatial features of each crystallization stage; the change-point segmented branch network uses an attention-enhanced LSTM structure to adaptively focus on key points of parameter changes; the invisible parameter prediction branch network uses an improved deep residual network structure to more accurately predict invisible parameters of the crystallization process; and the fusion network uses a combination of a multilayer perceptron and an attention mechanism to adaptively fuse the features of each branch network.
[0022] The specific steps of steps S60 and S70 include: First, acquiring online visible parameter data of the current PAT batch crystallization process, including temperature, particle size, morphology, turbidity, concentration, stirring rate, feed rate, and cooling rate, and then using the aforementioned parameter calculation equations to deduce the corresponding invisible parameters, including saturation, supersaturation, crystallization kinetic parameters, and secondary nucleation rate. Then, inputting these segmented parameters of the current production process into the aforementioned trained multi-branch neural network model, the model will output optimized crystallization process control parameters, including the optimal temperature curve, optimal stirring rate, optimal feed rate, and optimal cooling rate. Finally, feeding these optimized parameters back to the crystallization equipment for real-time adjustment, thereby achieving fully automatic online control of the PAT batch crystallization process.
[0023] Furthermore, this includes continuous monitoring of the crystallization process, adding newly acquired data to the training dataset, and periodically updating the PAT intermittent crystallization process parameter optimization model to achieve continuous optimization and adaptive adjustment of the model. This ensures that the model remains highly consistent with the latest production process and improves its prediction and optimization capabilities by continuously learning from new data, ultimately achieving continuous optimization of fully automated online PAT intermittent crystallization control.
[0024] Based on the above technical solution, the fully automatic online PAT intermittent crystallization control method of the present invention can be further improved as follows:
[0025] The multi-branch neural network model includes a time-segmented branch network, a stage-segmented branch network, a change-point segmented branch network, an invisible parameter prediction branch network, and a fusion network.
[0026] Furthermore, the time-segmented branch network is used to process time series data. The input is a time segment group of crystallization process parameters, and the output is a time series feature vector. The structure is a bidirectional LSTM network.
[0027] The stage segmentation branch network is used to process data from different crystallization stages. The input is a crystallization process parameter stage segmentation group, and the output is a stage feature vector. The structure is a convolutional neural network.
[0028] The variable point segmented branch network is used to process parameter variable point data. The input is a segmented group of parameters variable points in the crystallization process, and the output is a variable point feature vector. The structure is an LSTM network with enhanced attention mechanism.
[0029] The invisible parameter prediction branch network is used to predict invisible parameters of the crystallization process. The input is the visible parameters of the crystallization process, and the output is the predicted invisible parameters of the crystallization process. 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 parameters. The structure is a combination of multilayer perceptron and attention mechanism.
[0031] The specific structure of the improved deep residual network is as follows:
[0032] 1. Input Layer: Receives 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 one input neuron, for a total of 8 input neurons;
[0033] 2. Feature Extraction Layer: Composed 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 padding of 1; the first convolutional layer has 16 output channels, and the second convolutional layer has 32 output channels; each convolutional layer is followed by batch normalization and a LeakyReLU activation function (with a negative slope of 0.01); the residual connections directly add the input to the output of the second convolutional layer;
[0034] 3. Global Average Pooling Layer: Performs global average pooling on the output of the feature extraction layer, compressing 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 Layers: This layer consists of three 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; and 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 (with a negative slope of 0.01).
[0036] 5. Output Layer: The last fully connected layer maps features to a space of four invisible parameters. The input dimension is 16, and the output dimension is 4, corresponding to four predicted invisible parameters of the crystallization process: saturation, supersaturation, crystallization kinetics parameters, and secondary nucleation rate.
[0037] The advantages of this network structure are:
[0038] The number of residual blocks (5) corresponds to the 5 main stages of the PAT intermittent crystallization process, enabling the network to better capture the characteristics of each stage. Residual connections help solve the gradient vanishing problem in deep networks, making the network easier to train, especially when dealing with long-term crystallization process data;
[0039] The LeakyReLU activation function (with a negative slope of 0.01) can alleviate the "neuron death" problem that ReLU may cause, while maintaining nonlinearity, which is beneficial for capturing nonlinear relationships in the crystallization process.
[0040] Batch normalization layers help accelerate network convergence and improve the model's generalization ability, which is especially important for adapting to the intermittent crystallization process of PAT in different batches.
[0041] Global average pooling layers can reduce the number of parameters, lower the risk of overfitting, and at the same time preserve 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 to better learn the characteristics and interrelationships of these stages;
[0043] The four neurons in the output layer directly correspond to four invisible parameters that need to be predicted, making the network output closely linked to the key parameters of the crystallization process.
[0044] With this improved deep residual network structure, the invisible parameter prediction branch network can more accurately capture the characteristics of the PAT intermittent crystallization process and predict key invisible parameters, providing important input for the parameter optimization model of the entire PAT intermittent crystallization process.
[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 particle size distribution, crystal morphology uniformity, and crystallization time.
[0046] Furthermore, the 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 means dividing the entire crystallization process into several time periods at equal intervals; segmenting by parameter variation points specifically means segmenting based on significant change points of crystallization process parameters, including temperature inflection point, turbidity abrupt change point, concentration abrupt change point, particle size abrupt change point, supersaturation peak point, crystallization rate peak point, and secondary nucleation rate peak point.
[0048] Furthermore, the step of calculating the invisible parameters of the crystallization process using the collected visible parameters of the crystallization process employs a set of parameter calculation equations, specifically including the saturation calculation equation, the supersaturation calculation equation, the crystallization kinetics equation, and the secondary nucleation rate equation.
[0049] 1. The equation for calculating saturation is expressed as follows:
[0050]
[0051] In the formula, S is the saturation degree (dimensionless); ΔH f R is the enthalpy of solute dissolution (J / mol); R is the gas constant, with a value of 8.314 J / (mol·K); T is the current solution temperature (K); T m t is the melting point temperature (K) of the solute.
[0052] The parameter acquisition method is as follows:
[0053] T is obtained directly by a temperature sensor. m These are physical properties of the solute, obtained through literature review or experimental determination. ΔH f The results were obtained through differential scanning calorimetry (DSC), and the specific steps are as follows:
[0054] Step 1: Prepare the sample and reference material;
[0055] Step 2: Set the temperature program of the DSC instrument, usually 1-10K / min;
[0056] Step 3: Record the change in the heat flux difference between the sample and the reference material as a function of temperature;
[0057] Step 4: Calculate the area of the melting peak by integration to obtain ΔH. f value.
[0058] 2. The specific equation for calculating supersaturation is as follows:
[0059]
[0060] In the formula, σ is the supersaturation (dimensionless); C is the current solution concentration (g / L); C * The saturation concentration is (g / L).
[0061] The parameter acquisition method is as follows:
[0062] C is obtained by direct measurement using an online concentration measuring instrument (such as an infrared spectrometer). * The following equation is used for calculation:
[0063]
[0064] In the formula, A is the pre-exponential factor (g / L); E a is the activation energy of dissolution (J / mol); R is the gas constant, with a value of 8.314 J / (mol·K); T is the current solution temperature (K).
[0065] A and E a The following steps were taken to obtain the data by fitting experimental data:
[0066] Step 1: Measure the saturation concentration of the solution at different temperatures;
[0067] Step 2: Plot lnC * Image of 1 / T;
[0068] Step 3: Obtain the slope -E through linear regression. a / R and intercept lnA, thus calculating A and E a value.
[0069] 3. The crystallization kinetic equation is expressed as follows:
[0070]
[0071] In the formula, 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 index (dimensionless); E g σ is the activation energy for growth (J / mol); R is the gas constant, with a value of 8.314 J / (mol·K); T is the current solution temperature (K); σ c The critical supersaturation (dimensionless).
[0072] The parameter acquisition method is as follows:
[0073] k g g, E g and σ c The following steps were taken to obtain the data by fitting experimental data:
[0074] Step 1: Measure the crystal growth rate at different temperatures and supersaturation levels;
[0075] Step 2: Fit the experimental data using the nonlinear least squares method to obtain k. g g, E g and σ c The value of .
[0076] 4. The quadratic nucleation rate equation is expressed as follows:
[0077]
[0078] In the formula, B is the secondary nucleation rate (number of nuclei per (m²)). 3 ·s));k b Nucleation rate coefficient (numbers / (m)) 3 ·s));M T The mass concentration of suspended crystals (kg / m³) 3); j is the mass concentration index of suspended crystals (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, with a value of 8.314 J / (mol·K); T is the current solution temperature (K); and ω is the stirring rate (rad / s).
[0079] The parameter acquisition method is as follows:
[0080] M T Calculated using an online particle size analyzer and concentration meter:
[0081] M T =CC * ;
[0082] ω is obtained by directly measuring the rotational speed of the stirrer.
[0083] k b j, b and E b The following steps were taken to obtain the data by fitting experimental data:
[0084] Step 1: Measure the secondary nucleation rate under different temperatures, supersaturation, suspended crystal mass concentrations, and stirring rates;
[0085] Step 2: Take the logarithm of both sides of the equation, and we get:
[0086]
[0087] Step 3: Fit the experimental data using multiple linear regression to obtain the lnk value. b j, b and E b The value of .
[0088] These equations allow us to calculate invisible parameters (saturation, supersaturation, crystallization kinetics parameters, secondary nucleation rate) of the crystallization process using visible parameters (temperature, concentration, stirring rate, etc.). These equations consider the influence of factors such as temperature, concentration, and stirring rate on the crystallization process, and can accurately describe the changes in key parameters during the PAT batch crystallization process.
[0089] The specific steps for segmenting the process based on significant changes in crystallization parameters are as follows:
[0090] Time series analysis was performed on 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, mark it as a significant change point.
[0093] A comprehensive analysis of significant changes in multiple parameters is conducted to remove redundant points;
[0094] Based on the significant changes that are retained, the crystallization process is divided into multiple time periods.
[0095] Furthermore, the process also includes the following steps: continuously monitoring the crystallization process and adding newly acquired data to the training dataset, and periodically 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 storing program instructions that, when executed in a computer, perform the above-described fully automatic online PAT intermittent crystallization control method.
[0097] A third aspect of the present invention provides a fully automated online PAT intermittent crystallization control system, wherein the above-described computer-readable storage medium is included.
[0098] Compared with existing technologies, the beneficial effects of the fully automated online PAT intermittent crystallization control method, medium, and system provided by this invention are:
[0099] 1. Make full use of historical process data
[0100] This method fully utilizes historical PAT intermittent crystallization process data from within the enterprise, including measurable crystallization process parameters and corresponding crystallization effect parameters. In-depth analysis of this data enables the establishment of a comprehensive training dataset, laying a solid foundation for subsequent model optimization.
[0101] 2. Accurately predict key invisible parameters
[0102] This method not only utilizes measurable crystallization process parameters, but also calculates key invisible parameters that are difficult to measure directly, such as saturation, supersaturation, crystallization kinetic parameters, and secondary nucleation rate, through relevant computational equations. These invisible parameters are crucial for understanding and controlling the crystallization process, but traditional empirical models struggle to predict them accurately.
[0103] 3. Construct a multi-branch neural network model
[0104] This method employs an innovative multi-branch neural network model that fully exploits the time-series, stage-specific, and parameter variation characteristics of the PAT intermittent crystallization process data. Combined with the prediction of invisible parameters, it outputs optimized crystallization process control parameters. This model structure more closely reflects the complex dynamic characteristics of actual processes.
[0105] 4. Achieve fully automatic online control
[0106] This method feeds back optimized crystallization process control parameters, such as temperature profile, stirring rate, feed rate, and cooling rate, to the crystallization equipment in real time for adjustment. By continuously monitoring and updating the optimization model, fully automated online control of the PAT batch crystallization process can be achieved, continuously improving crystallization efficiency and product quality.
[0107] Compared with existing technologies, the fully automated online PAT intermittent crystallization control method of this invention can more comprehensively utilize historical process data, more accurately predict key invisible parameters, and construct an optimization model that is closer to reality, thereby achieving automated and intelligent crystallization process control. It solves the technical problem of existing PAT intermittent crystallization control methods being unable to achieve precise online control. Attached Figure Description
[0108] Figure 1 A flowchart of the method provided by the present invention;
[0109] Figure 2 This is a schematic diagram of the online PAT crystallization apparatus used in Example 2;
[0110] In the diagram, 1. Feed tank; 2. Peristaltic pump; 3. Temperature control; 4. Crystallizer; 5. PAT equipment probe; 6. Product tank; 7. Agitator. Detailed Implementation
[0111] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0112] like Figure 1 The diagram shown is a flowchart of a fully automated online PAT intermittent crystallization control method provided by the first aspect of the present invention. This method includes the following steps:
[0113] S10. Acquire historical data, specifically by collecting the visible parameters of the crystallization process and the crystallization effect parameters of each PAT instrument during the online PAT intermittent crystallization process.
[0114] S20. Using the collected visible parameters of the crystallization process, calculate the invisible parameters of the crystallization process, and combine the visible and invisible parameters of the crystallization process into the crystallization process parameters.
[0115] S30. Based on the characteristics of the crystallization process, the crystallization process parameters are segmented according to time, crystallization stage, and parameter variation point to obtain the crystallization process parameter time segmentation group, the crystallization process parameter stage segmentation group, and the crystallization process parameter variation point segmentation group.
[0116] S40. Establish a training dataset, including time segment groups of crystallization process parameters, stage segment groups of crystallization process parameters, and segment groups of crystallization process parameter variation points, as well as crystallization effect parameters.
[0117] S50. Using a long short-term memory network as the basic network structure, a multi-branch neural network model is established and trained using a training dataset to obtain an optimized model for the parameters of the PAT intermittent crystallization process.
[0118] S60. Obtain the visible parameters of the crystallization process of each PAT instrument in the online PAT intermittent crystallization process of the current production process, calculate the invisible parameters of the crystallization process, and segment the parameters according to the method in S30.
[0119] S70. Input the segmented parameters of the current production process into the PAT batch crystallization process parameter optimization model obtained in S50 to obtain the optimized crystallization process control parameters, including the optimal temperature curve, optimal stirring rate, optimal feed rate and optimal cooling rate.
[0120] S80. The optimized crystallization process control parameters are output to the controller for real-time adjustment of the crystallization equipment's operating parameters, including adjusting the temperature and feed rate of the feed tank, and adjusting the temperature, heating / cooling rate, and stirring rate of the crystallizer, to achieve fully automatic online PAT intermittent crystallization control.
[0121] The specific implementation methods of the above steps are described in detail below:
[0122] Step S10: First, this method requires acquiring historical PAT intermittent crystallization process data, including the visible parameters of each PAT instrument during the crystallization process and the corresponding crystallization effect parameters. Visible parameters include temperature, particle size, morphology, turbidity, concentration, stirring rate, feed rate, and cooling rate. Crystallization effect parameters include crystal yield, crystal purity, crystal particle size distribution, crystal morphology uniformity, and crystallization time. This historical data can come from the company's past production records or be obtained through specially designed experiments. Regardless of the data source, this method requires obtaining complete visible parameters of the crystallization process and the corresponding crystallization effect parameters to provide a foundation for subsequent model training and optimization.
[0123] Step S20: In addition to the directly measurable visible parameters, the crystallization process also involves some invisible key parameters, such as saturation, supersaturation, crystallization kinetic parameters, and secondary nucleation rate. These invisible parameters are usually not directly measurable, but can be estimated based on the visible parameters using relevant calculation equations.
[0124] First, saturation can be calculated using the following equation:
[0125]
[0126] In the formula, S is the saturation degree (dimensionless); ΔH f R is the enthalpy of solute dissolution (J / mol); R is the gas constant, with a value of 8.314 J / (mol·K); T is the current solution temperature (K); T m Let T be the melting point temperature (K) of the solute. T can be obtained directly by a temperature sensor. m This requires consulting literature or experimental measurement to obtain ΔH. f It can be determined by differential scanning calorimetry (DSC).
[0127] Secondly, supersaturation can be calculated using the following equation:
[0128]
[0129] In the formula, σ is the supersaturation (dimensionless); C is the current solution concentration (g / L); C * The saturation concentration is (g / L). C can be directly measured using an online concentration measuring instrument (such as an infrared spectrometer). * Then it needs to be calculated using the following equation:
[0130]
[0131] In the formula, A is the pre-exponential factor (g / L); E a A is the activation energy of dissolution (J / mol); R is the gas constant, with a value of 8.314 J / (mol·K); T is the current solution temperature (K). A and E a The saturation concentration can be obtained by measuring it at different temperatures and then performing a linear regression fit.
[0132] Furthermore, the crystallization kinetic parameters can be calculated using the following equations:
[0133]
[0134] In the formula, 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 index (dimensionless); E g σ is the activation energy for growth (J / mol); R is the gas constant, with a value of 8.314 J / (mol·K); T is the current solution temperature (K); σ c This represents the critical supersaturation degree (dimensionless). Where k... g g, E g and σ c It needs to be obtained by fitting experimental data.
[0135] Finally, the secondary nucleation rate can be calculated using the following equation:
[0136]
[0137] In the formula, B is the secondary nucleation rate (number of nuclei per (m²)). 3 ·s));k b Nucleation rate coefficient (numbers / (m)) 3 ·s));M T The mass concentration of suspended crystals (kg / m³) 3 ); j is the mass concentration index of suspended crystals (dimensionless); σ is the supersaturation (dimensionless); b is the supersaturation index (dimensionless); E b M is the nucleation activation energy (J / mol); R is the gas constant, with a value of 8.314 J / (mol·K); T is the current solution temperature (K); ω is the stirring rate (rad / s). T ω can be calculated using an online particle size analyzer and concentration meter, while k can be directly measured by the stirrer rotation speed. b j, b and E b This requires obtaining the results by fitting experimental data.
[0138] Using the above equations, the corresponding invisible parameters of the crystallization process (saturation, supersaturation, crystallization kinetics parameters, secondary nucleation rate, etc.) can be calculated from the visible parameters of the crystallization process (such as temperature, concentration, stirring rate, etc.). These invisible parameters describe the key characteristics of the PAT batch 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, this method divides the crystallization process parameters into segments according to time, crystallization stage and parameter variation points.
[0140] First, segment the process according to time. Specifically, divide the entire crystallization process into several equally spaced time periods. This reflects the changing pattern of the crystallization process over time.
[0141] Secondly, the crystallization process is segmented according to its stages. 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 each stage.
[0142] Finally, the process is segmented according to the points of parameter variation. The parameters during crystallization do not change uniformly and continuously, but rather exhibit significant changes at certain points, such as temperature inflection points, turbidity abrupt change points, concentration abrupt change points, particle size abrupt change points, supersaturation peak points, crystallization rate peak points, and secondary nucleation rate peak points. Dividing the parameters into different time periods corresponding to these significant changes allows for a better analysis of the key nodes in the crystallization process.
[0143] The specific segmentation method is as follows: First, time series analysis is performed on each crystallization process parameter, and the local mean and variance of the parameter are calculated using the sliding window method. Then, a certain threshold is set, and when the parameter change exceeds the threshold, it is marked as a significant change point. Finally, a comprehensive analysis is performed on the significant change points of multiple parameters, redundant change points are removed, and the final parameter segmentation points are determined accordingly, dividing the entire crystallization process into multiple time periods.
[0144] This multi-dimensional parameter segmentation method can more comprehensively characterize the dynamic features of the PAT intermittent crystallization process, providing richer data features for subsequent model training and optimization.
[0145] Step S40: Based on the time segmentation group, stage segmentation group, variation point segmentation group of crystallization process parameters, and corresponding crystallization effect parameters obtained in the preceding steps, this method constructs a comprehensive training dataset.
[0146] The training dataset consists of the following parts:
[0147] 1. Time-segmented group of crystallization process parameters: This part of the data reflects the variation of crystallization process parameters over time.
[0148] 2. Crystallization process parameter stage segmentation: This part of the data reflects the parameter characteristics of different crystallization stages.
[0149] 3. Segmentation of Crystallization Process Parameter Variation Points: This part of the data reflects the key variation points of crystallization process parameters.
[0150] 4. Crystallization effect parameters: This part of the data includes crystal yield, crystal purity, crystal grain 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 from different dimensions into a training dataset, comprehensive data support can be provided for the establishment of a parameter optimization model for the subsequent PAT intermittent crystallization process.
[0152] Step S50: This method employs a multi-branch neural network model to optimize the parameters of the PAT intermittent crystallization process. The basic network structure of this model is a Long Short-Term Memory (LSTM) network, with multiple branch networks added to capture features of different dimensions.
[0153] Specifically, this multi-branch neural network model includes the following components:
[0154] 1. Time-segmented branching network
[0155] This branch network is used to process time-series data of crystallization process parameters. It employs a bidirectional LSTM (Bi-LSTM) network structure, which can effectively capture contextual information in time-series data. The input is a time segment group of crystallization process parameters, and the output is a time-series feature vector.
[0156] 2. Stage-based segmented branching network
[0157] This branch network is used to process data from different crystallization stages. It employs a convolutional neural network (CNN) structure, enabling it to extract spatial features for each crystallization stage. The input is a segmentation of crystallization process parameters into stages, and the output is a stage feature vector.
[0158] 3. Segmented branching network with variable points
[0159] This branch network is used to process data on the variation points of crystallization process parameters. It employs an attention-enhanced LSTM network structure, which can adaptively focus on key points of parameter variation. The input is a segmented group of crystallization process parameter variation points, and the output is a feature vector of the variation points.
[0160] 4. Invisible parameter prediction branch network
[0161] This branch network is used to predict invisible parameters of the crystallization process, such as saturation, supersaturation, crystallization kinetics parameters, and secondary nucleation rate. It employs 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, and the output is the predicted invisible parameters of the crystallization process.
[0162] 5. Converged Networks
[0163] This 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 multilayer perceptron (MLP) and attention mechanism, which can adaptively fuse the features of each branch network.
[0164] This multi-branch neural network design allows for the full exploitation of the time-series characteristics, stage characteristics, variation point characteristics, and complex relationships between visible and invisible parameters in the PAT intermittent crystallization process data, resulting in a more accurate and comprehensive optimization model for crystallization process parameters. The key algorithm design and network structure are as follows:
[0165] The time segmentation branch network uses a bidirectional LSTM structure, which can capture contextual information in time series data.
[0166] The segmented branch network adopts a CNN structure, which can extract the spatial features of each crystallization stage.
[0167] The variable point segmented branch network employs an attention-enhanced LSTM structure, which can adaptively focus on key points where parameters change.
[0168] The invisible parameter prediction branch network employs an improved deep residual network structure, which can more accurately capture the relationship between visible and invisible parameters. The deep residual network consists of five residual blocks, each corresponding to a major stage of the crystallization process, and uses the LeakyReLU activation function and batch normalization layers to improve network performance. The number of fully connected layers (three) corresponds to the three key stages of the crystallization process.
[0169] The fusion network adopts a combination structure of MLP and attention mechanism, which can adaptively fuse the features of each branch network.
[0170] By designing 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 realizing fully automatic online control.
[0171] Step S60: In actual production, this method first requires acquiring 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, and cooling rate. These parameters can be directly measured using appropriate online detection instruments. For example, temperature can be measured using a temperature sensor, concentration can be measured using an online infrared spectrometer, and stirring rate can be directly obtained from the stirrer's rotation speed.
[0172] After obtaining these visible parameter data, it is necessary to use the aforementioned parameter calculation equations 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. The formula for calculating saturation is:
[0174]
[0175] Where T is the current solution temperature, T m ΔH is the melting point temperature of the solute. f T is the enthalpy of solubility of the solute. T can be obtained directly through measurement. m ΔH needs to be determined by consulting literature or experimental measurements. f It can be determined by DSC experiment.
[0176] 2. The formula for calculating supersaturation is:
[0177]
[0178] Where C is the current solution concentration, C * This represents the saturation concentration. C can be obtained by measuring with an online infrared spectrometer. * Then it is necessary to refer to 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 following formula:
[0180]
[0181] Where, k g g, E g and σ c It needs to be obtained through fitting experimental data.
[0182] 4. The secondary nucleation rate is calculated using the following formula:
[0183]
[0184] Among them, M T ω can be calculated using an online particle size analyzer and concentration meter, while k can be directly measured by the stirrer rotation speed. b j, b and E b It needs to be obtained through fitting experimental data.
[0185] These calculation formulas allow us to deduce key, invisible parameters of the crystallization process using the online measurable parameters of the current production process. These invisible parameters are crucial for controlling the crystallization process and provide necessary input for subsequent parameter optimization.
[0186] Step S70: After obtaining the segmentation parameters of the current production process (time segmentation, stage segmentation, change point segmentation) and the calculated invisible parameters, this method inputs these data into the aforementioned trained multi-branch neural network model.
[0187] This multi-branch neural network model includes the following key branch networks:
[0188] 1. Time-segmented branch network: It adopts a bidirectional LSTM structure and can capture contextual information in time series data.
[0189] 2. Stage-based segmented branch network: Adopting a CNN structure, it can extract the spatial features of each crystallization stage.
[0190] 3. Segmented Branch Network with Variable Points: An LSTM structure enhanced with an attention mechanism is used to adaptively focus on key points where parameters change.
[0191] 4. Invisible Parameter Prediction Branch Network: An improved deep residual network structure is adopted to more accurately predict the invisible parameters of the crystallization process.
[0192] 5. Fusion Network: It adopts a combination structure of MLP and attention mechanism, which can adaptively fuse the features of each branch network.
[0193] By inputting the segmented parameters of the current production process into this multi-branch neural network model, the model will output optimized crystallization process control parameters. These optimized parameters include the optimal temperature profile, 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 temporal and stage features of the crystallization process; the variable point segmented branch network can capture key parameter variation points; the invisible parameter prediction branch network can predict key invisible parameters of the crystallization process; and finally, the fusion network comprehensively utilizes these features to output 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, as well as the temperature, heating / cooling rate, and stirring rate of the crystallizer, thereby achieving fully automated online control of the PAT batch crystallization process. By continuously optimizing these key parameters, the yield, purity, particle size distribution, and morphological uniformity of the crystallization process can be continuously improved, achieving the best crystallization effect.
[0196] The entire optimization process is a closed-loop feedback system. In actual production, it is also necessary to continuously monitor the crystallization process and add newly acquired data to the training dataset, regularly updating the optimization model to achieve adaptive adjustment and continuous optimization. This ensures that the model always remains highly consistent with the latest production process and can improve its prediction and optimization capabilities by continuously learning from new data.
[0197] Through the above steps, the fully automated online PAT intermittent crystallization control method of the present invention can fully utilize historical data of the crystallization process to establish a multi-branch neural network model, accurately predict 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 automated online PAT intermittent crystallization process control and continuously improving crystallization efficiency and product quality.
[0198] Step S80: The optimized crystallization process control parameters are output to the controller for real-time adjustment of the crystallization equipment's operating parameters, including adjusting the temperature and feed rate of the feed tank, and adjusting the temperature, heating / cooling rate, and stirring rate of the crystallizer, to achieve fully automated online PAT intermittent crystallization control. The controller can directly operate the corresponding equipment, or use software such as the SIMATIC SIPAT data integration platform for control, or a control system can be used. The specific implementation of the control system is described below:
[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 control parameters output by the optimization model and generate specific control commands based on these parameters.
[0202] b) Data acquisition system: collects measurement data from various PAT instruments in real time, including temperature, particle size, morphology, turbidity, concentration, etc.
[0203] c) Actuators: including feed pumps, agitators, heating / cooling systems, etc., used to execute control commands.
[0204] d) Human-machine interface: used by operators to monitor and intervene in the process.
[0205] e) Communication network: Ensures data transmission and command issuance between different parts.
[0206] 2. Temperature control of the feed tank
[0207] Controlling the temperature of the feed tank is crucial based on the optimal temperature curve provided by the optimization model. 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) A PID (Proportional-Integral-Derivative) control algorithm is used to calculate the heating or cooling power 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, and K p K i K d These are proportional, integral, and differential gains, respectively.
[0212] c) Adjust the power of the heater or cooler according to the output of the PID controller to achieve precise temperature control.
[0213] d) Monitor temperature changes in real time and dynamically adjust PID parameters through an adaptive algorithm 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 precisely controlling the speed of the feed pump. The specific steps are as follows:
[0216] a) Convert the optimal feed rate curve into the feed pump speed curve.
[0217] b) A frequency converter is used to control the speed of the feed pump motor to achieve a continuously adjustable feed rate.
[0218] c) A closed-loop control system is used to provide real-time feedback of the actual feed rate through a 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, the characteristic curve of the feed pump needs to be adjusted in real time to ensure the accuracy of the feed rate.
[0220] 4. Temperature control of the crystallization kettle
[0221] Temperature control in the crystallization vessel is one of the most critical parts of the entire process, requiring precise adherence to the optimal temperature curve provided 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) Design a specific temperature control strategy for each stage:
[0224] Dissolution stage: Rapidly heat up and maintain a constant temperature;
[0225] Cooling phase: Cool down at the optimal cooling rate;
[0226] Nucleation stage: Precise temperature control to avoid overcooling;
[0227] Crystal growth stage: slow cooling while maintaining appropriate supersaturation;
[0228] Curing stage: Maintain a constant temperature or slowly increase the temperature;
[0229] c) A PID control system is used, with the outer loop controlling the temperature of the crystallizer and the inner loop controlling the temperature of the jacket coolant. 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, model predictive control (MPC) algorithm can be used to predict future temperature changes in conjunction with the process model and make control adjustments in advance.
[0231] e) Monitor the temperature distribution inside the crystallizer in real time, using multiple temperature sensors to ensure temperature uniformity. If uneven temperature is detected, adjust the stirring rate or change the heating / cooling method.
[0232] 5. Heating and cooling rate control
[0233] Achieving the optimal cooling rate requires precise control of the heating and cooling rates of the crystallizer. The specific implementation method is as follows:
[0234] a) Calculate the target heating and cooling rates for each time period based on the optimal temperature curve.
[0235] b) Use predictive control algorithms to predict temperature changes over a future period of time based on the current temperature and the target rate.
[0236] c) Dynamically adjust the heating or cooling power to ensure the actual heating / cooling rate matches 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 rates, r actual K1 and K2 are the actual heating and cooling rates, and K1 and K2 are the control parameters.
[0239] d) Considering the thermal inertia of the system, adjust the control action in advance at the point of rate change to avoid overshoot or lag.
[0240] e) Monitor the temperature gradient inside the crystallization vessel in real time to ensure uniform temperature change throughout the crystallization system.
[0241] 6. Stirring rate control
[0242] The stirring rate directly affects heat transfer, mass transfer, and the suspension state of the crystals during the crystallization process. Based on 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 mixer motor to achieve a continuously adjustable mixing rate.
[0245] c) A closed-loop control system is adopted, which uses a speed sensor to provide real-time feedback of the actual stirring rate and dynamically adjusts it after comparing it with the set value.
[0246] d) Considering the changes in viscosity and density of the suspension during crystallization, 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] Where, P actual P represents the actual stirring power. set To set the stirring power, Δμ and Δρ represent the changes in viscosity and density, respectively, K |μ and K |ρ This is the compensation coefficient.
[0249] e) Different stirring modes may be required at different crystallization stages. For example, a higher stirring rate may be needed during the nucleation stage to promote uniform nucleation, while a lower stirring rate is needed during 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 coordinated control
[0251] In practice, the control of the above parameters is not independent, but requires coordinated control to achieve the best results. The specific implementation method is as follows:
[0252] a) Establish a multivariable control model, considering the interactions between various control parameters. For example, changes in the stirring rate can affect heat transfer, which in turn affects temperature control.
[0253] (b) Employ a fuzzy control strategy to dynamically adjust control priorities based on the current crystallization stage and the state of each parameter. For example, during the nucleation stage, more emphasis may be placed on the precise control of temperature and supersaturation, while during 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 so that when a certain parameter changes, other related parameters are automatically adjusted to maintain the overall optimal state.
[0256] 8. Handling Abnormal Situations
[0257] In actual production, various abnormal situations may be encountered, requiring the establishment of a sound abnormality handling mechanism:
[0258] a) Set a safety threshold for parameter changes. When a parameter exceeds the preset range, an alarm will be triggered and corresponding emergency measures will be taken.
[0259] b) Establish a fault diagnosis system that can quickly identify equipment faults or process abnormalities and provide handling suggestions.
[0260] c) Design a safe rollback strategy so that when optimal control cannot be maintained, it can smoothly transition to a suboptimal or safe operating state.
[0261] d) Retain the manual intervention interface, allowing operators to take over the system and perform manual control when necessary.
[0262] 9. Data Recording and Analysis
[0263] To continuously improve control effectiveness, detailed data recording and analysis of the entire control process are necessary.
[0264] a) Records the set and actual values of all control parameters in real time, as well as various process parameters measured by the PAT instrument.
[0265] b) Calculate control performance indicators, such as setpoint tracking error, control stability, and energy consumption.
[0266] c) Conduct data mining and analysis regularly to identify deficiencies in the control strategy.
[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 storing program instructions that, when executed in a computer, perform the above-described fully automatic online PAT intermittent crystallization control method.
[0269] A third aspect of the present invention provides a fully automated online PAT intermittent crystallization control system, wherein the above-described computer-readable storage medium is included.
[0270] Specifically, the principle of this invention is:
[0271] First, this method fully utilizes the company's past PAT intermittent crystallization process data, including measurable parameters of each PAT instrument during the crystallization process, such as temperature, particle size, morphology, turbidity, concentration, stirring rate, feed rate, and cooling rate, as well as corresponding crystallization effect parameters, such as crystal yield, crystal purity, crystal particle size distribution, crystal morphology uniformity, and crystallization time. This historical data lays the foundation for establishing a comprehensive training dataset.
[0272] Secondly, this method utilizes a series of physicochemical equations, such as saturation calculation equations, supersaturation calculation equations, crystallization kinetic equations, and secondary nucleation rate equations, to transform measurable crystallization process parameters into key invisible parameters that are difficult to measure directly, including saturation, supersaturation, crystallization kinetic parameters, and secondary nucleation rate. These invisible parameters are crucial for understanding and controlling the PAT intermittent crystallization process, but traditional empirical models struggle to predict them accurately.
[0273] Then, this method segments the crystallization process parameters in multiple dimensions, including time, crystallization stage, and parameter variation points, to fully characterize the complex dynamic characteristics of the PAT batch crystallization process. Time segmentation reflects the parameter variation over time, stage segmentation corresponds to the key steps in crystallization, and parameter variation point segmentation captures the key inflection points of the process parameters. This multi-dimensional data feature provides rich input for subsequent model training and optimization.
[0274] Next, this method employs an innovative multi-branch neural network model for training. The basic network structure of this model is a Long Short-Term Memory (LSTM) network, with the addition of multiple branches such as a time segmentation branch network, a stage segmentation branch network, a change point segmentation branch network, an invisible parameter prediction branch network, and a fusion network.
[0275] The time segmentation branch network adopts a bidirectional LSTM structure, which can capture contextual information in time series data; the stage segmentation branch network adopts a CNN structure, which can extract spatial features of each crystallization stage; the change point segmentation branch network adopts an LSTM structure enhanced with an attention mechanism, which can adaptively focus on key points of parameter changes; the invisible parameter prediction branch network adopts an improved deep residual network structure, which can more accurately predict the invisible parameters of the crystallization process; and the fusion network adopts a combination of MLP and attention mechanism, which can adaptively fuse the features of each branch network.
[0276] This multi-branch neural network model design can fully exploit the temporal characteristics, stage characteristics, parameter variation characteristics, and complex relationships between visible and invisible parameters in the PAT intermittent crystallization process data, thereby obtaining a more accurate and comprehensive crystallization process parameter optimization model. Compared with existing mechanistic models, statistical models, and adaptive control methods, this method can better capture the complex dynamic characteristics of actual processes, providing strong support for fully automated online control.
[0277] In actual production, this method acquires the online measurable parameters of the current PAT batch crystallization process in real time and uses the aforementioned calculation equations to deduce key invisible parameters. These segmented parameters of the current production process are then input into a trained multi-branch neural network model, which outputs optimized crystallization process control parameters, such as temperature profiles, stirring rate, feed rate, and cooling rate. Finally, these optimized parameters are fed back to the crystallization equipment in real time for adjustment, thereby achieving fully automated online control of the PAT batch crystallization process.
[0278] By continuously monitoring the crystallization process and updating and optimizing the model, this method can achieve adaptive adjustment and continuous optimization of parameters, thereby further improving the efficiency of the crystallization process and product quality.
[0279] To better understand and implement this invention, a specific embodiment 1 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. This data includes the visible parameters of each PAT instrument during the crystallization process and the corresponding crystallization effect parameters. The visible parameters can be directly obtained through online measuring instruments, including temperature T, particle size d, morphology M, turbidity τ, concentration C, stirring rate ω, and feed rate v. in and cooling rate v cool The crystallization parameters need to be determined experimentally, including crystal yield Y, crystal purity P, crystal grain size distribution Ψ(d), crystal morphology uniformity Ω, and crystallization time t. crs Obtaining this 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. These invisible parameters include saturation S, supersaturation σ, crystallization kinetics parameter G, and secondary nucleation rate B, etc.
[0281] First, the saturation S can be calculated using the following equation:
[0282]
[0283] Where, ΔH fLet be the enthalpy of solubility of the solute (J / mol), R be the gas constant (8.314 J / (mol·K)), and T be the enthalpy of solubility of the solute (J / mol). m T is the melting point temperature (K) of the solute. T can be directly measured using a temperature sensor, while T... m Literature review or experimental determination is required. ΔH f The ΔH can be determined by differential scanning calorimetry (DSC). The specific steps are as follows: prepare the sample and reference material, set the temperature program of the DSC instrument (usually 1-10 K / min), record the change of the heat flux 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 using the following equation:
[0285]
[0286] Where C is the current solution concentration (g / L), C * C represents the saturation concentration (g / L). C can be obtained directly by online concentration measuring instruments (such as infrared spectrometers). * Then it needs to be calculated using the following equation:
[0287]
[0288] Where A is the pre-exponential factor (g / L), E a The activation energy for dissolution is (J / mol). A and E a The saturation concentration of the solution can be obtained by measuring the saturation concentration at different temperatures and then performing linear regression fitting.
[0289] Furthermore, the crystallization kinetic parameters include the crystal growth rate G and the secondary nucleation rate B. The crystal growth rate G can be calculated using the following equation:
[0290]
[0291] Where, k g E is the growth rate coefficient (m / s), g is the growth index (dimensionless), and E is the growth rate coefficient (m / s). g The activation energy for growth (J / mol), σ c This represents the critical supersaturation (dimensionless). These parameters need to be obtained by fitting experimental data.
[0292] The secondary nucleation rate B can be calculated using the following equation:
[0293]
[0294] Where, k b M is the nucleation rate coefficient (nuclei / (m³·s)).T Let E be the mass concentration of suspended crystals (kg / m3), j be the mass concentration index of suspended crystals (dimensionless), b be the supersaturation index (dimensionless), and E be the mass concentration of suspended crystals. b ω is the nucleation activation energy (J / mol), and ω is the stirring rate (rad / s). T ω can be calculated using an online particle size analyzer and concentration meter, while k can be directly measured by the stirrer's rotational speed. b j, b and E b It needs to be obtained by fitting experimental data.
[0295] Using the above equations, the corresponding invisible parameters of the crystallization process (saturation, supersaturation, crystallization kinetics parameters, secondary nucleation rate, etc.) can be calculated from the visible parameters of the crystallization process (such as temperature, concentration, stirring rate, etc.). These invisible parameters describe the key characteristics of the PAT batch crystallization process and provide the necessary input for subsequent parameter optimization.
[0296] In step S30, the crystallization process parameters are segmented according to time, crystallization stage, and parameter variation point.
[0297] First, the process is segmented according to time. Specifically, the entire crystallization process is divided into N equally spaced time periods, each with a length of Δt = t. total / N, where t total This represents the total time of the entire crystallization process. This reflects the changing pattern of the crystallization process over time.
[0298] Secondly, the crystallization process can be segmented according to the crystallization stages. The crystallization process mainly includes the dissolution stage, cooling stage, nucleation stage, crystal growth stage, and crystal maturation stage. The crystallization process parameters can be segmented based on these key stages.
[0299] Finally, the process is segmented according to the points of parameter variation. The parameters during crystallization do not change uniformly and continuously, but rather exhibit significant changes at certain points, such as the temperature inflection point T. inflection Turbidity mutation point τ critical Concentration mutation point C critical Particle size mutation point d critical σ, the peak point of supersaturation peak Peak crystallization rate (G) peak And the peak point of secondary nucleation rate (B) peak These parameter variations can be identified using the following steps:
[0300] 1. Perform time series analysis on each crystallization process parameter;
[0301] 2. Calculate the local mean μ of the parameter using the sliding window method. local and variance
[0302] 3. Set an appropriate threshold δ; when the parameter change exceeds δσ local At that time, it was marked as a point of significant change;
[0303] 4. Perform a comprehensive analysis on the significant changes of multiple parameters, remove redundant changes, and obtain the final parameter segmentation points.
[0304] This multi-dimensional parameter segmentation method can more comprehensively characterize the dynamic features of the PAT intermittent crystallization process, providing rich data features for subsequent model training and optimization.
[0305] In step S40, a comprehensive training dataset needs to be established. This training dataset includes the following parts:
[0306] 1. Time segmentation group of crystallization process parameters in This represents the visible parameter vector for the i-th time period.
[0307] 2. Stage grouping of crystallization process parameters in This represents the visible parameter vector for the j-th crystallization stage.
[0308] 3. Segmentation of Parameter Variation Points in the Crystallization Process in The visible parameter vector represents the point where the k-th parameter changes.
[0309] 4. Crystallization effect parameters This includes crystal yield, crystal purity, crystal grain size distribution, crystal morphology uniformity, and crystallization time.
[0310] By integrating these parameter data from different dimensions into a training dataset, comprehensive data support can be provided for the establishment of a parameter optimization model for the subsequent PAT intermittent crystallization process.
[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 this model is a Long Short-Term Memory (LSTM) network, with multiple branch networks added to capture features of different dimensions.
[0312] Specifically, this multi-branch neural network model includes the following parts:
[0313] 1. Time-segmented branching network
[0314] This branch network is used to process time-series data of crystallization process parameters. It employs a bidirectional LSTM (Bi-LSTM) network structure, which effectively captures contextual information within the time-series data. The input is a time-segmented group of crystallization process parameters. The output is a time series feature vector.
[0315] 2. Stage-based segmented branching network
[0316] This branch network is used to process data from different crystallization stages. It employs a convolutional neural network (CNN) structure, enabling it to extract spatial features of each crystallization stage. The input is a segmentation of crystallization process parameters. The output is the stage feature vector.
[0317] 3. Segmented branching network with variable points
[0318] This branch network is used to process data on variations in crystallization process parameters. It employs an attention-enhanced LSTM network structure, enabling it to adaptively focus on key points of parameter variation. The input is a segmented group of crystallization process parameter variations. The output is the feature vector of the variable points.
[0319] 4. Invisible parameter prediction branch network
[0320] This branch network is used to predict invisible parameters of the crystallization process, including saturation S, supersaturation σ, and crystallization kinetic parameters G and B. It employs an improved deep residual network (ResNet) structure, enabling it to more accurately capture the relationship between visible and invisible parameters. The input consists of visible parameters of the crystallization process.
[0321] The output is the estimated invisible parameters of the crystallization process.
[0322] 5. Converged Networks
[0323] This network integrates the output feature vectors of each branch network and outputs the final optimized crystallization process control parameters. It employs a combined structure of a multilayer perceptron (MLP) and an attention mechanism, enabling adaptive fusion of features from each branch network. The input is... The output consists of optimized crystallization process control parameters, including the optimal temperature curve T. opt (t), optimal stirring rate ω opt Optimal feed rate v in,opt and optimal cooling rate v cool,opt wait.
[0324] This multi-branch neural network design can fully explore the time series characteristics, stage characteristics, variation point characteristics, and complex relationships between visible and invisible parameters in the 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 a Bi-LSTM structure, which can capture contextual information in time series data; the stage segmentation branch network adopts a CNN structure, which can extract spatial features of each crystallization stage; the change point segmentation branch network adopts an LSTM structure with enhanced attention mechanism, which can adaptively focus on key points of parameter changes; and the invisible parameter prediction branch network adopts an improved deep residual network structure, which can more accurately predict the invisible parameters of the crystallization process.
[0326] First, the improved deep residual network used in the invisible parameter prediction branch network has the following structure:
[0327] 1. Input layer: Receives 8 visible parameters for the crystallization process. Each parameter corresponds to one input neuron, for a total of 8 input neurons.
[0328] 2. Feature Extraction Layer: Composed of 5 residual blocks, each corresponding 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 padding of 1. The first convolutional layer has 16 output channels, and the second convolutional layer has 32 output channels. Each convolutional layer is followed by batch normalization and a LeakyReLU activation function (with a negative slope of 0.01). The residual connections directly add the input to the output of the second convolutional layer.
[0329] 3. Global Average Pooling Layer: This layer performs global average pooling on the output of the feature extraction layer, compressing the feature map of each channel into a single scalar value. The output dimension is 32, corresponding to the number of output channels in the last residual block of the feature extraction layer.
[0330] 4. Fully Connected Layers: This section contains three 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; and 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 (with a negative slope of 0.01).
[0331] 5. Output Layer: The last fully connected layer maps the features to a space of 4 invisible parameters. The input dimension is 16, and the output dimension is 4, corresponding to the 4 predicted 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 5 main stages of the PAT intermittent crystallization process, enabling the network to better capture the characteristics of each stage. Residual connections help solve the gradient vanishing problem in deep networks, making the network easier to train, especially when dealing with long-term crystallization process data.
[0334] 2. The LeakyReLU activation function can alleviate the "neuron death" problem that ReLU may cause, while maintaining nonlinear characteristics, which is beneficial for capturing nonlinear relationships in the crystallization process.
[0335] 3. Batch normalization layers help accelerate network convergence and improve the model's generalization ability, which is especially important for adapting to the intermittent crystallization process of PAT in different batches.
[0336] 4. Global average pooling layers can reduce the number of parameters, lower the risk of overfitting, and retain 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 to better learn the characteristics and interrelationships of these stages.
[0338] 6. The four neurons in the output layer directly correspond to four invisible parameters that need to be predicted, making the network output closely linked to the key parameters of the crystallization process.
[0339] With this improved deep residual network structure, the invisible parameter prediction branch network can more accurately capture the characteristics of the PAT intermittent crystallization process and predict key invisible parameters, providing important input for the parameter optimization model of the entire PAT intermittent crystallization process.
[0340] Next, we introduce the specific structure of the fusion network. The fusion network integrates the output feature vectors of each branch network and outputs the final optimized control parameters for the crystallization process. It employs a combination of a multilayer perceptron (MLP) and an attention mechanism, as detailed below:
[0341] 1. Input layer: Receives the output feature vectors from each branch network. in, For the output of the time-segmented branch network, For the output of the staged segmented branch network, The output of the segmented branch network for the variable point, To predict the output of the branch network for invisible parameters.
[0342] 2. Attention Layer: This layer employs an attention mechanism, assigning 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] Where, w i This is a learnable attention weight vector.
[0345] 3. Fully Connected Layers: This layer consists of two fully connected layers. The first fully connected layer receives the sum of the feature vectors from each branch network as input and outputs a dimension of 128. The second fully connected layer receives the sum of the feature vectors from each branch network as input and outputs the dimensions 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] This fusion network design can adaptively focus on the importance of the outputs of each branch network, making full use of diverse information such as time series features, stage features, change point features, and invisible parameter predictions to 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 to obtain the optimized crystallization process control parameters.
[0348] Specifically, the first step is to obtain the online visible parameter data for the current PAT intermittent crystallization process. Then, using the aforementioned parameter calculation equations, the corresponding invisible parameters can be derived.
[0349] Next, we will analyze these segmentation parameters of the current production process, including time segmentation groups. Phase segmentation group and change point segmentation group And the estimated invisible parameters The input is fed into the previously trained multi-branch neural network model.
[0350] The various branches of this multi-branch neural network model extract time series features, stage features, and change point features, and combine them with invisible parameter predictions. After processing by the fusion network, the final output is the optimized crystallization process control parameters, T. 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, as well as the temperature, heating / cooling rate, and stirring rate of the crystallizer, thereby achieving fully automated online control of the PAT batch crystallization process. By continuously optimizing these key parameters, the yield, purity, particle size distribution, and morphological uniformity of the crystallization process can be continuously improved, achieving the best crystallization effect.
[0352] The entire optimization process is a closed-loop feedback system. In actual production, it is also necessary to continuously monitor the crystallization process and add newly acquired data to the training dataset, regularly updating the optimization model to achieve adaptive adjustment and continuous optimization. This ensures that the model always remains highly consistent with the latest production process and can improve its prediction and optimization capabilities by continuously learning from new data.
[0353] Through the above steps, the fully automated online PAT intermittent crystallization control method of the present invention can fully utilize historical data of the crystallization process to establish a multi-branch neural network model, accurately predict 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 automated online PAT intermittent crystallization process control and continuously improving crystallization efficiency and product quality.
[0354] To better understand and implement this invention, the following is a specific application scenario of this invention, Example 2:
[0355] A pharmaceutical company produces an important amino acid raw material, which is separated and purified using the PAT batch crystallization process. The company has always emphasized the optimization and automation of its production process, accumulating a large amount of historical data on the PAT batch crystallization process, including various measurable crystallization process parameters and corresponding crystallization effect parameters. Based on this historical data, the company decided to adopt the fully automated online PAT batch crystallization control method of this invention to achieve intelligent optimization and automated control of the crystallization process. Figure 2As shown, this embodiment 2 involves an online PAT crystallization device, including a feed tank, a crystallization tank (reaction vessel), 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. During operation, more detailed and specific experimental procedures can be formulated according to the specific materials and crystallization conditions. A certain amount of supersaturated solution at a certain temperature is prepared and introduced into the feed tank. The feed tank is kept constant at a given temperature to ensure complete dissolution of the solute; at this point, the solution in the feed tank should be clear. The peristaltic pump connecting the feed tank and the crystallization tank is turned on, pumping the clear solution into the crystallization tank at a specific flow rate. The temperature of the crystallization tank is set to a constant value. Stirring is continued for a period of time at a specific stirring rate, followed by cooling at a certain rate. An online PAT device, such as an imaging particle size analyzer or an online turbidity meter, has its probe inserted into the crystallization tank to monitor in real time changes in important parameters such as concentration, supersaturation, turbidity, morphology, and particle size distribution. Furthermore, the parameters are adjusted using the method provided by this invention, achieving fully automated and unmanned operation of the crystallization process. After a certain period of time, the desired crystals are obtained, and the material is fed into the storage tank.
[0356] First, the company extracted data from 25 batches of PAT intermittent crystallization processes over five years from historical production records, specifically including:
[0357] 1. Measurable crystallization process parameters:
[0358] Table 1 Measurable parameters of the crystallization process
[0359] temperature ℃ granularity μm Appearance - Turbidity NTU concentration g / L Stirring rate rpm Feed rate L / min Cooling rate ℃ / min
[0360] 2. Crystallization effect parameters:
[0361] Table 2 Crystallization effect parameters
[0362] Crystal yield % Crystal purity % Crystal grain size distribution - Crystal morphology uniformity - Crystallization time h
[0363] By analyzing this historical data, the company has established a comprehensive training dataset, including time-segmented groups, stage-segmented groups, and change-point-segmented groups of crystallization process parameters, as well as the corresponding crystallization effect parameters.
[0364] Next, the company uses this training data to train and optimize the multi-branch neural network model described in this invention. The specific steps are as follows:
[0365] 1. Calculate the 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 σ, and crystallization kinetic parameters G and B.
[0367] The saturation S is calculated using the following equation:
[0368]
[0369] Where, ΔH f =25.3kJ / mol is the enthalpy of solubility of the solute (amino acid), R = 8.314J / (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, obtained by online infrared spectroscopy. * For saturation concentration, according to The calculations yielded A = 210 g / L, E a = 30.5 kJ / mol.
[0373] The crystallization kinetic parameters G and B are calculated using the following equations:
[0374]
[0375]
[0376] Where, M T =CC * ω represents the mass concentration of the suspended crystals, and ω represents the stirring rate.
[0377] 2. Segment the crystallization process parameters.
[0378] Based on historical data, the company segmented 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 segments at equal intervals, with each time segment having a length of Δt = 0.5h.
[0380] Stage segmentation: The crystallization process is divided into 5 main stages, namely the dissolution stage (0-1h), cooling stage (1-2h), nucleation stage (2-3h), crystal growth stage (3-4h), and crystal ripening stage (4-5h).
[0381] Segmentation of Change Points: Based on historical data analysis, the following 6 key parameter change points were identified:
[0382] Temperature inflection point: T inflection =45℃;
[0383] Turbidity abrupt change point: τ critical=300 NTU;
[0384] Concentration mutation point: C critical =125g / L;
[0385] Granularity mutation point: d critical =80μm;
[0386] Peak point of supersaturation: σ peak =0.35;
[0387] Peak point of secondary nucleation rate: (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 dataset, the company uses the multi-branch neural network model described in this invention for training and optimization. The specific model structure is as follows:
[0390] (1) Time-segmented branching network
[0391] A bidirectional LSTM structure was used, with the input being measurable parameters of the crystallization process over 10 time periods. The output is a time series feature vector.
[0392] (2) Stage-based segmented branching network
[0393] A CNN structure is used, with input consisting of measurable parameters of the crystallization process in five stages. The output is the stage feature vector.
[0394] (3) Segmented branching network with variable points
[0395] An attention-enhanced LSTM structure was used, with input consisting of measurable parameters from a crystallization process at six parameter variation points. The output is the feature vector of the variable points.
[0396] (4) Invisible parameter prediction branch network
[0397] An improved deep residual network structure is adopted, with eight measurable parameters of the crystallization process as input. The output is the estimated invisible parameters of the crystallization process.
[0398] (5) Converged Network
[0399] Using a combination of MLP and attention mechanisms, 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 automated online PAT intermittent crystallization control method of this invention to the crystallization process of amino acid drugs. The specific steps are as follows:
[0402] (1) Acquire 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 according to 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 vessel, etc., to achieve fully automatic online PAT intermittent crystallization control.
[0405] (4) Continuous monitoring and optimization: The company continuously monitors the crystallization process and adds newly acquired data to the training dataset, regularly updating and optimizing the model to ensure that the model can adaptively adjust and continuously optimize. Through this closed-loop control, the efficiency of the crystallization process and product quality can be further improved.
[0406] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A fully automated online PAT intermittent crystallization control method, characterized in that, Includes the following steps: S10. Acquire historical data, specifically by collecting the visible parameters of the crystallization process and the crystallization effect parameters of each PAT instrument during the online PAT intermittent crystallization process. S20. Using the collected visible parameters of the crystallization process, calculate the invisible parameters of the crystallization process, and combine the visible parameters and the invisible parameters of the crystallization process into crystallization process parameters. S30. Based on the characteristics of the crystallization process, the crystallization process parameters are segmented according to time, crystallization stage, and parameter variation point to obtain the crystallization process parameter time segmentation group, the crystallization process parameter stage segmentation group, and the crystallization process parameter variation point segmentation group. S40. Establish a training dataset, including time segment groups of crystallization process parameters, stage segment groups of crystallization process parameters, and segment groups of crystallization process parameter variation points, as well as crystallization effect parameters. S50. Using a long short-term memory network as the basic network structure, a multi-branch neural network model is established. The model is trained using the training dataset to obtain the parameter optimization model for the PAT intermittent crystallization process. S60. Obtain the visible parameters of the crystallization process of each PAT instrument in the online PAT intermittent crystallization process of the current production process, calculate the invisible parameters of the crystallization process, and segment the parameters according to the method in S30. S70. Input the segmented parameters of the current production process into the PAT batch crystallization process parameter optimization model obtained in S50 to obtain the optimized crystallization process control parameters, including the optimal temperature curve, optimal stirring rate, optimal feed rate and optimal cooling rate. S80. The optimized crystallization process control parameters are output to the controller for real-time adjustment of the crystallization equipment's operating parameters, including adjusting the temperature and feed rate of the feed tank, and adjusting the temperature, heating / cooling rate, and stirring rate of the crystallizer, to achieve fully automatic online PAT intermittent crystallization control.
2. The fully automated online PAT intermittent crystallization control method according to claim 1, characterized in that, The multi-branch neural network model includes a time-segmented branch network, a stage-segmented branch network, a change-point segmented branch network, an invisible parameter prediction branch network, and a fusion network.
3. The fully automated online PAT intermittent crystallization control method according to claim 2, characterized in that, The time-segmented branch network is used to process time series data. The input is a time-segmented group of crystallization process parameters, and the output is a time series feature vector. The structure is a bidirectional LSTM network. The stage segmentation branch network is used to process data from different crystallization stages. The input is a crystallization process parameter stage segmentation group, and the output is a stage feature vector. The structure is a convolutional neural network. The variable point segmented branch network is used to process parameter variable point data. The input is a segmented group of parameters variable points in the crystallization process, and the output is a variable point feature vector. The structure is an LSTM network with enhanced attention mechanism. The invisible parameter prediction branch network is used to predict invisible parameters of the crystallization process. The input is the visible parameters of the crystallization process, and the output is the predicted invisible parameters of the crystallization process. 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 parameters. The structure is a combination of multilayer perceptron and attention mechanism.
4. The fully automated online PAT intermittent crystallization control method according to claim 3, characterized in that, The visible parameters of the crystallization process include temperature, particle size, morphology, turbidity, concentration, stirring rate, feed rate, and cooling rate; the crystallization effect parameters include crystal yield, crystal purity, crystal particle size distribution, crystal morphology uniformity, and crystallization time.
5. The fully automated 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. The fully automated online PAT intermittent crystallization control method according to claim 5, characterized in that, The crystallization stages include the dissolution stage, cooling stage, nucleation stage, crystal growth stage, and crystal maturation stage. Segmentation by time specifically involves dividing the entire crystallization process into several equally spaced time periods. Segmentation by parameter variation points specifically involves dividing the process into segments based on significant changes in crystallization parameters. These significant variation points include temperature inflection points, turbidity abrupt change points, concentration abrupt change points, particle size abrupt change points, supersaturation peak points, crystallization rate peak points, and secondary nucleation rate peak points.
7. The fully automated online PAT intermittent crystallization control method according to claim 6, characterized in that, The step of calculating invisible parameters of the crystallization process using the collected visible parameters of the crystallization process employs a set of parameter calculation equations, specifically including saturation calculation equations, supersaturation calculation equations, crystallization kinetic equations, and secondary nucleation rate equations. The specific steps for segmenting the process based on significant changes in crystallization parameters are as follows: Time series analysis was performed on 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, mark it as a significant change point. A comprehensive analysis of significant changes in multiple parameters is conducted to remove redundant points; Based on the significant changes that are retained, the crystallization process is divided into multiple time periods.
8. The fully automated online PAT intermittent crystallization control method according to claim 7, characterized in that, It also includes the following steps: continuously monitoring the crystallization process and adding newly acquired data to the training dataset, and periodically 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, which, when executed in a computer, are used to perform the fully automatic online PAT intermittent crystallization control method according to any one of claims 1-8.
10. A fully automatic online PAT intermittent crystallization control system, characterized in that, It includes 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
Control system for crystallizing apparatus, and computer readable recording medium
JP2003200002A