A method and system for chromatograph fault diagnosis and analysis based on data processing

Through data processing and machine learning technology, the problem that chromatograph fault diagnosis relies on manual experience is solved, efficient and accurate fault diagnosis is achieved, automation and intelligence are improved, and labor costs are reduced.

CN118606869BActive Publication Date: 2024-11-19HANGZHOU XIECE INFORMATION TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411055610.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-02
Publication Date
2024-11-19
Estimated Expiration
2044-08-02

AI Technical Summary

Technical Problem

The fault diagnosis of existing chromatographs depends on manual experience, low level of automation and intelligence, low efficiency, difficult to detect potential fault modes, insufficient accuracy, resulting in inaccuracy of diagnostic results and high labor costs.

Method used

Using a data processing-based method, the chromatograph run data is obtained for preprocessing, a similarity matrix is ​​generated, the improved clustering algorithm is used to cluster, the density center and dispersion is calculated, the fault feature vector is constructed, and the machine learning classification model is automatically diagnosed. Fault type.

Benefits of technology

It improves the automation and intelligence level of chromatograph fault diagnosis, accurately obtains the chromatogram peak area, discovers potential fault modes, reduces human resources requirements, and improves the accuracy and reliability of diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118606869B_ABST
    Figure CN118606869B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of fault diagnosis, and discloses a chromatograph fault diagnosis and analysis method and system based on data processing; the method comprises: obtaining operation data of the chromatograph at n time points, and preprocessing the operation data to obtain standardized operation data; generating a similarity matrix based on the standardized operation data; clustering the standardized operation data based on the similarity matrix using an improved clustering algorithm to obtain N clustering clusters; calculating the density center and dispersion of each clustering cluster, and constructing a fault feature vector based on the density center and dispersion; classifying the fault feature vector using a pre-constructed classification model, obtaining the fault type and sending it to a control terminal, making a complex fault diagnosis process intelligent, and enabling operators to easily and quickly obtain diagnosis results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of fault diagnosis, and more specifically, to a chromatograph fault diagnosis and analysis method and system based on data processing. Background Art

[0002] The patent with application publication number CN115267035A discloses a chromatograph fault diagnosis and analysis method and system, which relates to the field of data processing technology. A plurality of chromatograms to be analyzed corresponding to a plurality of chromatographs to be diagnosed are obtained. The plurality of chromatograms to be analyzed are obtained by detecting the same target detection object by the plurality of chromatograms to be diagnosed. For every two chromatograms to be analyzed in the plurality of chromatograms to be analyzed, a chromatogram comparison and analysis process is performed on the two chromatograms to be analyzed to output the chromatogram correlation between the two chromatograms to be analyzed. According to the chromatogram correlation between every two chromatograms to be analyzed in the plurality of chromatograms to be analyzed, a fault state determination process is performed on the plurality of chromatograms to be diagnosed to output a fault state determination result corresponding to each chromatogram to be diagnosed, which is used to reflect whether there is a fault, and can improve the reliability of the chromatogram fault diagnosis and analysis to a certain extent.

[0003] However, the existing chromatograph fault diagnosis process is still highly dependent on manual experience, with a low level of automation and intelligence. Operators need to spend a lot of manpower and time resources to analyze and judge faults, which is inefficient and has a high threshold. In addition, when obtaining key features such as chromatographic peak area, the accuracy is insufficient and the information contained in the original chromatographic data cannot be fully utilized, resulting in an insufficient foundation for subsequent fault diagnosis and affecting the accuracy and reliability of the diagnostic results. Secondly, it is difficult to discover potential fault modes from the data of complex chromatograph operations, which brings obstacles to subsequent fault identification and classification. Finally, the existing chromatograph fault diagnosis mainly relies on fault diagnosis methods based on empirical rules, which brings high labor costs and work intensity to the laboratory's chromatographic analysis work, and is inefficient.

[0004] In view of this, the present invention proposes a chromatograph fault diagnosis and analysis method and system based on data processing to solve the above problems. Summary of the invention

[0005] In order to overcome the above-mentioned defects of the prior art and to achieve the above-mentioned purpose, the present invention provides the following technical solution: A chromatograph fault diagnosis and analysis method based on data processing, comprising: S1, obtaining the operation data of the chromatograph at n time points, and preprocessing the operation data to obtain standardized operation data;

[0006] S2, generating a similarity matrix based on the standardized operation data;

[0007] S3, based on the similarity matrix, using the improved clustering algorithm to cluster the standardized operation data to obtain N clusters;

[0008] S4. Calculate the density center and dispersion of each cluster, and construct a fault feature vector based on the density center and dispersion; use the pre-built classification model to classify the fault feature vector, obtain the fault type and send it to the control terminal.

[0009] Furthermore, the operating data includes chromatographic peak area, retention time, baseline noise, column temperature, flow rate and pressure.

[0010] Furthermore, the method for obtaining the chromatographic peak area includes:

[0011] Get the original chromatographic data and convert the original chromatographic data Taking the first-order derivative we get ; is the data index in the original chromatographic data;

[0012] Set the first derivative threshold ;like , then Marked as a peak segment; if , then Mark as baseline segment; get baseline segment data Peak segment data ;

[0013] Baseline segment data Peak segment data Perform convolution smoothing respectively to obtain smoothed baseline segment data and smoothed peak data ; The smoothed baseline segment data and smoothed peak data Merging to obtain smoothed chromatographic data; performing baseline correction on the smoothed chromatographic data to obtain corrected chromatographic data;

