Data analysis and energy consumption monitoring methods for drug purification processes

By establishing a heat load model and residual signal verification of the equipment under drug purification conditions, and dynamically adjusting the cooling rate, the problem of distinguishing between the latent heat of phase change signal and the heat load signal of the equipment in the cooling crystallization system is solved, thus ensuring the purity of drug crystal form and batch consistency. The system has self-correction capability.

CN123113407APending Publication Date: 2026-11-17SHANDONG PROVINCE RENHETANG PHARM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611618542.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-20
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

The existing cooling crystallization control system cannot distinguish between the latent heat signal of crystallization phase transition and the equipment heat load signal, resulting in incorrect cooling compensation actions, which disrupts the stable output of the target crystal form and affects the purity of the drug crystal form and batch-to-batch consistency.

Method used

In the constant temperature preheating stage, a heat load model of the equipment is established, and engineering heat load parameters are extracted by fitting the mapping relationship. In the cooling stage, the residual signal is calculated and the phase transformation nucleation event is verified by combining the solution supersaturation. The cooling rate is dynamically adjusted, and the cooling rate is corrected by combining the latent heat power of crystallization theory. The self-correction threshold is fed back by crystal purity.

Benefits of technology

The system accurately identifies phase transformation nucleation events, avoids excessive cooling that could damage the crystallization environment, ensures drug crystal purity and batch-to-batch consistency, and possesses self-correction capabilities, thereby improving monitoring accuracy and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123113407A_ABST
    Figure CN123113407A_ABST
Patent Text Reader

Abstract

This application relates to the field of drug crystallization control technology, specifically to a data analysis and energy consumption monitoring method for drug purification processes. The method includes: during the isothermal preheating stage, simultaneously collecting the input power of the cooling host and engineering heat source parameters; establishing an equipment heat load estimation model based on the fitted mapping relationship between the input power and the engineering heat source parameters; and during the cooling crystallization stage, calculating the residual signal between the real-time total cooling power and the predicted value output by the equipment heat load estimation model. This invention constructs a pure engineering load model during the isothermal period, and accurately identifies the latent heat of phase change using both residual signals and supersaturation verification during the cooling crystallization period. After responding to the phase change, it switches to a crystal form protection mode to dynamically regulate the cooling rate, avoiding excessive cooling that could damage the crystallization environment, reducing the risk of crystal form variation, ensuring high purity consistency between purification batches, and possessing long-term self-correction and continuous optimization capabilities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of drug crystallization control technology. More specifically, this invention relates to a data analysis and energy consumption monitoring method for drug purification processes. Background Technology

[0002] In the industrial purification and production of active pharmaceutical ingredients, the crystallization process is the core step that determines the purity and crystal morphology of the final product. Taking the purification of active pharmaceutical ingredients (APIs) for antiepileptic drugs as an example, the active ingredients exist in various stable or metastable crystal structures. Different crystal forms exhibit significant differences in dissolution rate, bioavailability, and chemical stability, which directly affects the clinical efficacy and batch-to-batch consistency of the formulation. The cooling crystallization process on the production line is typically equipped with multiple refrigeration units, vacuum drying units, and circulating pump sets. The overall energy consumption of all equipment operating in tandem is substantial. How to accurately monitor and control the cooling subsystem is a key engineering problem to ensure stable crystal output.

[0003] Existing technologies typically employ multi-point temperature sensors and power meters to collect real-time data from the cooling system, using historical batch average energy consumption curves as a reference to establish a fixed threshold alarm model. When the cooling power deviates from the reference curve by more than a preset proportion, the system triggers a compensation action, increasing the output of the chiller unit to maintain the target cooling curve. Some upgrade solutions introduce PID controllers to adjust the cooling rate, aiming to keep the temperature deviation within the crystallization tank within an allowable range. These methods perform reasonably well during the non-crystallization stage when the equipment's heat load is relatively stable, and can track the target operating conditions relatively well.

[0004] However, during the phase transition window of active drug crystallization, the heat load on the cooling system originates from two completely different physical sources: the engineering heat load from equipment operation and the latent heat of crystallization released when the solute precipitates from the solution. When carbamazepine nucleates in a supersaturated solution, it releases crystallization enthalpy in a very short time. This latent heat event manifests as a sudden increase in cooling load on the power curve. Existing monitoring systems cannot distinguish between the latent heat component and the equipment heat load component from the raw power signal. Both exhibit identical cooling power increase characteristics at the data level. This phenomenon may affect the judgment of the cooling system's compensation action. The system performs the same compensation action for both events, uniformly increasing the cooling rate. An excessively rapid cooling rate disrupts the supersaturation gradient required for stable crystal nucleation. If the cooling rate is uniformly increased, the solute will be forced to precipitate preferentially along the rapid growth path of the metastable crystal form, leading to a decrease in the purity of the target crystal form, a drift in the batch-to-batch crystal form distribution, and ultimately causing the product's dissolution curve to deviate from the pharmacopoeia-specified range. Summary of the Invention

