Continuous crystallization quality detection device and method
By capturing in-situ images of crystals in real time during continuous crystallization and using deep learning algorithms to identify shape features, the problems of resource waste and time lag caused by offline analysis are solved, enabling real-time monitoring and optimization of the continuous crystallization process.
Patent Information
- Application Number
- CN202511780069.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-02-03
AI Technical Summary
Existing technologies rely on periodic sampling for offline analysis during continuous crystallization, resulting in wasted resources and time delays, making it difficult to achieve timely process control and optimization.
A continuous crystallization quality detection device is adopted, including a crystallizer, an imaging probe and a quality detection module. By capturing in-situ images of crystals in the crystallization solution in real time, deep learning algorithms are used to identify shape features and calculate the Hotling T-squared statistic and the prediction squared error statistic to trigger an anomaly alarm.
It enables real-time monitoring of the continuous crystallization process, timely detection of crystal quality problems, supports process optimization and control, and promotes the development of automation and intelligence.
Smart Images

Figure CN121453768A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The embodiment of the present application relates to the technical field of crystallization control, in particular to a continuous crystallization quality detection device and method. BACKGROUND
[0002] Crystallization is an important technology for solid-liquid separation and product purification, which is widely used in fine chemical industry, pharmaceutical industry, food industry and the like.
[0003] Due to the characteristics of multi-objective, nonlinearity and strong coupling of the crystallization process, industrial crystallization is recognized as one of the most difficult chemical unit operations to design. The operation modes of crystallization mainly include batch crystallization and continuous crystallization. The traditional batch crystallization operation is relatively flexible, and the technology is relatively mature, but it often has problems such as poor consistency between different batches of products and complex control. In comparison, continuous crystallization usually has higher production efficiency, more stable product quality, and is easier to implement process control strategies and the like. Therefore, continuous crystallization is the current development direction of technology. However, for the continuous crystallization process, the existing technology relies on the traditional offline analysis method of periodic sampling, which needs to consume a large amount of human and material resources, and due to the obvious time lag of offline analysis, it is difficult to realize timely and effective process control and optimization for possible abnormal problems. SUMMARY
[0004] The present application provides a continuous crystallization quality detection device and method to realize real-time monitoring of the continuous crystallization process, and timely find the quality problems of the crystals in the continuous crystallization process, so as to optimize and control the continuous crystallization process.
[0005] In a first aspect, the embodiment of the present application provides a continuous crystallization quality detection device, which comprises a crystallizer, an imaging probe and a quality detection module.
[0006] The crystallizer is provided with a crystallization solution, the imaging probe is arranged in the crystallizer, and the imaging probe is inserted into the crystallization solution; the crystallizer is used for maintaining a crystallization environment, so that the crystallization solution continuously crystallizes to form crystals;
[0007] The imaging probe is connected with the quality detection module, the imaging probe is used for real-time shooting of in-situ images of the crystals in the continuous crystallization process of the crystallization solution, and the in-situ images are sent to the quality detection module;
[0008] The quality detection module is configured to identify shape features of each crystal from the in-situ images in real time, form a plurality of principal components according to the shape features, calculate a Hotelling's T-square statistic and a predicted squared error statistic of the crystal according to the plurality of principal components, and trigger a crystal shape abnormality alarm when the Hotelling's T-square statistic or the predicted squared error statistic exceeds a corresponding preset condition; wherein the shape features include at least one of convexity, circularity, solidity, aspect ratio, compactness, circumscribed rectangle proportion, ellipticity, and eccentricity.
[0009] Optionally, the continuous crystallization quality detection device further comprises a raw material input module and a crystal collection module.
[0010] The raw material input module is connected to the first port of the crystallizer through a pipeline, and the crystal collection module is connected to the second port of the crystallizer through a pipeline.
[0011] The raw material input module is configured to input a crystallization solution into the crystallizer, and the crystal collection module is configured to collect the crystals after crystallization of the crystallization solution from the crystallization solution flowing out of the crystallizer.
[0012] Optionally, the continuous crystallization quality detection device further comprises a heating module and a stirring paddle.
[0013] The heating module is inserted into the crystallization solution in the crystallizer, and the heating module is configured to control the temperature of the crystallization solution in the crystallizer; the stirring paddle is inserted into the crystallization solution in the crystallizer, and the stirring paddle is configured to stir the crystallization solution in the crystallizer.
[0014] Optionally, the imaging probe comprises a camera and an observation cavity.
[0015] The camera is connected to the quality detection module, the camera is located at a first end of the observation cavity, and a second end of the observation cavity is inserted into the crystallization solution.
[0016] The camera is configured to capture in real time in-situ images of the crystals of the crystallization solution flowing into the observation cavity during the continuous crystallization process, and send the in-situ images to the quality detection module.
[0017] In a second aspect, the embodiments of the present application further provide a continuous crystallization quality detection method, which is applied to the continuous crystallization quality detection device in any of the embodiments of the present application, and the continuous crystallization quality detection method comprises:
[0018] The quality detection module acquires in real time in-situ images of the crystals of the crystallization solution during the continuous crystallization process.
[0019] The quality detection module identifies shape features of each of the crystals from the in-situ image in real time; wherein the shape features include at least one of convexity, circularity, solidity, aspect ratio, compactness, circumscribed rectangle proportion, ellipticity, and eccentricity;
[0020] The quality detection module forms a plurality of principal components according to the shape features, calculates a Hotelling T-square statistic and a predicted square error statistic of the crystals according to the plurality of principal components, and triggers a crystal shape abnormality alarm when the Hotelling T-square statistic or the predicted square error statistic exceeds a corresponding preset condition.
[0021] Optionally, the identifying the shape features of each of the crystals from the in-situ image in real time includes:
[0022] Identifying a region containing the crystals in the in-situ image based on a preset deep learning model to form an observation image;
[0023] Identifying the shape features of each of the crystals from the observation image.
[0024] Optionally, the identifying the shape features of each of the crystals from the observation image includes:
[0025] Identifying convexity, circularity, and solidity of each of the crystals from the observation image;
[0026] Calculating aspect ratio, compactness, and circumscribed rectangle proportion of each of the crystals according to a maximum Feret diameter and a minimum Feret diameter of each of the crystals in the observation image, wherein the aspect ratio of the crystal satisfies:
[0027] ;
[0028] The compactness of the crystal satisfies:
[0029] ;
[0030] The circumscribed rectangle proportion of the crystal satisfies:
[0031] ;
[0032] wherein N1 is the aspect ratio of the crystal, N2 is the compactness of the crystal, N3 is the circumscribed rectangle proportion of the crystal, D max is the maximum Feret diameter of the crystal, D min is the minimum Feret diameter of the crystal, and A is an area of each of the crystals in the observation image;
[0033] The ellipticity and eccentricity of each of the crystals are calculated according to the length of the long axis of the Lengendre ellipse and the length of the short axis of the Lengendre ellipse of each of the crystals in the observation image, the ellipticity of the crystal satisfies:
[0034] ;
[0035] The eccentricity of the crystal satisfies:
[0036] ;
[0037] Wherein, N4 is the ellipticity of the crystal, N5 is the eccentricity of the crystal, L max is the length of the long axis of the Lengendre ellipse of the crystal, and L min is the length of the short axis of the Lengendre ellipse of the crystal.
[0038] Optionally, the region containing the crystal in the in-situ image is identified based on the preset deep learning model to form an observation image, which comprises:
[0039] Segmenting a rectangular region containing the crystal in the in-situ image based on a preset deep learning model;
[0040] Deleting the crystal with an area less than an area threshold in the rectangular region;
[0041] Filling the crystal with an internal cavity in the rectangular region;
[0042] Deleting the crystal located at the boundary of the rectangular region and with incomplete morphology to form the observation image.
[0043] Optionally,
[0044] The plurality of principal components are formed according to the shape features, the Hotelling T-square statistic and the predicted square error statistic of the crystal are calculated according to the plurality of principal components, and when the Hotelling T-square statistic or the predicted square error statistic exceeds a corresponding preset condition, a crystal shape abnormality alarm is triggered, which comprises:
[0045] The plurality of principal components are formed according to the shape features; wherein the principal component is formed by the shape feature of the crystal, each of the principal components is formed by at least one of the shape features, and the number of the principal components is at most 8;
[0046] A multivariate statistical process control model of multiple quality detection levels is established by selecting different numbers of the principal components;
[0047] inputting the shape features corresponding to the crystal into the multivariate statistical process control model corresponding to the quality detection level, calculating the Hotelling T-square statistics and the prediction squared error statistics of the crystal, and triggering a crystal shape abnormality alarm when the Hotelling T-square statistics and the prediction squared error statistics of the crystal satisfy the control limit in the multivariate statistical process control model.
[0048] Optionally,
[0049] The inputting the shape features corresponding to the crystal into the multivariate statistical process control model corresponding to the quality detection level, calculating the Hotelling T-square statistics and the prediction squared error statistics of the crystal, and triggering a crystal shape abnormality alarm when the Hotelling T-square statistics and the prediction squared error statistics of the crystal satisfy the control limit in the multivariate statistical process control model, comprises:
[0050] inputting the shape features corresponding to the crystal into the multivariate statistical process control model corresponding to the quality detection level, calculating the Hotelling T-square statistics and the prediction squared error statistics of the crystal;
[0051] triggering a crystal shape abnormality alarm when the Hotelling T-square statistics of the crystal exceeds a preset control limit;
[0052] triggering a crystal shape abnormality alarm when the prediction squared error statistics of the crystal exceeds a preset control limit.
[0053] The present application provides a continuous crystallization quality detection device and method, which comprises a crystallizer, an imaging probe and a quality detection module. The crystallizer is provided with a crystallization solution, the imaging probe is arranged in the crystallizer and inserted into the crystallization solution. The crystallizer is a device for crystallization of the crystallization solution, which can maintain the crystallization environment and realize the continuous crystallization process of the crystallization solution to form crystals. The imaging probe is connected with the quality detection module, which can capture the in-situ images of the crystals in the continuous crystallization process and send them to the quality detection module to realize the real-time monitoring of the continuous crystallization process. The quality detection module can identify the shape features of each crystal from the in-situ images, form a plurality of principal components according to the shape features, calculate the Hotelling T-square statistics and the prediction squared error statistics of the crystals according to the plurality of principal components, and trigger a crystal shape abnormality alarm when the Hotelling T-square statistics or the prediction squared error statistics exceeds the corresponding preset condition, so as to find the quality problems of the crystals in the continuous crystallization process in time, thereby providing effective support for the optimization and control of the continuous crystallization process and the development of automation and intelligence. BRIEF DESCRIPTION OF DRAWINGS
[0054] Figure 1A structure schematic diagram of a continuous crystallization quality detection device provided by an embodiment of the present application is shown in FIG. 1.
[0055] Figure 2 A schematic diagram of shape description of crystal particles provided by an embodiment of the present application is shown in FIG. 2.
[0056] Figure 3 A structure schematic diagram of another continuous crystallization quality detection device provided by an embodiment of the present application is shown in FIG. 3.
[0057] Figure 4 A flow chart of a continuous crystallization quality detection method provided by an embodiment of the present application is shown in FIG. 4.
[0058] Figure 5 A flow chart of another continuous crystallization quality detection method provided by an embodiment of the present application is shown in FIG. 5.
[0059] Figure 6 A schematic diagram of a Feret diameter of irregular particles provided by an embodiment of the present application is shown in FIG. 6.
[0060] Figure 7 A schematic diagram of a Lengde ellipse of irregular particles provided by an embodiment of the present application is shown in FIG. 7.
[0061] Figure 8 A schematic diagram of an in-situ image processing process provided by an embodiment of the present application is shown in FIG. 8.
[0062] Figure 9 A flow chart of yet another continuous crystallization quality detection method provided by an embodiment of the present application is shown in FIG. 9.
[0063] Figure 10 A schematic diagram of a cumulative variance explanation rate curve obtained based on a principal component analysis method provided by an embodiment of the present application is shown in FIG. 10.
[0064] Figure 11 A T2 under two principal components provided by an embodiment of the present application is shown in FIG. 11. 2 A schematic diagram of a control chart is shown in FIG. 12.
[0065] Figure 12 A schematic diagram of detection results of two test set pictures provided by an embodiment of the present application is shown in FIG. 13. DETAILED DESCRIPTION
[0066] The present application will be further described below in conjunction with the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application. In addition, it should be noted that, for the convenience of description, only the parts related to the present application are shown in the drawings, but not all the structures.
[0067] The quality of the crystal product is mainly evaluated by crystal type, size distribution, shape distribution, etc. The crystal shape significantly affects the pharmaceutical properties of the crystalline product, such as dissolution rate, stability and bioavailability. At the same time, it also affects the physical properties of the particles, such as flowability and compressibility, and further affects the operation efficiency of downstream unit operations such as filtration, drying and preparation. Therefore, timely detection of the particle shape during the crystallization process has important practical significance for the accurate preparation of the crystal product.
[0068] For the detection of the particle shape in the continuous crystallization process, the current widely used detection method is offline analysis. Samples need to be periodically extracted from the crystallization reactor, and then observed by the human eye, photographed by a microscope, etc. in the laboratory. For the crystal images photographed offline, the crystal particle shape information such as aspect ratio, circularity and eccentricity can be extracted by traditional image processing methods or deep learning technology. The crystal shape information in the continuous crystallization process is reflected by the qualitative judgment of the human eye and the quantitative index of the image analysis method. For the evaluation of the crystal shape, the traditional method mainly depends on the independent evaluation of several attributes such as aspect ratio and circularity. In fact, the shape of the crystal can be described from many aspects, so that the shape characteristics of the crystal can be described from different angles. In addition, there may be certain correlation between different shape attributes of the crystal, which is even more complex. The above strategy of independently evaluating several attributes cannot fully reflect the essential characteristics of the crystal shape. Therefore, it is of great significance to develop accurate and efficient real-time detection technology for the quality of the crystal product for the optimization and automation and intelligent development of the continuous crystallization process.
[0069] To solve the problems in the prior art, the embodiment of the present application provides a continuous crystallization quality detection device. The continuous crystallization quality detection device is based on computer vision technology, establishes an online detection platform for the quality of the continuous crystallization product, realizes real-time intelligent detection of the product shape, realizes real-time imaging of the continuous crystallization process by in-situ microscopic imaging technology, accurately segments the crystal individuals in the in-situ image by using a deep learning algorithm, extracts a large number of attributes of the crystal shape, and realizes judgment of the quality of the crystal. Figure 1 The structure of the continuous crystallization quality detection device provided by the embodiment of the present application is shown in FIG. 1. Figure 1 As shown in FIG. 1, the continuous crystallization quality detection device comprises a crystallizer 110, an imaging probe 120 and a quality detection module 130. The crystallizer 110 is provided with a crystallization solution, the imaging probe 120 is arranged in the crystallizer, and the imaging probe 120 is inserted into the crystallization solution. The crystallizer 110 is used to maintain the crystallization environment, so that the crystallization solution continuously crystallizes to form crystals.
[0070] The imaging probe 120 is connected with the quality detection module 130, the imaging probe 120 is used for shooting in-situ images of the crystals of the crystallization solution in the continuous crystallization process in real time, and is sent to the quality detection module 130; the quality detection module 130 is used for identifying the shape features of each crystal in the in-situ images in real time, forming a plurality of principal components according to the shape features, calculating the Hotelling T-square statistics and the prediction square error statistics of the crystals according to the plurality of principal components, and triggering a crystal shape abnormality alarm when the Hotelling T-square statistics or the prediction square error statistics exceeds the corresponding preset condition; wherein the shape features include at least one of convexity, roundness, solidness, aspect ratio, compactness, circumscribed rectangle proportion, ellipticity and eccentricity.
[0071] Specifically, the crystallizer 110 is a continuous crystallization device, the crystallization solution inside the crystallizer 110 is kept fully mixed, so that the crystallization process is uniformly carried out in the whole device, the crystallizer 110 can maintain a suitable crystallization environment by adjusting the temperature and other conditions, so that the crystallization solution continuously crystallizes to form crystals. The imaging probe 120 is long strip-shaped, and is designed in an immersion type, so that the probe with a special structure can be directly built-in in the continuous crystallizer 110, the insertion depth of the imaging probe 120 is generally determined according to the height of the crystallization solution in the crystallizer 110, the higher the height of the crystallization solution, the deeper the insertion depth of the imaging probe 120, so as to accurately collect the in-situ images of the crystals of the crystallization solution in the continuous crystallization process. The quality detection module 130 can be a computer device, the quality detection module 130 can control the imaging probe 120 to work, control the imaging probe 120 to shoot the in-situ images of the crystals of the crystallization solution in the continuous crystallization process in real time, and the quality detection module 130 can also control the stroboscopic LED light source synchronized with the imaging probe 120, so as to accurately control the time sequence during the shooting of the in-situ images of the crystals of the crystallization solution in the continuous crystallization process, and realize clear capture of the dynamic of the crystals. The quality detection module 130 can control the operation mode of the imaging probe 120, including adjusting the picture acquisition frequency of the camera, and the selected image acquisition rate needs to consider the data processing efficiency while ensuring the image quality.
[0072] After the quality detection module 130 obtains the in-situ images through the imaging probe 120, an instance segmentation scheme based on deep learning can be used to identify each crystal in the in-situ images. In order to more comprehensively evaluate the shape features of the crystal particles, the macro-scale shape attribute and the meso-scale shape attribute of the crystal particles are considered in the embodiment of the present application, Figure 2 The schematic diagram of the shape description of the crystal particles provided by the embodiment of the present application is as follows, Figure 2As shown, the macro-scale shape attributes are mainly established based on the Feret diameter and the Lengendre ellipse of the irregular particles, the shape features based on the Feret diameter include the aspect ratio, the compactness, and the circumscribed rectangle ratio, the shape features based on the Lengendre ellipse include the ellipticity and the eccentricity, and the meso-scale shape attributes include the convexity, the roundness, and the solidity. The macro-scale shape attributes describe the overall geometric morphology of the crystal particles through the basic geometric features or their ratios, and the meso-scale shape attributes are mainly used for quantitatively representing the contour features and are particularly sensitive to the irregularity of the crystal particle shape. The quality detection module 130 can output accurate results by performing prediction on the in-situ images of the crystallization process according to the deep learning model, and extract five macro-scale shape features and three meso-scale shape features of each crystal, i.e., at least one of the convexity, the roundness, the solidity, the aspect ratio, the compactness, the circumscribed rectangle ratio, the ellipticity, and the eccentricity.
[0073] After the quality detection module 130 identifies the shape features of each crystal from the in-situ images in real time, a plurality of principal components are formed according to the shape features, each principal component is formed by at least one shape feature, and there is a linear relationship between each principal component and at least one shape feature. The principal component analysis (PCA) method can be used to reduce the dimension of the shape features, and the principal components that can represent the essential features are extracted. The number of principal components is at most 8, i.e., the number of principal components does not exceed the number of shape features. The Hotelling T-square statistic and the prediction square error statistic of the crystal are calculated according to the plurality of principal components. The calculation process of the Hotelling T-square statistic and the prediction square error statistic in the embodiment of the present application can be seen. When the Hotelling T-square statistic or the prediction square error statistic exceeds the corresponding preset condition, the crystal shape abnormality alarm is triggered, thereby realizing real-time monitoring of the product quality of the continuous crystallization process. For example, when at least one of the convexity, the roundness, the solidity, the aspect ratio, the compactness, the circumscribed rectangle ratio, the ellipticity, and the eccentricity exceeds the corresponding preset range, the crystal shape abnormality alarm is triggered, thereby realizing real-time monitoring of the product quality of the continuous crystallization process and ensuring that the product quality of the crystallization process is within the specified range.
[0074] The quality detection module 130 extracts principal components by principal component analysis, the principal components comprehensively consider the correlation between different shape attributes, and can reflect the essential characteristics of the crystal shape, then adopts multivariate statistical process control (MSPC) technology to detect the product quality in the production process, simultaneously monitors the changes of multiple principal components, comprehensively judges whether the continuous crystallization process is abnormal, and finds the quality problem of the crystal in the continuous crystallization process in time, so as to provide effective support for realizing the optimization and control of the continuous crystallization process and the development of automation and intelligentization.
[0075] The continuous crystallization quality detection device provided by the application comprises a crystallizer, an imaging probe and a quality detection module; the crystallizer is provided with a crystallization solution, the imaging probe is arranged in the crystallizer and is inserted into the crystallization solution; the crystallizer is used as a device for crystallization of the crystallization solution, can maintain a crystallization environment, enables the crystallization solution to realize a continuous crystallization process, and forms crystals; the imaging probe is connected with the quality detection module, can shoot in-situ images of the crystals of the crystallization solution in the continuous crystallization process in real time, and sends the in-situ images to the quality detection module, so as to realize real-time monitoring of the continuous crystallization process. The quality detection module can identify the shape characteristics of each crystal in real time from the in-situ images, forms multiple principal components according to the shape characteristics, calculates the Hotelling T-square statistics and the prediction square error statistics of the crystals according to the multiple principal components, triggers a crystal shape abnormality alarm when the Hotelling T-square statistics or the prediction square error statistics exceeds a corresponding preset condition, finds the quality problem of the crystals in the continuous crystallization process in time, and thus provides effective support for realizing the optimization and control of the continuous crystallization process and the development of automation and intelligentization.
[0076] Figure 3 Another structural schematic diagram of the continuous crystallization quality detection device provided by the embodiment of the application is shown in FIG. 2. Figure 3 As shown in FIG. 2, in the embodiment of the application, the continuous crystallization quality detection device further comprises a raw material input module 140 and a crystal collection module 150; the raw material input module 140 is connected with the first port of the crystallizer 110 through a pipeline, and the crystal collection module 150 is connected with the second port of the crystallizer 120 through a pipeline; the raw material input module 140 is used for inputting the crystallization solution into the crystallizer 110, and the crystal collection module 150 is used for collecting the crystals after crystallization of the crystallization solution from the crystallization solution flowing out of the crystallizer 110.
[0077] The crystallizer 110 can be a mixed suspension mixed product removal (MSMPR), which is a continuously operated crystallizer with the internal crystallization solution kept in sufficient mixing, so that the crystallization process is uniformly carried out in the whole device. In the MSMPR, feeding, crystallization and discharging are carried out at the same time, so that the discharged slurry from the second port of the crystallizer 110 has the same composition and crystal distribution as the crystallization solution in the crystallizer 110. The MSMPR can maintain stable supersaturation and crystal growth environment through different stages, and can obtain products with relatively narrow crystal size distribution, high purity and stable crystal form, which is suitable for large-scale production.
[0078] Specifically, the raw material input module 140 is connected to the first port of the crystallizer 110 through a pipeline, and the crystal collection module 150 is connected to the second port of the crystallizer 120 through a pipeline. During the crystallization process, the raw material input module 140 inputs the crystallization solution into the crystallizer 110, and the crystallization solution undergoes continuous crystallization in the crystallization environment in the crystallizer 110 to form crystals. The crystal collection module 150 can collect the crystals after the crystallization of the crystallization solution from the crystallization solution flowing out of the crystallizer 110. The raw material continuously flows into the crystallizer 110 from one side port, and the product continuously flows out from the other side port. The feeding, crystallization and discharging are carried out at the same time in the crystallizer 110, which improves the production efficiency.
[0079] Optionally, the raw material input module 140 is composed of a first peristaltic pump 141 and a round-bottom flask 142, and the crystal collection module 150 is composed of a second peristaltic pump 151 and a product tank 152. The first peristaltic pump 141 can extract the crystallization solution from the round-bottom flask 142 and deliver it into the crystallizer 110. The second peristaltic pump 151 can extract the crystallization solution containing crystals from the crystallizer 110 and deliver it into the product tank 152, so as to collect the crystal product in the product tank 152.
[0080] Reference Figure 3 The continuous crystallization quality detection device further comprises a heating module 160 and a stirring paddle 170. The heating module 160 is inserted into the crystallization solution in the crystallizer 110, and is used to control the temperature of the crystallization solution in the crystallizer 110. The stirring paddle 170 is inserted into the crystallization solution in the crystallizer 110, and is used to stir the crystallization solution in the crystallizer 110.
[0081] Specifically, the heating module 160 and the stirring paddle 170 are both inserted into the crystallization solution in the crystallizer 110, so as to heat and stir the crystallization solution in the crystallizer 110, thereby providing a suitable crystallization environment for the crystallizer 110, and enabling the crystallization solution to continuously crystallize to form crystals.
[0082] Optionally, the continuous crystallization quality detection device further comprises a constant temperature device 180, which is electrically connected with the heating module 160 to control the heating module 160 to heat the crystallization solution, and is further connected with the crystallizer 110 through a pipeline to extract the relatively hot crystallization solution in the upper part of the crystallizer 110 heated by the heating module 160 and deliver it to the bottom of the constant temperature device 180, so as to make the temperature of the crystallization solution in the crystallizer 110 uniform.
[0083] Optionally, the crystallization quality detection device further comprises a spectrometer 191 and a probe 192, which are connected, the probe 192 is inserted into the crystallization solution in the crystallizer 110, and the spectrometer 191 can monitor the real-time concentration change of the solute in the crystallization process of the crystallization solution in real time through the probe 192, so as to detect whether the crystallization solution can realize crystallization, and through real-time and in-situ monitoring of key parameters, errors and risks caused by sampling are avoided, thereby helping precise control and improving the quality of crystal products. In addition, the spectrometer 191 is connected with the quality detection module 130, and the real-time concentration change of the solute in the crystallization process of the crystallization solution in the crystallizer 110 can be sent to the quality detection module 130, and the quality detection module 130 can control the raw material input module 140 to input a crystallization solution with a high solute concentration when the solute concentration of the crystallization solution in the crystallizer 110 is less than a preset value, so as to ensure that the crystallization solution in the crystallizer 110 can normally crystallize.
[0084] Reference Figure 3 The imaging probe 120 comprises a camera 121 and an observation cavity 122; the camera 121 is connected with the quality detection module 130, the camera 121 is located at a first end of the observation cavity 122, and a second end of the observation cavity 122 is inserted into the crystallization solution; the camera 121 is used to capture in-situ images of crystals of the crystallization solution flowing into the observation cavity 122 in the continuous crystallization process in real time and send them to the quality detection module 130.
[0085] Specifically, the camera 121 is located at one side of the observation cavity 122, the observation cavity 122 and part of the camera 121 are inserted into the crystallization solution in the crystallizer 110, and the camera 121 located outside the crystallizer 110 is connected with the quality detection module 130 through a connecting port. Under the continuous stirring action of the stirring paddle 170 located in the crystallizer 110, the solution continuously flows through the observation cavity 122. The camera 121 is a high-resolution camera, and the front-end optical assembly thereof directly contacts with the crystallization solution through the specially designed observation cavity 122, so as to continuously acquire images of the crystallization process.
[0086] The application provides a continuous crystallization quality detection device, which can discover quality problems of crystals in a continuous crystallization process in time, thereby providing effective support for optimization and control of the continuous crystallization process and development of automation and intelligence.
[0087] The application also provides a continuous crystallization quality detection method, which is applied to the continuous crystallization quality detection device in any one of the embodiments of the application and can be executed by the quality detection module in the continuous crystallization quality detection device. Figure 4 A flowchart of the continuous crystallization quality detection method provided by the embodiments of the application is shown in Figure 4 The continuous crystallization quality detection method comprises the following steps.
[0088] S110, the quality detection module acquires in-situ images of the crystals of the crystallization solution in the continuous crystallization process in real time.
[0089] S120, the quality detection module identifies shape features of each crystal from the in-situ images in real time; wherein the shape features comprise at least one of convexity, circularity, solidness, aspect ratio, compactness, circumscribed rectangle proportion, ellipticity and eccentricity.
[0090] S130, the quality detection module forms a plurality of principal components according to the shape features, calculates Hotelling T-square statistics and prediction square error statistics of the crystals according to the plurality of principal components, and triggers a crystal shape abnormality alarm when the Hotelling T-square statistics or the prediction square error statistics exceeds a corresponding preset condition.
[0091] Specifically, refer to Figure 1After the in-situ image is acquired by the quality detection module 130 through the imaging probe 120, an instance segmentation scheme based on deep learning can be used to identify each crystal in the in-situ image, so as to identify the shape feature of each crystal. After the quality detection module 130 identifies the shape feature of each crystal in real time from the in-situ image, a plurality of principal components are formed according to the shape feature, the Hotelling T-square statistic and the prediction square error statistic of the crystal are calculated according to the plurality of principal components, and when the Hotelling T-square statistic or the prediction square error statistic exceeds the corresponding preset condition, a crystal shape abnormality alarm is triggered, so as to realize real-time monitoring of the product quality of the continuous crystallization process. For example, when at least one of convexity, circularity, solidness, aspect ratio, compactness, circumscribed rectangle proportion, ellipticity and eccentricity exceeds the corresponding preset range, a crystal shape abnormality alarm is triggered, so as to realize real-time monitoring of the product quality of the continuous crystallization process and ensure that the product quality of the crystallization process is within the specified range. The process of the quality detection module 130 for judging whether the shape feature exceeds the corresponding preset condition can extract principal components through principal component analysis. These principal components comprehensively consider the correlation between different shape attributes and can reflect the essential features of the crystal shape. Then, the multivariate statistical process control technology is used to detect the product quality in the production process, and the changes of the plurality of principal components are monitored to comprehensively judge whether the continuous crystallization process is abnormal, so as to timely find the quality problems of the crystal in the continuous crystallization process, thereby providing effective support for the optimization and control of the continuous crystallization process and the development of automation and intelligentization.
[0092] The present application provides a continuous crystallization quality detection method. The continuous crystallization quality detection method can identify the shape feature of each crystal in real time from the in-situ image through the quality detection module, form a plurality of principal components according to the shape feature, calculate the Hotelling T-square statistic and the prediction square error statistic of the crystal according to the plurality of principal components, trigger a crystal shape abnormality alarm when the Hotelling T-square statistic or the prediction square error statistic exceeds the corresponding preset condition, and timely find the quality problems of the crystal in the continuous crystallization process, thereby providing effective support for the optimization and control of the continuous crystallization process and the development of automation and intelligentization.
[0093] In some embodiments of the present application, another continuous crystallization quality detection method is also provided, Figure 5 The flowchart of another continuous crystallization quality detection method provided for the embodiments of the present application is shown in Figure 5 The continuous crystallization quality detection method includes:
[0094] S210, the quality detection module acquires in real time the in-situ image of the crystal in the continuous crystallization process of the crystallization solution.
[0095] S220, the region containing the crystal in the in-situ image is identified based on a preset deep learning model to form an observation image.
[0096] wherein the deep learning is a machine learning method based on artificial neural network, and is capable of automatically learning feature representation from a large amount of data through multi-layer nonlinear feature extraction to realize complex pattern recognition and prediction, and is widely applied to image, voice and natural language processing fields, and the preset deep learning model in the embodiment of the present application is established based on a deep learning algorithm.
[0097] Specifically, the in-situ image file of the crystallization process is transmitted to the quality detection module 130 in real time for data analysis, and then the in-situ image and the related analysis result are displayed on the computer screen. The image processing algorithm in the quality detection module 130 adopts an instance segmentation scheme based on deep learning, that is, each crystal in the image is identified, including the crystal individuals that exist in mutual overlap. And a preset deep learning model for crystal identification is specially designed for the target features and background features of the continuous crystallization in-situ image. The preset deep learning model can mainly include five parts. The first part is image feature extraction, which automatically extracts deep-level feature information of the input image through a deep residual network containing a large number of neural network layers; the second part is to give the target candidate region, which gives the region position information that may contain the crystal in the form of a rectangular box; the third part corrects the position of the rectangular box in the feature map; the fourth part outputs the conclusion whether the rectangular box contains the crystal and the accurate position information of the crystal; and the fifth part gives the specific pixel point position in the rectangular box that belongs to the crystal. In order to introduce nonlinear factors, the algorithm adopts a ReLU activation function, and the loss function of the algorithm is composed of three parts, including the classification loss of each pixel point, the positioning loss of the crystal position, and the binary cross-entropy loss of the mask. By identifying the region containing the crystal in the in-situ image based on the preset deep learning model, an observation image is formed, which can eliminate invalid data and interference in the in-situ image, and ensure the accuracy of identifying the shape features of each crystal from the observation image, thereby improving the accuracy of the final crystal quality detection result.
[0098] S230, identifying the shape features of each crystal from the observation image; wherein the shape features include at least one of convexity, circularity, solidity, aspect ratio, compactness, circumscribed rectangle proportion, ellipticity and eccentricity.
[0099] Specifically, Figure 6 A schematic diagram of the Feret diameter of the irregular particle provided by the embodiment of the present application is shown in the figure, Figure 7 A schematic diagram of the Lagrange ellipse of the irregular particle provided by the embodiment of the present application is shown in the figure, Figure 6 and Figure 7 As shown in the figure, the Feret diameter corresponds to the distance between two straight lines that are parallel to each other and tangent to the particle contour, the maximum distance D max is the maximum Feret diameter, and the minimum distance D minis the minimum Feret diameter. The Léonard ellipse is defined as the ellipse that has the same inertial properties as the particle, i.e. the same center of mass and moment of inertia. The length of the major axis and the length of the minor axis of the Léonard ellipse are denoted by L max and L min , respectively.
[0100] The shape features of each crystal are identified from the observed image, including:
[0101] The convexity, circularity and solidity of each crystal are identified from the observed image; the aspect ratio, compactness and circumscribed rectangle ratio of each crystal are calculated from the maximum Feret diameter and the minimum Feret diameter of each crystal in the observed image, and the aspect ratio of the crystal satisfies:
[0102] ;
[0103] The compactness of the crystal satisfies:
[0104] ;
[0105] The circumscribed rectangle ratio of the crystal satisfies:
[0106] ;
[0107] Wherein, N1 is the aspect ratio of the crystal, N2 is the compactness of the crystal, N3 is the circumscribed rectangle ratio of the crystal, D max is the maximum Feret diameter of the crystal, D min is the minimum Feret diameter of the crystal, and A is the area of each crystal in the observed image;
[0108] The ellipticity and eccentricity of each crystal are calculated from the length of the major axis of the Léonard ellipse and the length of the minor axis of the Léonard ellipse of each crystal in the observed image, and the ellipticity of the crystal satisfies:
[0109] ;
[0110] The eccentricity of the crystal satisfies:
[0111] ;
[0112] Wherein, N4 is the ellipticity of the crystal, N5 is the eccentricity of the crystal, L max is the length of the major axis of the Léonard ellipse of the crystal, and L min is the length of the minor axis of the Léonard ellipse of the crystal.
[0113] In addition, the convexity, circularity and solidity of the crystal are specifically defined as follows:
[0114] ;
[0115] ;
[0116] ;
[0117] wherein P is the perimeter of the particle, P c and A c are the perimeter and area of the convex hull of the crystal, respectively, based on the definitions of convexity, circularity and solidity of the crystal, the convexity, circularity and solidity of each crystal can be directly identified from the observed image.
[0118] S240, forming a plurality of principal components according to the shape features; wherein the principal components are formed by the shape features of the crystal, each principal component is formed by at least one shape feature, and the number of principal components is at most 8.
[0119] Specifically, the principal components are formed by the shape features of the crystal, each principal component is formed by at least one shape feature, and there is a linear relationship between each principal component and at least one shape feature, which can represent the essential features of the shape features. The principal component analysis (PCA) method can be used to reduce the dimension of the shape features, and the principal components that can represent the essential features are extracted. The number of principal components is at most 8, i.e. the number of principal components does not exceed the number of shape features.
[0120] S250, selecting different numbers of principal components to establish a plurality of multivariate statistical process control models of different quality detection levels.
[0121] Specifically, principal component analysis can convert original related variables into a few independent principal components through linear transformation. Based on the principal component analysis method, the shape features of the crystal are converted into a plurality of principal components, and a plurality of multivariate statistical process control models of different quality detection levels are established by selecting different numbers of principal components. The specific process can include: based on the extracted shape features of a large number of crystals, the product quality in the production process is detected using multivariate statistical process control technology, which includes two stages, i.e. modeling stage and monitoring stage. The modeling stage of MSPC is mainly to construct an analysis model based on historical data. First, the principal component analysis method is used to reduce the dimension of the historical data set, extract principal components that can represent essential features and the contribution of each principal component, and determine the appropriate number of principal components by analyzing the evolution of the cumulative variance explanation rate based on the principal components with the number of principal components. Therefore, a plurality of multivariate statistical process control models of different quality detection levels can be established by selecting different numbers of principal components.
[0122] S260, input the shape features corresponding to the crystal into a multivariate statistical process control model corresponding to the quality detection level, calculate the Hotelling T-square statistics and the prediction squared error statistics of the crystal, and trigger a crystal shape abnormality alarm when the Hotelling T-square statistics and the prediction squared error statistics of the crystal meet the control limit in the multivariate statistical process control model.
[0123] Specifically, the shape features corresponding to the crystal are input into a multivariate statistical process control model corresponding to the quality detection level, a plurality of principal components are formed according to the shape features, the Hotelling T-square statistics and the prediction squared error statistics of the crystal can be calculated through the calculation formula of the Hotelling T-square statistics and the prediction squared error statistics in the multivariate statistical process control model, the multivariate statistical process control model is provided with a corresponding control limit, and a crystal shape abnormality alarm is triggered when the Hotelling T-square statistics and the prediction squared error statistics of the crystal corresponding to the crystal meet the control limit in the multivariate statistical process control model, so as to meet the product quality control requirements of different standards. The continuous crystallization quality detection device in the embodiment of the application provides effective support for the optimization and control of the continuous crystallization process and the development of automation and intelligence.
[0124] In some embodiments of the application, the shape features corresponding to the crystal are input into a multivariate statistical process control model corresponding to the quality detection level, the Hotelling T-square statistics and the prediction squared error statistics of the crystal are calculated, and a crystal shape abnormality alarm is triggered when the Hotelling T-square statistics and the prediction squared error statistics of the crystal meet the control limit in the multivariate statistical process control model, including:
[0125] S410, input the shape features corresponding to the crystal into a multivariate statistical process control model corresponding to the quality detection level, calculate the Hotelling T-square statistics and the prediction squared error statistics of the crystal.
[0126] Specifically, the judgment of particle shape abnormality is mainly based on the Hotelling T-square statistics (Hotelling T 2 ) and the prediction squared error (squared prediction error, SPE), and the control limit of the two indexes is determined by statistical means. Hotelling's T² statistics is a generalization of multivariate t-test, which is used to measure the difference between multivariate samples and population mean. In essence, it is equivalent to the Mahalanobis distance square in the covariance weighted space, which is used to judge whether the multivariate data deviates abnormally. The SPE statistics is used to measure the residual sum of squares of the part not explained in the principal component model, which can reflect the degree of deviation of the sample from the model hyperplane, and can be used to detect whether there is an abnormal change outside the model.
[0127] In the embodiment of the present application, the multivariate statistical process control model calculates Hotelling's T 2 statistic and a prediction squared error statistic (SPE statistic) of the crystal according to the shape feature of the crystal corresponding to the quality detection grade 2 The control limit of the T
[0128] ;
[0129] Wherein, F α (q, n - q) is the upper alpha quantile critical point of F distribution with q and n-q degrees of freedom, and q represents the number of principal components.
[0130] The control limit of the SPE statistic is calculated by the following formula:
[0131] ;
[0132] Wherein, z α is the normal distribution value when the significance level is alpha. The calculation method of parameters θ1, θ2 and θ3 is as follows:
[0133] v = 1, 2, 3;
[0134] Wherein, λ i is the eigenvalue of the i-th principal component, and the calculation method of parameter h0 is as follows
[0135] ;
[0136] In the monitoring stage of MSPC, the T 2 value and the SPE value of the new observation data collected in real time are calculated according to the corresponding principal components selected before, so as to establish the corresponding control chart as the multivariate statistical process control model. The multivariate statistical process control model includes T² control chart and SPE control chart. The core role of T² control chart is to judge whether the new sample point falls within the control range determined by the reference data after being projected into the principal component space. The SPE control chart is used to judge whether the deviation between the new sample and the principal component projection space is within the allowable range. If a new abnormal situation that is not used to establish the controlled PCA model occurs, the new observation point will deviate from the principal component hyperplane, and at this time, the abnormal event can be identified by calculating the SPE value.
[0137] The definition of Hotelling's T 2 statistic of each crystal particle in the observation image is as follows:
[0138] ;
[0139] Wherein, t idenotes the score of the sample for the principal component i, is the estimated variance of the principal component.
[0140] The SPE statistics of each crystal particle in the observed image is defined as follows:
[0141] ;
[0142] wherein k represents the number of attributes of the sample, x i denotes the i-th attribute of the sample x, x new, i denotes the reconstruction value of the sample based on the PCA model.
[0143] S420, triggering a crystal shape abnormality alarm when the Hotelling’s T-square statistics of the crystal exceeds the preset control limit, and triggering the crystal shape abnormality alarm when the prediction square error statistics of the crystal exceeds the preset control limit.
[0144] wherein the preset control limit of the Hotelling’s T-square statistics is , and the preset control limit of the prediction square error statistics is .
[0145] Specifically, in the continuous crystallization process, based on the observed image and the shape feature, the Hotelling’s T 2 statistics and the SPE statistics of each crystal are generated in real time by the quality detection module 130. When the Hotelling’s T 2 statistics exceeds its preset control limit or the SPE statistics exceeds its preset control limit , a crystal shape abnormality alarm is triggered, thereby realizing real-time monitoring of the product quality of the continuous crystallization process.
[0146] In some embodiments of the present application, the region containing the crystal in the in-situ image is identified based on a preset deep learning model to form an observed image, which includes:
[0147] S310, segmenting a rectangular region containing a crystal in the in-situ image based on a preset deep learning model.
[0148] S320, deleting the crystal with an area smaller than the area threshold in the rectangular region.
[0149] S330, filling the crystal with internal cavities in the rectangular region.
[0150] S340, deleting the crystal located at the boundary of the rectangular region and with incomplete morphology to form an observed image.
[0151] Wherein, the instance segmentation as a computer vision technology can identify the category of the target in the image and accurately divide the pixel area of each instance, combining the advantages of target detection and semantic segmentation, realizing the fine segmentation and differentiation of individuals of the same object, the instance segmentation calculation method can be applied to the image segmentation model in the preset deep learning model to realize the segmentation of the rectangular area containing the crystal in the in-situ image.
[0152] Specifically, Figure 8 The schematic diagram of the in-situ image processing process provided by the embodiment of the present application is shown in Figure 8 The quality detection module 130 first needs to train the image segmentation model in the preset deep learning model based on a large number of in-situ images collected at different stages of the connecting crystallization process and label all the crystals in each in-situ image. The specific labeling operation is to draw a series of discrete points in a polygonal manner along the edge of each crystal. Generally, the more tortuous the boundary line of the crystal, the more discrete points are needed to reflect the shape of the crystal. The average number of points used to label a crystal is about 30, and the coordinate information of these points is saved to a json format annotation file which contains the specific area position information of each crystal of all image files used for model training. A professional graphics processing unit (GPU) is used to speed up the model training, and the change of the loss function value is tracked during the training process. The early stopping strategy is used to end the model training to avoid overfitting problem. The image segmentation model in the preset deep learning model obtained by training can segment the rectangular area containing the crystal in the in-situ image to obtain image (a), and perform color reconstruction to obtain image (b). In image (b), the background area is represented by black color and the background is represented by white color. In order to improve the reliability of the subsequent crystal shape anomaly detection model, several morphological preprocessing operations need to be performed on the prediction results, specifically including deleting the crystals with an area smaller than an area threshold in the rectangular area to obtain image (c), filling the crystals with internal cavities in the rectangular area to obtain image (d), deleting the crystals located at the boundary of the rectangular area and having incomplete morphology to obtain image (e), and taking image (e) as an observation image. After the above processing steps, the crystal individuals in image (e) are used to extract the shape features corresponding to the crystals, thereby ensuring the accuracy of the extracted shape features corresponding to the crystals.
[0153] Figure 9 The flowchart of another continuous crystallization quality detection method provided by the embodiment of the present application is shown in Figure 9 For the shape anomaly problem of the continuous crystallization product, Figure 9 The technical route for online quality detection is given, which specifically includes the following aspects:
[0154] (1) Online imaging of continuous crystallization process. In-situ images of continuous crystallization process are acquired in real time by imaging probe 120.
[0155] (2) Extracting shape attributes of crystals based on deep learning algorithm. First, a high-precision preset deep learning model is trained based on a training set containing more data, and then the preset deep learning model is used to predict crystals in new samples, and further extract macro-scale shape features (aspect ratio, compactness, circumscribed rectangle proportion, ellipticity, eccentricity) and meso-scale shape features (convexity, circularity, solidity) of these crystals.
[0156] (3) Extracting principal components of shape features by principal component analysis method. Based on eight shape features of a large amount of historical data, eight principal components are extracted by principal component analysis method. At the same time, the evolution curve of cumulative variance explanation rate with principal component number is obtained.
[0157] (4) Obtaining control limits of multivariate statistical process control based on a certain number of principal components. According to the cumulative variance explanation rate curve, the appropriate principal component number is selected. According to the historical data, the control limits of Hotelling’s T 2 statistic and SPE statistic are determined respectively.
[0158] (5) Performing online detection of product quality. Based on the multivariate statistical process control model, the T2 statistic value and the SPE statistic value of each crystal are calculated. If the above value of a particle exceeds its respective control limit, the crystal is determined to be in an abnormal state and an alarm is triggered.
[0159] (6) Establishing multivariate statistical process control models of different quality detection levels by selecting different principal components, so as to meet the quality control requirements of different standards.
[0160] Based on the above technical solutions, a large number of in-situ images of continuous crystallization process are collected online. The training data is divided into training set and test set, which are used for training analysis model and testing model accuracy respectively. Figure 10 The schematic diagram of the cumulative variance explanation rate curve obtained based on the principal component analysis method provided by the embodiment of the present application is shown in FIG. 1. Figure 10As shown, the cumulative variance explained increases rapidly with the number of principal components in the initial stage, and then gradually slows down. The cumulative variance explained by a principal component count of 2 reaches 87.623%, indicating that the corresponding model can effectively reflect the shape information of different particles in the system. The cumulative variance explained by a principal component count of 4 further reaches 96.875%. Multivariate statistical process control models established using different principal component counts essentially correspond to different standards for judging crystal shape anomalies. As the number of principal components increases, the requirements for crystal shape in the corresponding multivariate statistical process control model become higher, leading to more crystals being judged as anomalous particles. However, while improving the anomaly detection rate, it may introduce the problem of "false positives," where a small number of normal crystals (with fewer shape irregularities) are judged as anomalous. Therefore, multivariate statistical process control models corresponding to different principal component counts have different functions, and the specific choice depends on the actual needs.
[0161] Figure 11 T under two principal elements provided in the embodiments of the present invention 2 A schematic diagram of a control chart, such as Figure 11 As shown, the red and blue lines correspond to control limits at 95% and 99% confidence levels, respectively. The 99% confidence level has a larger control limit than the 95% level, corresponding to a higher standard for judging crystal shape anomalies. Therefore, at a 95% confidence level, the multivariate statistical process control model can detect a relatively large number of anomalous samples, i.e., those samples exceeding the control limits.
[0162] Figure 12 This is a schematic diagram of the detection results of two test set images provided in an embodiment of the present invention, as shown below. Figure 12 As shown, Figure 12 Furthermore, the detection results of the corresponding multivariate statistical process control model on the two test images are presented at a confidence level of 95%. In image (A), no abnormalities were detected in any of the crystal particles. In image (B), two crystal particles were detected as abnormal. Comparing these abnormal particles with other particles, their shapes deviated significantly from a circular shape, exhibiting considerable incompleteness and unevenness. The abnormalities detected by the multivariate statistical process control model are consistent with the actual particle shape information. Therefore, the technical solution of this embodiment can effectively detect abnormal particles, thereby providing timely particle quality warnings.
[0163] The main technical innovation points of the continuous crystallization quality detection method of the embodiment of the present application include: an automatic and intelligent detection scheme of crystal product quality based on online microscopic imaging, deep learning image segmentation, principal component analysis and multivariate statistical process control is proposed, and the embodiment of the present application can overcome the consumption of manpower and material resources and the hysteresis of offline detection of continuous crystallization product quality; a method of multivariate statistical control process control is proposed for relatively universal crystal shape single variable monitoring, and a crystal shape evaluation model is established through principal components for multiple different shape attributes, so that the crystal shape information of the continuous crystallization can be more comprehensively reflected; the embodiment of the present application proposes to extract principal components of particle shape by simultaneously using five macro-scale shape features and three meso-scale shape features, three macro-scale shape features are based on the Feret diameter of the particle, and the other two are based on the Legendre ellipse of the particle, three meso-scale shape features consider the circumference and area of the particle, and the principal components extracted through the eight attributes can comprehensively reflect the essential features of the particle shape; the embodiment of the present application proposes to establish multiple multivariate statistical process control models of different quality detection levels by selecting different principal component numbers, and the multivariate statistical process control models of different quality detection levels have different identification standards and sensitivities for particle shape abnormalities, so as to meet the requirements of continuous crystallization product quality detection.
[0164] The continuous crystallization quality detection method of the embodiment of the present application is based on computer vision technology, establishes an online detection platform of continuous crystallization product quality, that is, a continuous crystallization quality detection device, realizes real-time intelligent detection of product shape, and realizes real-time imaging of the continuous crystallization process through the imaging probe of the continuous crystallization quality detection device, accurately segments the crystal individuals in the in-situ image by using the deep learning algorithm, extracts a large number of attributes of the crystal shape, detects abnormal crystals by using the multivariate statistical process control method, extracts principal components by using the principal component analysis, the principal components comprehensively consider the correlation between different shape attributes, can reflect the essential features of the crystal shape, and respectively establish multiple different multivariate statistical process control models by selecting different principal component numbers, so as to meet the requirements of product quality control of different standards. The continuous crystallization quality detection device of the embodiment of the present application provides effective support for the optimization and control of the continuous crystallization process and the development of automation and intelligence.
[0165] Note that the above is only the preferred embodiment of the present application and the technical principle applied. Those skilled in the art will understand that the present application is not limited to the specific embodiments herein, and those skilled in the art can make various obvious changes, readjustments and substitutions without departing from the protection scope of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.
Claims
1. A continuous crystallization quality detection device, characterized in that, The continuous crystallization quality detection device includes a crystallizer, an imaging probe, and a quality detection module; The crystallizer contains a crystallization solution, and the imaging probe is located in the crystallizer and inserted into the crystallization solution; the crystallizer is used to maintain the crystallization environment so that the crystallization solution can continuously crystallize to form crystals; The imaging probe is connected to the quality detection module. The imaging probe is used to capture in-situ images of the crystals during the continuous crystallization process of the crystallization solution in real time and send them to the quality detection module. The quality detection module is used to identify the shape features of each crystal in real time from the in-situ image, form multiple principal elements based on the shape features, and calculate the Hotelling T-squared statistic and the prediction squared error statistic of the crystal based on the multiple principal elements. When the Hotelling T-squared statistic or the prediction squared error statistic exceeds the corresponding preset condition, a crystal shape abnormality alarm is triggered. The shape features include at least one of convexity, roundness, solidity, aspect ratio, compactness, circumscribed rectangle ratio, ellipticity, and eccentricity.
2. The continuous crystallization quality detection device according to claim 1, characterized in that, It also includes a raw material input module and a crystal collection module; The raw material input module is connected to the first port of the crystallizer via a pipe, and the crystal collection module is connected to the second port of the crystallizer via a pipe; The raw material input module is used to input the crystallization solution into the crystallizer, and the crystal collection module is used to collect the crystals after crystallization from the crystallization solution flowing out of the crystallizer.
3. The continuous crystallization quality detection device according to claim 1, characterized in that, It also includes a heating module and a stirring paddle; The heating module is inserted into the crystallization solution inside the crystallizer, and the heating module is used to control the temperature of the crystallization solution inside the crystallizer; the stirring paddle is inserted into the crystallization solution inside the crystallizer, and the stirring paddle is used to stir the crystallization solution inside the crystallizer.
4. The continuous crystallization quality detection device according to claim 1, characterized in that, The imaging probe includes a camera and an observation cavity; The camera is connected to the quality detection module, the camera is located at the first end of the observation cavity, and the second end of the observation cavity is inserted into the crystallization solution; The camera is used to capture in-situ images of the crystals during the continuous crystallization process of the crystallization solution flowing into the observation cavity in real time, and send them to the quality detection module.
5. A method for detecting the quality of continuous crystallization, characterized in that, The continuous crystallization quality detection method is applied in the continuous crystallization quality detection apparatus according to any one of claims 1-4, and the continuous crystallization quality detection method includes: The quality detection module acquires in-situ images of crystals in the continuous crystallization process of the crystallization solution in real time; The quality inspection module identifies the shape features of each crystal in real time from the in-situ image; wherein, the shape features include at least one of convexity, roundness, solidity, aspect ratio, compactness, proportion of circumscribed rectangle, ellipticity and eccentricity; The quality detection module forms multiple principal elements based on the shape features, calculates the Hotelling T-squared statistic and the predicted squared error statistic of the crystal based on the multiple principal elements, and triggers a crystal shape abnormality alarm when the Hotelling T-squared statistic or the predicted squared error statistic exceeds the corresponding preset conditions.
6. The method for detecting the quality of continuous crystallization according to claim 5, characterized in that, The step of identifying the shape features of each crystal in real time from the in-situ image includes: Based on a preset deep learning model, the region containing the crystal in the in-situ image is identified to form an observation image; Identify the shape features of each crystal from the observed images.
7. The method for detecting the quality of continuous crystallization according to claim 6, characterized in that, The step of identifying the shape features of each crystal from the observed image includes: The convexity, roundness, and solidity of each crystal are identified based on the observed images; Based on the maximum and minimum Freret diameters of each crystal in the observed image, the aspect ratio, compactness, and circumscribed rectangle ratio of each crystal are calculated. The aspect ratio of the crystal satisfies the following: ; The compactness of the crystal satisfies: ; The proportion of the outer rectangle of the crystal satisfies: ; Where N1 is the aspect ratio of the crystal, N2 is the compactness of the crystal, N3 is the percentage of the circumscribed rectangle of the crystal, and D max D is the maximum Freette diameter of the crystal. min Let A be the minimum Ferete diameter of the crystal, and A be the area of each crystal in the observed image; The ellipticity and eccentricity of each crystal are calculated based on the major axis length and minor axis length of the Legendre ellipse of each crystal in the observed image. The ellipticity of the crystal satisfies: ; The eccentricity of the crystal satisfies: ; Wherein, N4 is the ellipticity of the crystal, N5 is the eccentricity of the crystal, and L max L is the length of the major axis of the Legendre ellipse of the crystal. min The length of the minor axis of the Legendre ellipse of the crystal is given.
8. The method for continuous crystallization quality detection according to claim 6, characterized in that, The step of identifying the region containing the crystal in the in-situ image based on a preset deep learning model to form an observation image includes: The rectangular region containing the crystal in the in-situ image is segmented based on a preset deep learning model; Delete the crystals in the rectangular region whose area is less than the area threshold; The crystal that fills the rectangular region where there are internal voids; The crystals that are located at the boundary of the rectangular region and have incomplete shapes are deleted to form the observation image.
9. The method for detecting the quality of continuous crystallization according to claim 5, characterized in that, The process involves forming multiple principal elements based on the shape characteristics, calculating the Hotelling T-squared statistic and the prediction squared error statistic of the crystal based on the multiple principal elements, and triggering a crystal shape anomaly alarm when the Hotelling T-squared statistic or the prediction squared error statistic exceeds a corresponding preset condition, including: Multiple principal elements are formed according to the shape features; wherein, each principal element is formed by the shape features of the crystal, each principal element is formed by at least one shape feature, and the number of principal elements is at most 8; Multiple multivariate statistical process control models with different quality detection levels are established by selecting different numbers of the principal components; The shape features corresponding to the crystal are input into the multivariate statistical process control model corresponding to the quality inspection level. The Hotelling T-squared statistic and the predicted squared error statistic of the crystal are calculated. When the Hotelling T-squared statistic and the predicted squared error statistic of the crystal meet the control limits in the multivariate statistical process control model, a crystal shape abnormality alarm is triggered.
10. The method for detecting the quality of continuous crystallization according to claim 9, characterized in that, The step involves inputting the shape characteristics corresponding to the crystal into the multivariate statistical process control model corresponding to the quality inspection level, calculating the Hotelling T-squared statistic and the prediction squared error statistic of the crystal, and triggering a crystal shape anomaly alarm when the Hotelling T-squared statistic and the prediction squared error statistic of the crystal meet the control limits in the multivariate statistical process control model, including: The shape features corresponding to the crystal are input into the multivariate statistical process control model corresponding to the quality inspection level to calculate the Hotelling T-squared statistic and the prediction squared error statistic of the crystal. When the Hotling T-squared statistic of the crystal exceeds the preset control limit, a crystal shape abnormality alarm is triggered. When the predicted squared error statistic of the crystal exceeds the preset control limit, a crystal shape abnormality alarm is triggered.
Citation Information
Patent Citations
Method for analyzing crystal growth shape and size distribution based on real-time image detection technology
CN105931225A
Method for monitoring cubic and columnar crystal three-dimensional size in crystallization process on basis of binocular vision
CN109506569A
In-situ online infrared spectrum monitoring equipment, system and method for crystallization process control
CN113324944A
Calibration modeling and crystal length and width angular point three-dimensional reconstruction method for binocular telecentric camera in crystallization detection process
CN116977441A
Method for detecting length and width of crystal in continuous crystallization process in real time through binocular backlight imaging
CN118967782A