[0014] An image binarization algorithm is applied to convert the corrected chromatographic data into a binary image, in which the peak area is the foreground area and the baseline is the background area; all connected foreground areas are marked in the binary image, and each connected foreground area is the corresponding candidate chromatographic peak;

[0015] For a candidate chromatographic peak, extract a set of its boundary points, which is recorded as a boundary point set; regard the candidate chromatographic peak as a discrete two-dimensional curve, whose abscissa is the retention time corresponding to the candidate chromatographic peak, and whose ordinate is the peak intensity;

[0016] The candidate chromatographic peaks are divided into n3 intervals with equal spacing according to retention time; in each interval, three equally spaced nodes are selected and recorded as , and ; then the area of ​​the candidate chromatographic peak in the interval ; Sum the areas of all intervals to get the chromatographic peak area.

[0017] Furthermore, the smoothed baseline segment data ;in, is the baseline segment window function, is the variable index of the baseline segment window function; Indicates that the input raw chromatographic data is in The value at the position;

[0018] Baseline Segment Window Function ;in, is the window width of the baseline segment window function;

[0019] The smoothed peak segment data ;in, is the peak window function, is the variable index of the peak window function; Indicates that the input raw chromatographic data is in The value at the position;

[0020] Peak window function ,in, is the adaptive standard deviation function;

[0021] Adaptive standard deviation function ;in, , and is an adaptive parameter.

[0022] Furthermore, the method of performing baseline correction on the smoothed chromatographic data includes:

[0023] According to the range of retention time of the smoothed chromatographic data, it is divided into m1 time periods; the division method of the time period includes:

[0024] Define the baseline change evaluation function ;in, To smooth the chromatographic data at time points The data at For at time point Local fitting function at ;

[0025] Preset change threshold ,when , then the time period To divide, start from the starting point of the smoothed chromatogram data, move the endpoints, and continuously calculate , when greater than Determine the end boundary of a time period ; Repeat until the entire retention time range is covered, and m1 time periods are obtained;

[0026] The first-order derivative of the smoothed chromatographic data at each time point is calculated as the corresponding time point Baseline change rate ;

[0027] Preset rate of change threshold ;like In time period If it continues to hold for a period of time, then define the time period It is a flat section;

[0028] Perform linear regression on the smoothed chromatographic data of each time period to obtain the fitting straight line equation , and calculate the smoothed chromatographic data and the corresponding fitting straight line equation The residual between , if the residual In time period The mean is infinitely close to 0 and the residual In time period If the standard deviation within a period is less than the preset standard deviation threshold, the defined time period is a linear segment;

[0029] If a time period is neither defined as a flat segment nor a linear segment, it is defined as a curve segment; for a flat segment, a constant baseline model is used to fit the smoothed chromatogram data of the corresponding time period; for a linear segment, a first-order polynomial model is used to fit the smoothed chromatogram data of the corresponding time period; for a curve segment, a high-order polynomial nonlinear model is used to fit the smoothed chromatogram data of the corresponding time period; and a baseline curve of the corresponding time period is obtained;

[0030] The endpoint values ​​and first-order derivative values ​​of the baseline curve of each time period are smoothly spliced ​​to obtain an overall smooth baseline curve;

[0031] The overall smooth baseline curve is deducted from the smoothed chromatographic data and normalized, that is, the baseline correction is completed to obtain the corrected chromatographic data.

[0032] Furthermore, the method of preprocessing the operating data is time series alignment; the method of time series alignment includes:

[0033] Take the running data at any time point as a time series, extract the shape feature vector for each time series, calculate the Euclidean distance between the shape feature vectors of n time series, and record it as shape similarity; get an n×n shape similarity matrix Ms, and the elements in the shape similarity matrix Ms are shape similarities;

[0034] For each time series, calculate the average shape similarity between it and all other time series, and select the time series with the largest average value as the reference series. ;

[0035] For all but the reference sequence The time series S outside is divided into K subsequences, corresponding to Also divided into K subsequences; for each subsequence corresponding to the time series S , calculate it with The similarity of the corresponding subsequences ;in, for and The DTW distance between them; for and The maximum possible DTW distance between them;

[0036] Define each subsequence The tensile compression coefficient ;in, is a hyperparameter;

[0037] Based on the stretching and compression coefficient, each subsequence To stretch and compress, The length is lk, and the length after stretching and compression is ; All stretched and compressed subsequences are spliced ​​to obtain standardized running data.

[0038] Furthermore, the similarity matrix is ​​generated in the following manner:

[0039] Construct a 6-dimensional feature space. For each time point, take the standardized running data of the time point as a 6-dimensional vector, and map each 6-dimensional vector to a data point in the 6-dimensional feature space.

[0040] For any two data points at time and , calculate the distance between them ; Create a (n+1)×(n+1) matrix ,matrix Elements in Indicates from arrive Minimum cumulative distance of; initial setting , and is infinite;

[0041] distance ,in, For data points in dimension The weight of For data points In Dimension The data value of For data points In Dimension The data value of

[0042] Dynamically populating a matrix , the filling formula is:

[0043] ;in, Indicates from arrive The minimum cumulative distance, Indicates from arrive The minimum cumulative distance, Indicates from arrive The minimum cumulative distance of

[0044] from Start back to , set a bandwidth parameter ET, for any data point , in the process of backtracking only when When , the data point It is regarded as a valid point and is allowed to be visited during the backtracking process to find the optimal alignment path;

[0045] Based on the optimal alignment path, the similarity score between two data points is calculated, and the similarity score is the inverse of the cumulative distance of the optimal alignment path;