[0005] To address the existing technical problem that cooling crystallization control systems cannot distinguish between latent heat of phase transition signals and equipment heat load signals, thus leading to erroneous cooling compensation actions and disrupting the stable output of the target crystal form, this application provides a data analysis and energy consumption monitoring method for drug purification operations.

[0006] This invention provides a data analysis and energy consumption monitoring method for drug purification processes, characterized by the following steps: S1: During the isothermal preheating stage, the input power of the cooling host and the parameters of the engineering heat source are collected synchronously. Based on the fitting mapping relationship between the input power and the engineering heat source parameters, an equipment heat load estimation model is established; S2: During the cooling crystallization stage, the residual signal between the real-time total cooling power and the predicted value output by the equipment heat load estimation model is calculated. Based on the standard deviation of the residual signal within the initial stable cooling period, a phase transition judgment threshold is established. Combined with solution supersaturation verification, a phase transition nucleation event is determined to have occurred when the residual signal continuously exceeds the phase transition judgment threshold; S3: In response to the phase transition nucleation event, the theoretical latent heat power of crystallization is obtained. Based on the residual signal and the theoretical latent heat power of crystallization, the corrected cooling rate is calculated, and cooling rate regulation is performed according to the corrected cooling rate; S4: The crystal purity after the current batch crystallization is completed is obtained. The discrete cumulative amount of the corrected cooling rate during the phase transition is calculated. Based on the correlation between crystal purity and discrete cumulative amount, the phase transition judgment threshold is self-calibrated.

[0007] By establishing a pure equipment heat load model during the constant temperature preheating stage and extracting residual signals during the cooling stage, and accurately identifying phase transformation nucleation events in conjunction with solution supersaturation, the cooling rate can be proactively adjusted during the critical phase transformation period. This avoids the damage to the stable crystal growth environment caused by blindly and uniformly increasing the cooling output in traditional methods, effectively ensuring the purity of the target drug crystal form and the consistency of batch-to-batch distribution. Furthermore, the adaptive correction of threshold parameters is achieved through post-feedback of crystal form purity, significantly improving the monitoring accuracy and reliability of the system under long-term purification conditions.

[0008] Furthermore, an equipment heat load estimation model is established, including: extracting the number of operating equipment, process fluid circulation flow rate, ambient temperature, and measured temperature in the crystallization tank from the engineering heat source parameters; combining the rated heat dissipation power of a single piece of equipment, the target temperature control point, and the ambient temperature benchmark value, and solving the coefficients corresponding to each parameter through least squares fitting; constructing a mapping relationship based on the solved coefficients, and finally obtaining the equipment heat load estimation model.

[0009] By using the least squares method to fit the mapping relationship between multiple variables and cooling power, the constructed equipment heat load model is more rigorous in a physical sense and the source of parameters is objective and traceable. This lays a reliable data foundation for the subsequent accurate elimination of engineering heat load interference and purification of latent heat signals of crystallization.

[0010] Furthermore, after establishing the equipment heat load estimation model, the process also includes: calculating the root mean square (RMS) of the residual between the measured input power during the constant temperature preheating stage and the predicted value output by the equipment heat load estimation model; determining whether the RMS exceeds a preset proportion of the mean of the predicted value; if it exceeds the preset proportion, extending the constant temperature sampling window and supplementing the data, and re-performing the fitting operation until the RMS meets the requirements.

[0011] A model fitting quality self-checking mechanism based on residual root mean square was introduced to effectively avoid the contamination of baseline model parameters by noise introduced during equipment switching or occasional flow disturbances during the sampling period of constant temperature preheating, thus ensuring the physical accuracy and robustness of the equipment heat load prediction model under actual variable operating conditions.

[0012] Furthermore, a phase transition determination threshold is established, including: statistically sampling the residual signal during the initial stable cooling phase to calculate the objective noise floor; obtaining the maximum peak value of the residual signal during the sampling period of the constant temperature preheating stage; calculating the ratio of the maximum peak value to the objective noise floor, and using this ratio as an objective estimation benchmark for the peak amplitude under pure noise conditions, multiplying it by a preset factor to determine the amplification factor; and multiplying the objective noise floor by the amplification factor to finally obtain the phase transition determination threshold.

[0013] By dynamically deriving the amplification factor and generating the phase transition determination threshold using the peak amplitude of the pure noise environment under actual working conditions, the threshold can adapt to the objective noise floor level of different batches or different equipment, thereby improving the sensitivity and environmental adaptability of phase transition nucleation event determination.

[0014] Furthermore, when the residual signal continuously exceeds the phase transition determination threshold, a phase transition nucleation event is determined to have occurred. This includes: obtaining the sample mean and standard deviation of the time interval between the moment when the residual signal first exceeds the phase transition determination threshold and the moment of nucleation confirmation in historical batch data of the same variety; subtracting the sample standard deviation from the sample mean of the time interval to determine the determination time window; obtaining the actual concentration of the solution through online concentration detection and calculating the supersaturation of the solution in combination with the solubility-temperature standard curve; and finally determining that a phase transition nucleation event has occurred when the residual signal continuously exceeds the phase transition determination threshold within the determination time window and the supersaturation of the solution is greater than 1.

[0015] By combining the continuous over-threshold characteristic of the power residual within the time window with the supersaturation physical state representing the real crystallization environment, a dual-condition verification was achieved. This eliminated the risk of misjudgment of phase transition caused by sudden load disturbances of the equipment when relying solely on power data, and ensured the absolute rationality of the subsequent crystal form protection control branch triggering.

[0016] Furthermore, the corrected cooling rate is calculated based on the residual signal and the latent heat power of the crystallization theory, including: obtaining the baseline cooling rate given by the process specification; calculating the ratio of the residual signal to the latent heat power of the crystallization theory; subtracting the ratio from 1 and multiplying the difference by the baseline cooling rate to finally obtain the corrected cooling rate.

[0017] After the system determines that a phase transition nucleation has occurred, it dynamically calculates the corrected cooling rate based on the quantitative ratio of the real-time residual heat load to the theoretical latent heat release scale. This reverses the direction of the cooling rate adjustment from the conventional accelerated cooling to a precise rate maintenance or slight reduction, which meets the protection requirements for the supersaturation gradient during the peak of the phase transition.

[0018] Further, the theoretical latent heat power of crystallization is obtained, including: obtaining the crystallization enthalpy and molecular weight of the target drug; estimating the current crystallization rate based on the current supersaturation and the pre-established nucleation kinetics relationship; obtaining the mass of the current batch of material; calculating the product of crystallization enthalpy, current crystallization rate and mass of material; and dividing the product by the molecular weight to finally obtain the theoretical latent heat power of crystallization.

[0019] By combining the inherent physical properties of the target drug, real-time supersaturation, and nucleation kinetics, the current crystallization rate is estimated, and then a latent heat power of crystallization theory that closely matches physical reality is derived. This provides a highly valuable theoretical support for calculating the corrected cooling rate and determining whether the system is in the peak of phase transition.

[0020] Furthermore, cooling rate regulation is performed based on the modified cooling rate, including: applying a lower limit amplitude constraint to the modified cooling rate to ensure that the modified cooling rate is greater than or equal to 0; setting the modified cooling rate to zero when the residual signal is greater than or equal to the theoretical latent heat power of crystallization to maintain the current cooling rate unchanged; and restoring the modified cooling rate to the reference cooling rate when the residual signal is lower than the theoretical latent heat power of crystallization to perform cooling rate regulation.

[0021] By applying a lower limit amplitude constraint to the modified cooling rate and designing a logic control branch based on threshold comparison, the cooling rate is actively maintained during the peak period of concentrated release of latent heat of crystallization to ensure the full growth of stable crystal form. When the phase transformation is about to be completed, the protection mode is smoothly exited and the baseline cooling is restored, thus avoiding the mechanical shock caused by sudden changes in control signal to the actuator.

[0022] Furthermore, the discrete cumulative amount of the corrected cooling rate during the phase transition is calculated, including: determining the fixed sampling period defined in the baseline modeling stage; extracting the corrected cooling rate corresponding to all sampling points from the triggering of the phase transition nucleation determination to the exit of the crystal form protection mode; multiplying the corrected cooling rate corresponding to each sampling point by the fixed sampling period and performing discrete summation to finally obtain the discrete cumulative amount.