[0046] Create an n×n similarity matrix SY, where the elements are the similarity scores between data points, that is, the generation of the similarity matrix is ​​completed;

[0047] Furthermore, the clustering method includes:

[0048] The input of the clustering algorithm is defined as standardized running data, similarity matrix SY and density threshold den; the output is N clusters;

[0049] For each data point x_g, obtain its density. The density can be obtained by:

[0050] Based on the similarity matrix SY, a similarity threshold is preset, all other data points whose similarity scores with x_g are greater than the similarity threshold are extracted, and the sum of their similarities with x_g is calculated as the density;

[0051] All data points with density greater than the density threshold den are marked as cluster center points; for each non-center point, the most similar center point is found based on the similarity matrix SY and recorded as the nearest neighbor center;

[0052] Create a new empty cluster, and for each non-center point, add it to the cluster containing its nearest neighbor center; repeat until all non-center points are assigned to a cluster;

[0053] Calculate the maximum link similarity SHG(C1, C2) between any two clusters C1 and C2;

[0054] If SHG (C1, C2) is greater than or equal to the density threshold den, C1 and C2 are merged into a new cluster; repeat until no more clusters can be merged, and N clusters are obtained;

[0055] The density threshold den is defined in the following ways:

[0056] For each data point x_g, calculate its distance to the Lth nearest neighbor d_L(x_g), denoted as L-distance;

[0057] Collect the L-distances of all data points, draw an L-distance distribution curve or histogram, find the valley bottom position that separates the double peaks on the L-distance distribution curve, and record it as d_v; set the density threshold den to d_v.

[0058] Furthermore, the calculation formula of the density center is:

[0059] ;in, Cluster The density center of Cluster The data points within for The weight of

[0060] ;in, express With the cluster The centroid The distance between is the scaling parameter;

[0061] The corresponding clusters are calculated based on the density center The dispersion of ;

[0062] ,in, Indicates taking the median; concatenate the density center and the dispersion at the vector level to obtain the fault feature vector corresponding to each cluster;

[0063] The method for obtaining the fault type includes:

[0064] Obtain historical fault data and its corresponding fault category labels, and construct the historical fault data into fault feature vectors in batches, which are recorded as historical fault feature vectors;

[0065] The historical fault feature vectors with fault category labels are randomly divided into training sets and test sets. Based on the fault category labels, K fault categories are obtained, and the prior probability of each fault category and the conditional probability of each historical fault feature vector corresponding to the fault category are calculated.

[0066] Based on the prior probability and conditional probability, a preliminary classification model is constructed. For a given historical fault feature vector , the classification model calculates ;in, Indicates the historical fault feature vector Under the condition that The probability of Indicates that the known sample belongs to the fault category Under the condition of The probability of is the prior probability, indicating that the sample belongs to the fault category The probability of Represents the observed historical fault feature vector probability;

[0067] Select The largest failure category As the historical fault feature vector The prediction output; use the training set to train the preliminary classification model, define the loss function of the preliminary classification model, and use the test set to evaluate the constructed preliminary classification model. The evaluation method is to calculate the value of the loss function. If the value of the loss function does not decrease for pL consecutive times, save the preliminary classification model at this time as the final classification model; input the fault feature vector into the classification model to obtain the corresponding fault type.

[0068] A chromatograph fault diagnosis and analysis system based on data processing, which is used to implement the chromatograph fault diagnosis and analysis method based on data processing, comprising: a data acquisition and processing module, which is used to obtain the operation data of the chromatograph at n time points, and pre-process the operation data to obtain standardized operation data;

[0069] Matrix fitting module, which generates similarity matrix based on standardized running data;

[0070] The clustering module clusters the standardized operation data using an improved clustering algorithm based on the similarity matrix to obtain N clusters;

[0071] The fault judgment module is used to calculate the density center and dispersion of each cluster, and construct a fault feature vector based on the density center and dispersion; classify the fault feature vector using a pre-built classification model, obtain the fault type and send it to the control terminal. The modules are connected by wired and / or wireless means.

[0072] The technical effects and advantages of the present invention are as follows:

[0073] The present invention improves the automation and intelligence level of chromatograph fault diagnosis, obtains the chromatographic peak area in the data more accurately, obtains the area value of the chromatographic peak with high precision, lays a foundation for subsequent fault diagnosis, and standardizes the multi-dimensional operation data of the chromatograph by means of time series alignment. It is capable of discovering potential fault modes from the standardized operation data, constructing fault feature vectors, and establishing a fault classification model based on machine learning. It is capable of automatically classifying the fault feature vectors and giving fault type diagnosis results. The analysis dimension is more comprehensive, and the fault diagnosis is more accurate and reliable. The complex fault diagnosis process is made intelligent, so that operators can easily and quickly obtain diagnosis results, which greatly reduces the usage threshold and releases human resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] Figure 1 A schematic diagram of a chromatograph fault diagnosis and analysis method based on data processing of the present invention;

[0075] Figure 2 The present invention is a schematic diagram of a chromatograph fault diagnosis and analysis system based on data processing. DETAILED DESCRIPTION

[0076] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0077] Example 1

[0078] See also Figure 1 As shown, the chromatograph fault diagnosis and analysis method based on data processing described in this embodiment includes:

[0079] S1. Obtaining the operating data of the chromatograph at n time points, and preprocessing the operating data to obtain standardized operating data;

[0080] S2, generating a similarity matrix based on the standardized operation data;

[0081] S3, based on the similarity matrix, using the improved clustering algorithm to cluster the standardized operation data to obtain N clusters;

[0082] S4. Calculate the density center and dispersion of each cluster, and construct a fault feature vector based on the density center and dispersion; use the pre-built classification model to classify the fault feature vector, obtain the fault type and send it to the control terminal.

[0083] Specifically, the operating data include chromatographic peak area, retention time, baseline noise, column temperature, flow rate and pressure.

[0084] Retention time refers to the retention time of the sample in the chromatographic column. Changes in retention time may mean problems such as aging of the chromatographic column and changes in the mobile phase composition. Usually, the injection moment is used as the time reference point, and a detector (such as an ultraviolet detector, fluorescence detector, etc.) is used to continuously monitor and record changes in signal intensity at the outlet of the chromatographic column. For each chromatographic peak that appears, a response signal peak will be generated in the detector. For each chromatographic peak signal, the time distance of its peak apex (or center of mass) relative to the time reference point is measured, which is the retention time of the chromatographic peak.

[0085] Baseline noise refers to the fluctuation of background signals on the chromatogram; excessive noise may mean instrument failure, contamination or other interference factors; it is obtained by recording the baseline signal for a period of time as the noise baseline before sample injection, sampling the baseline signal using a high-resolution analog-to-digital converter (ADC), and comparing the collected baseline signal with the noise baseline to obtain the baseline noise.

[0086] Column temperature (obtained through a temperature sensor) will affect separation efficiency and retention time; abnormal column temperature may cause problems such as peak distortion and decreased separation; changes in flow rate (obtained through a differential pressure flowmeter) will affect retention time and separation, and abnormal flow rate may be caused by pump failure, pipe blockage, etc.; changes in pressure (obtained through a strain gauge pressure sensor) may mean blockage, leakage or other failures.

[0087] The method for obtaining the chromatographic peak area includes:

[0088] Obtain the original chromatographic data (using a detector such as a UV detector, a fluorescence detector, etc., to continuously monitor and record the signal intensity changes at the outlet of the chromatographic column to obtain the original chromatographic data). Segment it into two parts: baseline segment data and peak segment data; specifically, the original chromatographic data Taking the first-order derivative we get ; is the data index in the original chromatographic data;

[0089] Set the first derivative threshold ;like , then Marked as a peak segment; if , then Mark as baseline segment; get baseline segment data Peak segment data .

[0090] Baseline segment data Peak segment data Perform convolution smoothing respectively to obtain smoothed baseline segment data and smoothed peak data .

[0091] ;in, is the baseline segment window function, is the variable index of the baseline segment window function, which is used to traverse the entire value range of the baseline segment window function; In convolution smoothing, the raw chromatographic data represented by the input is The value at position.

[0092] Baseline Segment Window Function ;in, It is the window width of the baseline segment window function, usually an odd number.

[0093] ;in, is the peak window function, It is the variable index of the peak window function, which is used to traverse the entire value range of the peak window function; In convolution smoothing, the raw chromatographic data represented by the input is The value at position.

[0094] Peak window function ,in, is the adaptive standard deviation function;

[0095] Adaptive standard deviation function ;in, , and As an adaptive parameter, it needs to be adjusted and optimized according to the actual situation.

[0096] The smoothed baseline segment data and smoothed peak data Merge to obtain smooth chromatographic data.

[0097] The smoothed chromatographic data is baseline corrected to obtain corrected chromatographic data; specifically, the smoothed chromatographic data is divided into m1 time periods according to the retention time range of the smoothed chromatographic data.

[0098] The time periods may be divided into the following ways:

[0099] Define the baseline change evaluation function , used to evaluate the time period The degree of change in the internal baseline;

[0100] ;in, To smooth the chromatographic data at time points The data at For at time point Local fitting function at ;

[0101] Preset change threshold ,when , then the time period To divide, start from the starting point of the smoothed chromatogram data, move the endpoints, and continuously calculate , when greater than Determine the end boundary of a time period ; Repeat until the entire retention time range is covered, and m1 time periods are obtained.

[0102] The first-order derivative of the smoothed chromatographic data at each time point is calculated as the corresponding time point Baseline change rate ;

[0103] Preset rate of change threshold ;like In time period If it continues to hold for a period of time, then define the time period It is a flat section;

[0104] Perform linear regression on the smoothed chromatographic data of each time period to obtain the fitting straight line equation , and calculate the smoothed chromatographic data and the corresponding fitting straight line equation The residual between , if the residual In time period The mean is infinitely close to 0 and the residual In time period If the standard deviation within is less than the preset standard deviation threshold λ, then the time period is defined is a linear segment.

[0105] If the time period is neither defined as a flat segment nor a linear segment, it is defined as a curve segment; for the flat segment time period, a constant baseline model is used (a constant function is used to fit the smoothed chromatogram data of the time period) to fit the smoothed chromatogram data of the corresponding time period; for the linear segment time period, a first-order polynomial model is used (a first-order polynomial function is used to fit the smoothed chromatogram data of the time period) to fit the smoothed chromatogram data of the corresponding time period; for the curve segment time period, a high-order polynomial nonlinear model is used (a high-order polynomial function (such as quadratic, cubic, etc.) is used to fit the smoothed chromatogram data of the time period); the baseline curve of the corresponding time period is obtained; it should be explained that the fitting process uses the least squares method to estimate the model parameters and fit the baseline curve of the corresponding time period.

[0106] For the smoothed chromatographic data of each time period, preliminary peak detection is first performed to identify potential peak areas. In the process of fitting the smoothed chromatographic data, the data points in the detected peak areas are temporarily shielded and do not participate in the fitting.