[0023] By adopting a discrete summation form with a fixed period, the dynamic adjustment of the cooling rate of the system during the entire phase change protection period is transformed into a quantitative discrete cumulative index. This intuitively and objectively reflects the depth and degree of intervention of the crystal form protection mode under single-batch purification conditions, providing a reliable data entry point for cross-batch quality assessment and system parameter self-calibration.

[0024] Furthermore, the phase transition determination threshold is self-calibrated, including: determining the correlation between crystal purity and discrete cumulative amount; if there is a negative correlation, the amplification factor corresponding to the phase transition determination threshold is increased by one step; if there is a positive correlation and the crystal purity is lower than the qualified line, the amplification factor is decreased by one step; if there is a positive correlation and the crystal purity is stable above the qualified line, the amplification factor is kept unchanged, and finally the self-calibration of the phase transition determination threshold is completed.

[0025] A data feedback closed loop was established that runs through offline quality inspection and online process control. The crystal purity law of multiple batches of precipitation is used to guide the optimization of the step size of the phase transformation judgment threshold. This enables the system to not only automatically correct the control deviation caused by premature or delayed protection intervention, but also to give the monitoring system the dynamic correction capability to continuously evolve with the accumulation of long-term production experience.

[0026] Beneficial effects: By constructing a pure engineering load model during the isothermal period, the latent heat of phase change is accurately identified during the cooling and crystallization period using both residual signals and supersaturation verification; after responding to the phase change, the system switches to crystal form protection mode to dynamically regulate the cooling rate, avoiding excessive cooling that could damage the crystallization environment, reducing the risk of crystal form variation, ensuring high purity consistency between purification batches, and the system has the ability to self-correct and continuously optimize over a long period of time. Attached Figure Description

[0027] Figure 1 This is a schematic flowchart illustrating a data analysis and energy consumption monitoring method according to an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the comparison of cooling rate control according to an embodiment of the present invention. Detailed Implementation

[0028] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0029] This invention discloses a data analysis and energy consumption monitoring method for drug purification processes, referring to... Figure 1 This includes steps S1-S4: S1. Establish the equipment heat load model during the constant temperature preheating stage.

[0030] In an optional embodiment, prior to the start of the formal crystallization process, the system enters a constant-temperature preheating stage. During this stage, the solution temperature is maintained above the complete dissolution point, the solute has not undergone any phase change, and the entire heat power borne by the cooling subsystem comes solely from the engineering heat load of the equipment operation. The input power of the cooling host is continuously recorded by sensors at fixed sampling intervals. And by synchronously collecting the number of operating devices Process fluid circulation flow rate Ambient temperature and the measured temperature inside the crystallization tank This constitutes a set of pure heat load observation samples without phase change interference. At this stage, the solution supersaturation is zero, and the power signal does not contain any latent heat of crystallization component. All observed power fluctuations can be attributed to the engineering heat source. Therefore, the isothermal preheating stage is selected as the modeling window to provide a physically rigorous and clean reference for subsequent signal separation.

[0031] Based on the collected pure heat load samples and adhering to the principle of linear heat balance, a model for estimating equipment heat load is established by fitting the mapping relationship between the heat source parameters and cooling power of each project. : ;in, The rated heat dissipation power of a single device is obtained from the device nameplate or factory calibration data; The target temperature control point; To synchronously collect the number of operating devices; This refers to the circulating flow rate of the process fluid. The ambient temperature is the baseline value. This refers to the actual measured temperature inside the crystallization tank. The ambient temperature; , , The three coefficients are adaptively solved by performing least-squares fitting on the sampled data during the isothermal phase.

[0032] Furthermore, after the model fitting is completed, the system is tested in an isothermal range. and The root mean square (RMS) of the residuals is used as an evaluation index for the fitting quality. This preset ratio is objectively determined based on the comprehensive error level of power metering sensors in similar cooling systems under steady-state operating conditions. When this RMS exceeds... When the predicted mean is set to a preset percentage (for example, this preset percentage could be 5%), it indicates that the baseline parameters have been significantly disturbed beyond the normal range. In this case, the system automatically extends the isothermal sampling window, supplements the data, and re-executes the fitting operation until the root mean square meets the requirements. This avoids occasional noise pollution of the baseline parameters caused by equipment switching or flow disturbances during the sampling period. This also addresses the issue of equipment number fluctuations during the isothermal phase. In cases of abrupt changes, the corresponding sampling points are automatically marked as transition segments and removed from the fitting dataset to ensure that every sample point used for fitting is under steady-state operating conditions, thus guaranteeing the physical accuracy of the baseline model.