[0107] The endpoint values ​​and first-order derivative values ​​of the baseline curve of each time period are smoothly spliced ​​to obtain an overall smooth baseline curve.

[0108] It should be noted that at the junction of adjacent segments, the two baseline curves may be discontinuous and require transition processing. For example, the two baselines may be weighted averaged in the junction area, with the weight determined by the distance.

[0109] The final smooth baseline curve is deducted from the smoothed chromatographic data and normalized, that is, the baseline correction is completed to obtain the corrected chromatographic data.

[0110] An image binarization algorithm is applied to convert the corrected chromatographic data into a binary image, in which the peak area is the foreground area and the baseline is the background area; all connected foreground areas are marked in the binary image, and each connected foreground area is the corresponding candidate chromatographic peak.

[0111] For the candidate chromatographic peak, extract the set of its boundary points, record it as the boundary point set (including the coordinate values ​​of the candidate chromatographic peak at each retention time point); as the description of the position and shape of the peak;

[0112] The candidate chromatographic peak is taken as a discrete two-dimensional curve, the abscissa of which is the retention time corresponding to the candidate chromatographic peak, and the ordinate is the peak intensity.

[0113] The candidate chromatographic peaks are divided into n3 intervals with equal spacing according to retention time; in each interval, three equally spaced nodes are selected and recorded as , and ; then the area of ​​the candidate chromatographic peak in the interval ; Sum the areas of all intervals to get the chromatographic peak area.

[0114] Furthermore, the operation data is preprocessed by time series alignment. The time series alignment method includes:

[0115] The operating data at any time point is regarded as a time series. Specifically, among the operating data collected at n time points, each time point actually corresponds to a complete time series, containing data in multiple dimensions (such as chromatographic peak area, retention time, baseline noise, etc.).

[0116] For each time series, a shape feature vector (a vector consisting of the weighted sum of kurtosis, skewness and mean curvature) is extracted, and the Euclidean distance between the shape feature vectors of n time series is calculated, which is recorded as shape similarity; an n×n shape similarity matrix Ms is obtained, and the elements in the shape similarity matrix Ms are shape similarities.

[0117] For each time series, calculate the average shape similarity between it and all other time series, and select the time series with the largest average value as the reference series. .

[0118] For all but the reference sequence The time series S outside is divided into K subsequences, corresponding to Also divided into K subsequences; for each subsequence corresponding to the time series S , calculate it with The similarity of the corresponding subsequences ;in, for and The DTW distance between them; for and The maximum possible DTW distance between them.

[0119] Define each subsequence The tensile compression coefficient ;in is a hyperparameter that controls the maximum stretching and compression amplitude; when hour, , without stretching or compression; when hour, , maximum tensile and compressive amplitude.

[0120] Each subsequence sk is stretched and compressed based on the stretching and compression coefficient. Specifically, The length is , the length after stretching and compression is ; All stretched and compressed subsequences are spliced ​​to obtain the aligned sequence S', that is, the time series alignment is completed and the standardized running data is obtained.

[0121] Furthermore, the similarity matrix is ​​generated by:

[0122] A 6-dimensional feature space is constructed. For each time point, the standardized running data of the time point is taken as a 6-dimensional vector, and each 6-dimensional vector is mapped to a data point in the 6-dimensional feature space.

[0123] For any two data points at time and , calculate the distance between them ; Create a (n+1)×(n+1) matrix , the initial setting matrix Elements in , and is infinite; Indicates from arrive The minimum cumulative distance.

[0124] distance ,in, For data points in dimension The weights are used to adjust the importance of features in different dimensions; For data points In Dimension The data value of For data points In Dimension The data value of .

[0125] Dynamically populating a matrix , the filling formula is:

[0126] ;in, Indicates from arrive The minimum cumulative distance, Indicates from arrive The minimum cumulative distance, Indicates from arrive The minimum cumulative distance of

[0127] from Start back to , set a bandwidth parameter ET to control the maximum deviation distance between the alignment path and the diagonal line; for any data point , in the process of backtracking only when When the data point Only then are they considered valid points and are allowed to be visited during the backtracking process; find the optimal alignment path.

[0128] Based on the optimal alignment path, the similarity score between two data points is calculated, and the similarity score is the inverse of the cumulative distance of the optimal alignment path;

[0129] Create an n×n similarity matrix SY, where the elements are the similarity scores between data points, and the generation of the similarity matrix is ​​completed.

[0130] Furthermore, the clustering method includes:

[0131] The input of the clustering algorithm is defined as standardized running data, similarity matrix SY and density threshold den, which is used to control the tightness of clustering; the output is N clusters.

[0132] For each data point x_g, obtain its density. The density can be obtained by:

[0133] Based on the similarity matrix SY, a similarity threshold is preset, all other data points whose similarity scores with x_g are greater than the similarity threshold are extracted, and the sum of their similarities with x_g is calculated as the density.

[0134] All data points with density greater than the density threshold den are marked as cluster center points; for each non-center point, the most similar center point is found based on the similarity matrix SY and recorded as the nearest neighbor center.

[0135] Create a new empty cluster, and for each non-center point, add it to the cluster containing its nearest neighbor center; repeat until all non-center points are assigned to a cluster;

[0136] Calculate the maximum link similarity SHG(C1, C2) between any two clusters C1 and C2 (i.e., the similarity score between the two most distant data points in the two clusters).

[0137] If SHG(C1, C2) is greater than or equal to the density threshold den, C1 and C2 are merged into a new cluster; repeat until no more clusters can be merged, and N clusters are obtained, each cluster containing similar standardized running data points.

[0138] The density threshold den is defined in the following ways:

[0139] For each data point x_g, calculate the distance d_L(x_g) from it to the Lth nearest neighbor (for each data point x, calculate the distance from it to all other data points, sort them from small to large, and take the Lth nearest neighbor data point), denoted as L-distance, where the value of L is usually small, such as L=4 or L=7.

[0140] Collect the L-distances of all data points and draw an L-distance distribution curve or histogram. On the L-distance distribution curve, find the valley bottom that separates the two peaks, denoted as d_v. It should be noted that the L-distance distribution curve is a bimodal distribution, in which the smaller peak corresponds to the denser cluster and the larger peak corresponds to the sparser noise points. Set the density threshold den to d_v.

[0141] Furthermore, the calculation formula of the density center is:

[0142] ;in, Cluster The density center of Cluster The data points within for The weight of

[0143] ;in, express With the cluster The centroid The distance between is a scaling parameter that controls the decay rate of the weight. A higher value will cause the weight to decay faster with distance, and a lower value will cause the weight to decay slower.

[0144] The corresponding clusters are calculated based on the density center The dispersion of ;

[0145] ,in, Indicates taking the median; the density center and the dispersion are concatenated at the vector level to obtain the fault feature vector corresponding to each cluster.

[0146] Furthermore, the method of obtaining the fault type includes:

[0147] Obtain historical fault data (the data type is the same as the operating data) and its corresponding fault category labels, and construct the historical fault data into fault feature vectors in batches, which are recorded as historical fault feature vectors.

[0148] The historical fault feature vectors with fault category labels are randomly divided into training sets and test sets, and the ratio can be set to 7:3 or other reasonable ratios.

[0149] Based on the fault category labels, K fault categories are obtained, and the prior probability of each fault category and the conditional probability of each historical fault feature vector corresponding to the fault category are calculated; the prior probability is estimated by the sample proportion of each fault category in the training set, and the conditional probability obeys Gaussian distribution.

[0150] Based on the prior probability and conditional probability, a preliminary classification model is constructed. For a given historical fault feature vector , the classification model calculates ;in, Indicates the historical fault feature vector Under the condition that The probability of Indicates that the known sample (historical fault feature vector) belongs to the fault category Under the condition of The probability of (the conditional probability distribution estimated from the training data), is the prior probability, indicating that the sample belongs to the fault category The probability of , without considering any feature information, is calculated based on the proportion of samples in each category. is the evidence probability, indicating that the historical fault feature vector is observed The probability of is independent of the fault category and is the same constant value for all fault categories, so it can be ignored when comparing the probabilities of different fault categories.

[0151] Select The largest failure category As the historical fault feature vector The prediction output; use the training set to train the preliminary classification model, define the loss function of the preliminary classification model (such as the cross entropy loss function), and use the test set to evaluate the constructed preliminary classification model. The evaluation method is to calculate the value of the loss function. If the value of the loss function does not decrease for pL consecutive times, save the preliminary classification model at this time as the final classification model; input the fault feature vector into the classification model to obtain the corresponding fault type.

[0152] This embodiment improves the automation and intelligence level of chromatograph fault diagnosis, obtains the chromatographic peak area in the data more accurately, obtains the area value of the chromatographic peak with high precision, and lays a foundation for subsequent fault diagnosis. The multi-dimensional operation data of the chromatograph is standardized by means of time series alignment, and potential fault modes can be discovered from the standardized operation data, and fault feature vectors can be constructed. A fault classification model is established based on machine learning, which can automatically classify the fault feature vectors and provide fault type diagnosis results. The analysis dimension is more comprehensive, and the fault diagnosis is more accurate and reliable. The complex fault diagnosis process is made intelligent, so that operators can easily and quickly obtain diagnosis results, which greatly reduces the usage threshold and releases human resources.

[0153] Example 2

[0154] See also Figure 2 As shown, the part not described in detail in this embodiment is described in Example 1, and a chromatograph fault diagnosis and analysis system based on data processing is provided, comprising:

[0155] A data acquisition and processing module is used to obtain the operating data of the chromatograph at n time points and pre-process the operating data to obtain standardized operating data;

[0156] Matrix fitting module, which generates similarity matrix based on standardized running data;

[0157] The clustering module clusters the standardized operation data using an improved clustering algorithm based on the similarity matrix to obtain N clusters;

[0158] The fault judgment module is used to calculate the density center and dispersion of each cluster, and construct a fault feature vector based on the density center and dispersion; the fault feature vector is classified using a pre-built classification model, the fault type is obtained and sent to the control terminal, and each module is connected by wired and / or wireless means to realize data transmission between modules.

[0159] Example 3

[0160] This embodiment discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the operation mode of the chromatograph fault diagnosis and analysis method based on data processing provided above is implemented.

[0161] Since the electronic device introduced in this embodiment is an electronic device used to implement a chromatograph fault diagnosis and analysis method based on data processing in the embodiment of the present application, based on the chromatograph fault diagnosis and analysis method based on data processing introduced in the embodiment of the present application, the technical personnel of the field can understand the specific implementation of the electronic device of the present embodiment and its various variations, so how the electronic device implements the method in the embodiment of the present application is not described in detail here. As long as the technical personnel of the field implement the electronic device used in the chromatograph fault diagnosis and analysis method based on data processing in the embodiment of the present application, it belongs to the scope of protection of the present application.