[0033] Thus, before the formal cooling and crystallization process begins, the system has established a baseline heat load model that reflects only the contribution of engineering heat load, has a clear physical meaning, and whose parameter sources are objectively traceable. This lays the computational foundation for separating the latent heat component of the crystallization phase transition from the original power signal.

[0034] S2. Calculate the residual signal to determine the phase transition kernel event.

[0035] In an optional embodiment, after entering the cooling crystallization stage, the system continues to calculate. Total cooling power at any time Equipment heat load estimation model Output predicted value residual signals between : ; Since the baseline model has completely eliminated the contribution of equipment engineering heat load, When no phase change occurs, the residual signal should fluctuate slightly near zero, with the amplitude limited by sensor measurement noise and fluid turbulence. The initial stable phase after the cooling stage begins is crucial for the residual signal. Statistical sampling is performed, and the duration of this initial stable period is objectively determined based on the stable duration before a significant increase in solution supersaturation in historical batches of this variety. For example, this duration can be 5 to 10 minutes. The standard deviation of the residual signal during this period is then used. As an objective noise basis, a phase transition determination threshold is dynamically established. : ;in The dimension is power (kW). and If the units are the same, they can be directly compared; This is the magnification factor; The initial value of the amplification factor was determined through objective derivation: during the sampling period of the isothermal preheating stage, the residual signal was calculated. maximum peak With objective noise floor The ratio of the two values ​​is used as an objective estimation benchmark for the peak amplitude in a pure noise environment. Based on this, the amplification factor is determined by multiplying it by a preset factor. Initial value: ;in The preset multiplier is objectively determined based on the engineering margin between the noise peak value and the phase transition signal amplitude under similar drug crystallization conditions. For example, The value can be 1.5. As historical batch data for the same variety accumulates, The actual value is determined by the nucleation determination trigger time in each historical batch. Peak and The mean of the ratio is rolled over and continuously updated as batches accumulate.

[0036] Next, in response to the residual signal In continuous The phase transition threshold is exceeded continuously within the judgment time window. In this state, the system determines the current moment as the point where a phase transition and nucleation event occurs, and transmits a trigger signal to subsequent control branches. The value is objectively determined by historical batch data of the same variety: based on the historical batches... First time exceeding The sample mean of the time interval between the time of the offline powder diffraction result and the nucleation confirmation time inferred from the offline powder diffraction result. Subtract one sample standard deviation get: This setting ensures that the judgment time window covers the shortest duration of the actual nucleation signal, while avoiding misjudgment due to noise introduced by an excessively short window. When there is no historical data before the first batch of production, the lower limit of the nucleation induction period obtained from the literature or physical property calibration stage of the target variety is used as the initial value for cold start. After the first batch is completed, adaptive updates are initiated.

[0037] Furthermore, to eliminate misjudgments caused by sudden increases in equipment load, the system simultaneously calculates the solution supersaturation. To verify the physical rationale for the nucleation determination: A value greater than 1 is required to confirm a true phase transition event. The refractive index of the solution is measured using online concentration detection methods, such as an online refractometer. Substitute the pre-stored refractive index concentration calibration curve of the carbamazepine solvent system at the same temperature. Conversion to obtain the actual concentration of the solution ,and The saturation concentration, i.e., solubility, is measured at the temperature in the crystallization tank. This calibration curve was pre-established during the system initialization phase through a series of experiments with standard solutions, and the temperature compensation coefficient has been incorporated into the bivariate form of the calibration curve. The concentration was obtained by referring to a pre-stored carbamazepine solubility temperature standard curve. There are many other methods in this field that can achieve online measurement of solution concentration; technicians can choose online concentration detection methods such as near-infrared spectroscopy or Raman spectroscopy to replace the refractometer solution, depending on the actual production conditions.

[0038] Thus, by combining the dual conditions of continuous power residual exceeding the threshold judgment and physical verification of supersaturation, the system can accurately distinguish between phase transformation nucleation events and equipment thermal load disturbances during the cooling crystallization process. This provides a physically meaningful triggering basis for subsequent differentiated control branches, effectively eliminating the risk of misjudgment caused by the overlap of the two types of signal characteristics when relying solely on power signals to judge nucleation events.

[0039] S3. Calculate the corrected cooling rate and implement the control.

[0040] In an optional embodiment, the nucleation determination result will trigger two control branches with completely different physical meanings.