[0162] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters and thresholds in the formula are set by technicians in this field according to actual conditions.

[0163] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technical users in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A chromatograph fault diagnosis and analysis method based on data processing, characterized in that: include: S1. Obtaining the operating data of the chromatograph at n time points, and preprocessing the operating data to obtain standardized operating data; S2, generating a similarity matrix based on the standardized operation data; S3, based on the similarity matrix, using the improved clustering algorithm to cluster the standardized operation data to obtain N clusters; S4, calculating the density center and dispersion of each cluster, and constructing a fault feature vector based on the density center and dispersion; use The pre-built classification model classifies the fault feature vector, obtains the fault type and sends it to the control terminal; The clustering method includes: The input of the clustering algorithm is defined as standardized running data, similarity matrix SY and density threshold den; the output is N clusters; For each data point x_g, obtain its density. The density can be obtained by: Based on the similarity matrix SY, a similarity threshold is preset, all other data points whose similarity scores with x_g are greater than the similarity threshold are extracted, and the sum of their similarities with x_g is calculated as the density; All data points with density greater than the density threshold den are marked as cluster center points; for each non-center point, the most similar center point is found based on the similarity matrix SY and recorded as the nearest neighbor center; Create a new empty cluster, and for each non-center point, add it to the cluster containing its nearest neighbor center; repeat until all non-center points are assigned to a cluster; Calculate the maximum link similarity SHG(C1, C2) between any two clusters C1 and C2; If SHG (C1, C2) is greater than or equal to the density threshold den, C1 and C2 are merged into a new cluster; repeat until no more clusters can be merged, and N clusters are obtained; The density threshold den is defined in the following ways: For each data point x_g, calculate its distance to the Lth nearest neighbor d_L(x_g), denoted as L-distance; Collect the L-distances of all data points, draw an L-distance distribution curve or histogram, find the valley bottom position that separates the double peaks on the L-distance distribution curve, and record it as d_v; set the density threshold den to d_v.

2. The method for chromatograph fault diagnosis and analysis based on data processing according to claim 1, characterized in that: The operating data include chromatographic peak area, retention time, baseline noise, column temperature, flow rate and pressure.

3. The method for chromatograph fault diagnosis and analysis based on data processing according to claim 2 is characterized in that: The method for obtaining the chromatographic peak area includes: Get the original chromatographic data and convert the original chromatographic data Taking the first-order derivative we get ; is the data index in the original chromatographic data; Set the first derivative threshold ;like , then Marked as a peak segment; if , then Mark as baseline segment; get baseline segment data Peak segment data ; Baseline segment data Peak segment data Perform convolution smoothing respectively to obtain smoothed baseline segment data and smoothed peak data ; The smoothed baseline segment data and smoothed peak data Merging to obtain smoothed chromatographic data; performing baseline correction on the smoothed chromatographic data to obtain corrected chromatographic data; An image binarization algorithm is applied to convert the corrected chromatographic data into a binary image, in which the peak area is the foreground area and the baseline is the background area; all connected foreground areas are marked in the binary image, and each connected foreground area is the corresponding candidate chromatographic peak; For a candidate chromatographic peak, extract a set of its boundary points, which is recorded as a boundary point set; regard the candidate chromatographic peak as a discrete two-dimensional curve, whose abscissa is the retention time corresponding to the candidate chromatographic peak, and whose ordinate is the peak intensity; The candidate chromatographic peaks are divided into n3 intervals with equal spacing according to retention time; in each interval, three equally spaced nodes are selected and recorded as , and ; then the area of ​​the candidate chromatographic peak in the interval ; Sum the areas of all intervals to get the chromatographic peak area.

4. The method for chromatograph fault diagnosis and analysis based on data processing according to claim 3 is characterized in that: The smoothed baseline segment data ;in, is the baseline segment window function, is the variable index of the baseline segment window function; Indicates that the input raw chromatographic data is in The value at the position; Baseline Segment Window Function ;in, is the window width of the baseline segment window function; The smoothed peak segment data ;in, is the peak window function, is the variable index of the peak window function; Indicates that the input raw chromatographic data is in The value at the position; Peak window function ,in, is the adaptive standard deviation function; Adaptive standard deviation function ;in, , and is an adaptive parameter.

5. The method for chromatograph fault diagnosis and analysis based on data processing according to claim 4 is characterized in that: The method of performing baseline correction on the smoothed chromatographic data comprises: According to the range of retention time of the smoothed chromatographic data, it is divided into m1 time periods; the division method of the time period includes: Define the baseline change evaluation function ;in, To smooth the chromatographic data at time points The data at For at time point Local fitting function at ; Preset change threshold ,when , then the time period To divide, start from the starting point of the smoothed chromatogram data, move the endpoints, and continuously calculate , when greater than Determine the end boundary of a time period ; Repeat until the entire retention time range is covered, and m1 time periods are obtained; The first-order derivative of the smoothed chromatographic data at each time point is calculated as the corresponding time point Baseline change rate ; Preset rate of change threshold ;like In time period If it continues to hold for a period of time, then define the time period It is a flat section; Perform linear regression on the smoothed chromatographic data of each time period to obtain the fitting straight line equation , and calculate the smoothed chromatographic data and the corresponding fitting straight line equation The residual between , if the residual In time period The mean is infinitely close to 0 and the residual In time period If the standard deviation within a period is less than the preset standard deviation threshold, the defined time period is a linear segment; If a time period is neither defined as a flat segment nor a linear segment, it is defined as a curve segment; for a flat segment, a constant baseline model is used to fit the smoothed chromatogram data of the corresponding time period; for a linear segment, a first-order polynomial model is used to fit the smoothed chromatogram data of the corresponding time period; for a curve segment, a high-order polynomial nonlinear model is used to fit the smoothed chromatogram data of the corresponding time period; and a baseline curve of the corresponding time period is obtained; The endpoint values ​​and first-order derivative values ​​of the baseline curve of each time period are smoothly spliced ​​to obtain an overall smooth baseline curve; The overall smooth baseline curve is deducted from the smoothed chromatographic data and normalized, that is, the baseline correction is completed to obtain the corrected chromatographic data.