[0041] In response to the nucleation determination outputting a phase transformation nucleation event, the system switches to crystal form protection mode. Since an excessively rapid cooling rate would disrupt the supersaturation gradient required for stable crystal nucleation, maintaining the original cooling rate would force the solute to preferentially precipitate along the rapid growth path of the metastable crystal form. Therefore, the controller reverses the current cooling rate adjustment direction from accelerating cooling to maintaining the rate or slightly reducing it. Specifically, the controller adjusts the cooling rate based on the residual signal... With the latent heat power of crystallization theory The ratio of the two values ​​is used to calculate the corrected cooling rate. : ;in, The baseline cooling rate given by the process specification.

[0042] The latent heat power in crystallization theory is calculated as follows: ;in, The crystallization enthalpy of the target drug was determined by differential scanning calorimetry during the property calibration stage before the start of the crystallization process. The molecular weight is determined by the chemical structure of the target drug. This refers to the material quality of the current batch. The current crystallization rate is determined by the current supersaturation. Estimating the relationship with pre-established nucleation kinetics, specifically, during the property calibration stage, involves experimentally recording the power rise slope at different supersaturation levels to establish... and A piecewise linear correspondence table between the points is used to obtain the current crystallization rate by interpolation during runtime. .

[0043] Furthermore, regarding the residual signal In a short time It may happen at any time For the antiphysics case where the value is negative, the corrected cooling rate is used. Apply lower limit amplitude constraint In that way. When When this occurs, it indicates that the system is in the peak of the phase transition period, at which point the corrected cooling rate should be adjusted. Setting it to zero, the current cooling rate is actively maintained constant, providing ample time for the isotropic growth of the stable crystal form and avoiding the disruption of the interface free energy advantage of the stable crystal form due to forced cooling. Less than When the phase transition is nearing completion, the corrected cooling rate is then applied. Restore to the baseline cooling rate This allows for the smooth exit of the crystal form protection mode by regulating the cooling rate.

[0044] In contrast, the heat load of the output device responding to the nucleation determination increases (i.e., Exceeding the noise substrate but with solution supersaturation (Confirming a non-phase change event), the system switches to the conventional load compensation branch, achieving load compensation by increasing the output of the chiller unit, with a power compensation amount... The calculation formula is: ;in The measured coefficient of performance (COP) of the refrigeration unit is determined by the factory calibration data or the relationship between the measured power and cooling capacity under current operating conditions. It is loaded from the equipment nameplate parameters during system initialization and can be continuously corrected based on measured data during operation. This branch converges the crystallizer temperature deviation to the allowable process range, restoring the standard PID cooling tracking logic. The two control branches achieve seamless switching driven by the decision signal, and the rate of change of cooling during the entire switching process is constrained by amplitude limiting protection, providing a gradual transition and avoiding mechanical shock to the actuator due to sudden changes in the control signal.

[0045] In this way, by diverting phase transition events and equipment thermal load events to two control branches with completely different physical meanings, the system actively protects the supersaturation gradient environment during phase transition nucleation, thereby avoiding the fundamental error of traditional unified compensation methods that induce preferential growth of metastable crystal forms by performing excessive cooling during the phase transition window. This ensures stable batch output of the target crystal form at the control level.

[0046] S4. Self-correction based on crystal purity and discrete cumulative amount.

[0047] In an optional embodiment, the crystal purity is obtained after each batch of crystallization is completed and detected offline. Afterwards, the system will process the batch of control process data (including nucleation determination time, ... peak value (correction magnitude and duration) and The data is stored in association to form a process quality mapping record. There are many other methods in this field that enable offline detection; technicians can choose suitable detection methods such as powder X-ray diffraction or near-infrared spectroscopy based on actual detection conditions.

[0048] Next, in response to the cumulative number of batches reaching a preset quantity (objectively determined based on the amount of historical data for the variety; for example, this preset quantity can be 5 batches, and then updated on a rolling basis), the system performs a backtracking analysis on the historical records, using discrete summation instead of integral calculation to calculate the discrete cumulative amount of the corrected cooling rate during the phase transition. : ;in, A fixed sampling period is defined for the baseline modeling phase. Traverse all sampling points from the time the phase transformation nucleation determination is triggered until the exit from the crystal form protection mode. For the first The corrected cooling rate applied at the sampling point. This value reflects the cumulative suppression of the cooling rate by the system during the phase transition: the larger the value, the deeper the intervention of the crystal form protection mode and the more sensitive the triggering of the judgment threshold; the smaller the value, the weaker the intervention of the crystal form protection mode and the more sluggish the triggering of the judgment threshold.

[0049] Furthermore, the system performs parameter self-calibration on the phase transition determination threshold based on the correlation between crystal form purity and discrete cumulative amount. Specifically, it determines the crystal form purity of each batch. With discrete cumulants The correlation between them is updated based on the following three branches: If and A negative correlation exists (a larger correction magnitude leads to a decrease in crystal purity, indicating that the amplification factor is too large). If the value is too small or the phase transition determination is too sensitive, then the amplification factor corresponding to the phase transition determination threshold will be adjusted. Value increased by one step ;like and Positive correlation and crystal purity Below the passing line (Explanation) If the value is too large, the phase transition detection is too slow, resulting in a delayed start of the protection mode, then the amplification factor will be increased. Value reduced by one step ;like and Positive correlation and crystal purity If the value has stabilized above the acceptable level, then maintain the amplification factor. The value remains unchanged, ultimately completing the self-calibration of the parameters for determining the phase transition threshold. Step size The value is based on each batch in the historical batches. Estimated values ​​(i.e., peak nucleation power of each batch and...) The inter-batch standard deviation of (ratio) Determined, that is This ensures that the adjustment range objectively matches the historical fluctuation level.

[0050] With the accumulation of historical batch data It is also updated synchronously with the measured statistics of the duration of nucleation signals in the newly added batch data, so that the judgment window parameters and threshold coefficients can maintain coordinated convergence. The entire monitoring and control system has the ability to continuously self-calibrate in the long-term production of the same variety.

[0051] In this way, by linking the offline crystal form detection results of each batch with the online process control data, the system's threshold judgment parameters continuously approach the optimal value as production batches accumulate, thereby achieving the engineering goal of automatically improving monitoring accuracy as production experience grows.

[0052] like Figure 2 As shown, the horizontal axis represents time (minutes), and the vertical axis represents the cooling rate (degrees Celsius / minute). It can be observed that during the phase transition window (minutes 32 to 44, with the boundary marked by vertical dashed lines and dotted lines), the existing method mistakenly identifies latent heat events as an increase in equipment heat load, triggering a compensation action, and the cooling rate significantly increases to about 0.72 degrees Celsius / minute. The present invention, however, switches to crystal form protection mode after nucleation determination is triggered. Based on the ratio of residual signal to latent heat power in crystallization theory, the corrected cooling rate is reduced to near zero, actively maintaining or slightly slowing down the cooling rate, effectively protecting the supersaturation gradient environment required for stable crystal nucleation, and avoiding the activation of the preferential growth path of metastable crystal forms.

Claims

1. A data analysis and energy consumption monitoring method for drug purification processes, characterized in that, include: S1: During the constant temperature preheating stage, the input power of the cooling host and the parameters of the engineering heat source are collected simultaneously. Based on the fitting mapping relationship between the input power and the engineering heat source parameters, an equipment heat load estimation model is established. S2: During the cooling and crystallization stage, calculate the residual signal between the real-time total cooling power and the predicted value output by the equipment heat load estimation model, and establish a phase transition judgment threshold based on the standard deviation of the residual signal in the initial stable cooling period. Combined with solution supersaturation verification, when the residual signal continuously exceeds the phase transition judgment threshold, it is determined that a phase transition nucleation event has occurred. S3: In response to the phase transformation nucleation event, obtain the theoretical latent heat power of crystallization, calculate the corrected cooling rate based on the residual signal and the theoretical latent heat power of crystallization, and perform cooling rate regulation according to the corrected cooling rate. S4: Obtain the crystal purity after the current batch crystallization is completed, calculate the discrete cumulative amount of the corrected cooling rate during the phase transition, and perform parameter self-calibration on the phase transition judgment threshold based on the correlation between crystal purity and discrete cumulative amount.

2. The data analysis and energy consumption monitoring method for drug purification operations according to claim 1, characterized in that, Establish a model for estimating equipment heat load, including: The parameters of the heat source in the project, including the number of operating equipment, the flow rate of the process fluid, the ambient temperature, and the measured temperature in the crystallization tank, are extracted. The coefficients corresponding to each parameter are solved by least squares fitting, based on the rated heat dissipation power of a single piece of equipment, the target temperature control point, and the ambient temperature reference value. A mapping relationship is constructed based on the solved coefficients, and finally, the equipment heat load estimation model is obtained.

3. The data analysis and energy consumption monitoring method for drug purification operations according to claim 1, characterized in that, After establishing the equipment heat load estimation model, the following is also included: Calculate the root mean square (RMS) of the residual between the measured input power during the constant temperature preheating stage and the predicted value output by the equipment heat load estimation model; determine whether the RMS exceeds the preset proportion of the mean of the predicted value; if it exceeds the preset proportion, extend the constant temperature sampling window and supplement the data, and re-execute the fitting operation until the RMS meets the requirements.

4. The data analysis and energy consumption monitoring method for drug purification operations according to claim 1, characterized in that, Establish a phase transition determination threshold, including: Statistical sampling of the residual signal is performed during the initial stable cooling period to calculate the objective noise floor. The maximum peak value of the residual signal during the sampling period of the constant temperature preheating stage is obtained. The ratio of the maximum peak value to the objective noise floor is calculated, and this ratio is used as the objective estimation benchmark of the peak amplitude under pure noise environment. Based on this, a preset factor is multiplied to determine the amplification factor. The objective noise floor is multiplied by the amplification factor to finally obtain the phase transition judgment threshold.

5. The data analysis and energy consumption monitoring method for drug purification operations according to claim 1, characterized in that, A phase transition nucleation event is determined to have occurred when the residual signal continuously exceeds the phase transition determination threshold, including: Obtain the sample mean and standard deviation of the time interval between the moment when the residual signal first exceeds the phase transition judgment threshold and the moment of nucleation confirmation in the historical batch data of the same variety; subtract the sample standard deviation from the sample mean of the time interval to determine the judgment time window; obtain the actual concentration of the solution through online concentration detection and calculate the supersaturation of the solution by combining it with the solubility-temperature standard curve. If the residual signal continuously exceeds the phase transition determination threshold within the determination time window, and the solution supersaturation is greater than 1, the phase transition nucleation event is finally determined to have occurred.

6. The data analysis and energy consumption monitoring method for drug purification operations according to claim 1, characterized in that, The corrected cooling rate is calculated, including: Obtain the baseline cooling rate given by the process specification; calculate the ratio of the residual signal to the theoretical latent heat power of crystallization; subtract the ratio from 1 and multiply the difference by the baseline cooling rate to obtain the corrected cooling rate.

7. The data analysis and energy consumption monitoring method for drug purification operations according to claim 1, characterized in that, Obtaining the theoretical latent heat power of crystallization includes: Obtain the crystallization enthalpy and molecular weight of the target drug; estimate the current crystallization rate based on the current supersaturation and the pre-established nucleation kinetics relationship; obtain the mass of the current batch of material; calculate the product of crystallization enthalpy, current crystallization rate and mass of material; divide the product by the molecular weight to finally obtain the theoretical latent heat power of crystallization.

8. The data analysis and energy consumption monitoring method for drug purification operations according to claim 1, characterized in that, Cooling rate regulation is performed based on the corrected cooling rate, including: applying a lower limit amplitude constraint to the corrected cooling rate to ensure that the corrected cooling rate is greater than or equal to 0; setting the corrected cooling rate to zero to maintain the current cooling rate when the residual signal is greater than or equal to the theoretical latent heat power of crystallization; and restoring the corrected cooling rate to the reference cooling rate when the residual signal is lower than the theoretical latent heat power of crystallization, in order to perform cooling rate regulation.

9. The data analysis and energy consumption monitoring method for drug purification operations according to claim 1, characterized in that, The discrete cumulative amount of the corrected cooling rate during the phase transition is calculated, including: Determine the fixed sampling period defined in the baseline modeling stage; extract the corrected cooling rate corresponding to all sampling points from the triggering of the phase transformation nucleation determination to the exit of the crystal form protection mode; multiply the corrected cooling rate corresponding to each sampling point by the fixed sampling period and perform discrete summation to finally obtain the discrete cumulative amount.

10. The data analysis and energy consumption monitoring method for drug purification operations according to claim 1, characterized in that, Self-calibration of parameters for the phase transition determination threshold includes: Determine the correlation between crystal purity and discrete cumulative amount; if there is a negative correlation, increase the amplification factor corresponding to the phase transition determination threshold by one step; if there is a positive correlation and the crystal purity is below the qualified line, decrease the amplification factor by one step; if there is a positive correlation and the crystal purity is stable above the qualified line, keep the amplification factor unchanged, and finally complete the parameter self-calibration of the phase transition determination threshold.