6. A chromatograph fault diagnosis and analysis method based on data processing according to claim 5, characterized in that: The method of preprocessing the operating data is time series alignment; Ways to align time series include: Take the running data at any time point as a time series, extract the shape feature vector for each time series, calculate the Euclidean distance between the shape feature vectors of n time series, and record it as shape similarity; get an n×n shape similarity matrix Ms, and the elements in the shape similarity matrix Ms are shape similarities; For each time series, calculate the average shape similarity between it and all other time series, and select the time series with the largest average value as the reference series. ; For all but the reference sequence The time series S outside is divided into K subsequences, corresponding to Also divided into K subsequences; for each subsequence corresponding to the time series S , calculate it with The similarity of the corresponding subsequences ;in, for and The DTW distance between them; for and The maximum possible DTW distance between them; Define each subsequence The tensile compression coefficient ;in, is a hyperparameter; Based on the stretching and compression coefficient, each subsequence To stretch and compress, The length is lk, and the length after stretching and compression is ; All stretched and compressed subsequences are spliced ​​to obtain standardized running data.

7. A chromatograph fault diagnosis and analysis method based on data processing according to claim 6, characterized in that: The similarity matrix is ​​generated in the following manner: Construct a 6-dimensional feature space. For each time point, take the standardized running data of the time point as a 6-dimensional vector, and map each 6-dimensional vector to a data point in the 6-dimensional feature space. For any two data points at time and , calculate the distance between them ; Create a (n+1)×(n+1) matrix ,matrix Elements in Indicates from arrive Minimum cumulative distance of; initial setting , and is infinite; distance ,in, For data points in dimension The weight of For data points In Dimension The data value of For data points In Dimension The data value of Dynamically populating a matrix , the filling formula is: ;in, Indicates from arrive The minimum cumulative distance, Indicates from arrive The minimum cumulative distance, Indicates from arrive The minimum cumulative distance of from Start back to , set a bandwidth parameter ET, for any data point , in the process of backtracking only when When , the data point It is regarded as a valid point and is allowed to be visited during the backtracking process to find the optimal alignment path; Based on the optimal alignment path, the similarity score between two data points is calculated, and the similarity score is the inverse of the cumulative distance of the optimal alignment path; Create an n×n similarity matrix SY, where the elements are the similarity scores between data points, and the generation of the similarity matrix is ​​completed.

8. The method for chromatograph fault diagnosis and analysis based on data processing according to claim 1, characterized in that: The calculation formula of the density center is: ;in, Cluster The density center of Cluster The data points within for The weight of ;in, express With the cluster The centroid The distance between is the scaling parameter; The corresponding clusters are calculated based on the density center The dispersion of ; ,in, Indicates taking the median; concatenate the density center and the dispersion at the vector level to obtain the fault feature vector corresponding to each cluster; The method for obtaining the fault type includes: Obtain historical fault data and its corresponding fault category labels, and construct the historical fault data into fault feature vectors in batches, which are recorded as historical fault feature vectors; The historical fault feature vectors with fault category labels are randomly divided into training sets and test sets. Based on the fault category labels, K fault categories are obtained, and the prior probability of each fault category and the conditional probability of each historical fault feature vector corresponding to the fault category are calculated. Based on the prior probability and conditional probability, a preliminary classification model is constructed. For a given historical fault feature vector , the classification model calculates ;in, Indicates the historical fault feature vector Under the condition that The probability of Indicates that the known sample belongs to the fault category Under the condition of The probability of is the prior probability, indicating that the sample belongs to the fault category The probability of Represents the observed historical fault feature vector probability; Select The largest failure category As the historical fault feature vector The prediction output; use the training set to train the preliminary classification model, define the loss function of the preliminary classification model, and use the test set to evaluate the constructed preliminary classification model. The evaluation method is to calculate the value of the loss function. If the value of the loss function does not decrease for pL consecutive times, save the preliminary classification model at this time as the final classification model; input the fault feature vector into the classification model to obtain the corresponding fault type.

9. A chromatograph fault diagnosis and analysis system based on data processing, which is used to implement a chromatograph fault diagnosis and analysis method based on data processing as claimed in any one of claims 1 to 8, characterized in that: include: A data acquisition and processing module is used to obtain the operating data of the chromatograph at n time points and pre-process the operating data to obtain standardized operating data; Matrix fitting module, which generates similarity matrix based on standardized running data; The clustering module clusters the standardized operation data using an improved clustering algorithm based on the similarity matrix to obtain N clusters; A fault determination module is used to calculate the density center and dispersion of each cluster, and to construct a fault feature vector based on the density center and dispersion; use The pre-built classification model classifies the fault feature vector, obtains the fault type and sends it to the control terminal. The modules are connected by wire and / or wireless means.

Citation Information

Cited By

  • Data processing method, system and device based on online fault diagnosis mechanism

    CN119961807A

  • A data processing method, system and device based on online fault diagnosis mechanism

    CN119961807B