A method and system for updating a model
By acquiring and processing normal operating condition data in the PCA model, calculating statistics and fault limits, and updating the mean and standard deviation of the PCA model, the problem of high real-time update costs is solved, and low-cost model updates and fault early warnings are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SUPCON TECH CO LTD
- Filing Date
- 2023-02-09
- Publication Date
- 2026-05-01
AI Technical Summary
Real-time updates to the PCA model require significant computational resources, resulting in high update costs.
By acquiring historical data under normal operating conditions for preprocessing, calculating fault limits and statistics, identifying erroneous samples, and replacing erroneous samples or updating the mean and standard deviation of the PCA model when the accumulated normal samples reach a certain number, the PCA model is updated using real-time data.
It reduces the update cost of PCA models, enables model updates with less computing resources, and provides fault warning functions, thereby reducing the system failure rate.
Smart Images

Figure CN116050542B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and specifically to a method and system for updating a model. Background Technology
[0002] To improve monitoring efficiency, Principal Component Analysis (PCA) models are typically used. The training data used to train the PCA model should include as many normal operating conditions as possible. If normal operating conditions not included in the training data are encountered during real-time monitoring, the PCA model may generate false alarms.
[0003] To address the issue of false alarms, real-time updates of the PCA model are typically used. However, real-time updates of the PCA model require significant computational resources and are costly. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide a method and system for updating a model to solve the problem of high update costs in real-time PCA model updates.
[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0006] The first aspect of this invention discloses a method for updating a model, the method comprising:
[0007] Acquire the first historical data under normal operating conditions, and perform a first preprocessing process on the first historical data to obtain the second historical data;
[0008] The failure limits of the principal component analysis (PCA) model are calculated based on the second historical data, and the failure limits include a first type of failure limit and a second type of failure limit.
[0009] Calculate the first and second type statistics for each historical sample in the second historical data, where the first type statistic is T. 2 The second type of statistic is the SPE statistic;
[0010] Determine the error-detected samples in the second historical data and the first number of the error-detected samples, wherein the error-detected samples are: historical samples in which the first type of statistic is greater than the first type of fault limit or the second type of statistic is greater than the second type of fault limit;
[0011] Collect first real-time data and perform a second preprocessing procedure on the first real-time data to obtain second real-time data;
[0012] Calculate the first and second type statistics for each real-time sample in the second real-time data;
[0013] Determine a second number of accumulated normal samples, wherein the normal samples are: real-time samples in which the first type of statistic is less than or equal to the first type of fault limit and the second type of statistic is less than or equal to the second type of fault limit;
[0014] When the second quantity reaches the first quantity, the error-corrected sample in the first historical data is replaced with the normal sample, and the process returns to the first preprocessing step of the first historical data to obtain the second historical data, so as to complete the update of the PCA model.
[0015] When the second quantity does not reach the first quantity, the mean and standard deviation of the PCA model are updated using the normal samples.
[0016] Preferably, after calculating the first and second type statistics for each real-time sample in the second real-time data, the method further includes:
[0017] When the first type statistic of any real-time sample in the second real-time data is greater than the first type of fault limit, and / or when the second type statistic of any real-time sample in the second real-time data is greater than the second type of fault limit, determine the contribution rate of each specified process variable to the abnormal operating condition, and sort the specified process variables in descending order of contribution rate.
[0018] Output fault alarm information in a first specified form, wherein the fault alarm information includes at least the detailed information of the first b specified process variables in the sorted specified process variables.
[0019] Preferably, after calculating the failure limit of the principal component analysis (PCA) model based on the second historical data, the method further includes:
[0020] The warning limit of the PCA model is calculated based on the second historical data, and the warning limit includes a first type of warning limit and a second type of warning limit;
[0021] Accordingly, after calculating the first and second type statistics for each real-time sample in the second real-time data, the method further includes:
[0022] When the first type of statistic of any real-time sample in the second real-time data is greater than the first type of warning limit, and / or when the second type of statistic of any real-time sample in the second real-time data is greater than the second type of warning limit, the fault warning information is output in the second specified form.
[0023] Preferably, the first preprocessing procedure includes at least: missing value completion, normalization of quantitative variables, standardization of quantitative variables, and processing of qualitative variables; the second preprocessing procedure includes at least: missing value completion, standardization of quantitative variables, and processing of qualitative variables.
[0024] Preferably, the calculation of the warning limit of the PCA model based on the second historical data includes:
[0025] Select data from the second historical data set, specifying the percentile interval;
[0026] Dimensionality reduction processing is performed on the data within the specified percentile interval;
[0027] The warning limit of the PCA model is calculated using the data in the specified percentile interval after dimensionality reduction.
[0028] Preferably, the method includes:
[0029] During the second preprocessing process of the first real-time data, when a missing value is detected in the first real-time data, a notification message is sent to a designated person.
[0030] A second aspect of this invention discloses a system for updating a model, the system comprising:
[0031] The processing unit is used to acquire first historical data under normal operating conditions and perform a first preprocessing process on the first historical data to obtain second historical data.
[0032] The first calculation unit is used to calculate the fault limits of the principal component analysis (PCA) model based on the second historical data, wherein the fault limits include a first type of fault limit and a second type of fault limit.
[0033] The second calculation unit is used to calculate the first type statistic and the second type statistic for each historical sample in the second historical data, wherein the first type statistic is T. 2 The second type of statistic is the SPE statistic;
[0034] The first determining unit is used to determine the error-detected samples in the second historical data and the first number of the error-detected samples, wherein the error-detected samples are: historical samples in which the first type of statistic is greater than the first type of fault limit or the second type of statistic is greater than the second type of fault limit;
[0035] The acquisition unit is used to acquire first real-time data and perform a second preprocessing process on the first real-time data to obtain second real-time data.
[0036] The third calculation unit is used to calculate the first type of statistic and the second type of statistic for each real-time sample in the second real-time data;
[0037] The second determining unit is used to determine the second number of accumulated normal samples, wherein the normal samples are: real-time samples in which the first type of statistic is less than or equal to the first type of fault limit and the second type of statistic is less than or equal to the second type of fault limit;
[0038] The first update unit is used to replace the erroneous samples in the first historical data with the normal samples when the second quantity reaches the first quantity, and to execute the processing unit to perform a first preprocessing process on the first historical data in order to complete the update of the PCA model.
[0039] The second update unit is used to update the mean and standard deviation of the PCA model using the normal samples when the second quantity does not reach the first quantity.
[0040] Preferably, the system further includes:
[0041] The third determining unit is used to determine the contribution rate of each specified process variable to the abnormal operating condition when the first type of statistic of any real-time sample in the second real-time data is greater than the first type of fault limit, and / or when the second type of statistic of any real-time sample in the second real-time data is greater than the second type of fault limit, and to sort the specified process variables in descending order of contribution rate.
[0042] A fault alarm unit is used to output fault alarm information in a first specified form, wherein the fault alarm information includes at least the detailed information of the first b specified process variables in the sorted specified process variables.
[0043] Preferably, the first calculation unit is further configured to: calculate the warning limit of the PCA model based on the second historical data, wherein the warning limit includes a first type of warning limit and a second type of warning limit;
[0044] Accordingly, the system also includes:
[0045] The fault warning unit is used to output fault warning information in a second specified form when the first type of statistic of any real-time sample in the second real-time data is greater than the first type of warning limit, and / or when the second type of statistic of any real-time sample in the second real-time data is greater than the second type of warning limit.
[0046] Preferably, the first preprocessing procedure includes at least: missing value completion, normalization of quantitative variables, standardization of quantitative variables, and processing of qualitative variables; the second preprocessing procedure includes at least: missing value completion, standardization of quantitative variables, and processing of qualitative variables.
[0047] Based on the above embodiments of the present invention, a method and system for updating a model are provided. The method includes: acquiring first historical data under normal operating conditions and performing a first preprocessing process on it to obtain second historical data; calculating the fault limit of the PCA model based on the second historical data; calculating the first and second type statistics for each historical sample in the second historical data; determining the misclassified samples and the first number of misclassified samples in the second historical data; collecting first real-time data and performing a second preprocessing process on it to obtain second real-time data; calculating the first and second type statistics for each real-time sample in the second real-time data; determining the second number of accumulated normal samples; when the second number reaches the first number, replacing the misclassified samples in the first historical data with normal samples, and returning to the step of performing the first preprocessing process on the first historical data to obtain the second historical data to complete the PCA model update; when the second number does not reach the first number, updating the mean and standard deviation of the PCA model using normal samples. This solution updates the PCA model based on normal samples in real-time data and the parameters of the PCA model, which can update the PCA model with less computing resources, thereby reducing the update cost of the PCA model. Attached Figure Description
[0048] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0049] Figure 1 A flowchart of a method for updating a model provided in an embodiment of the present invention;
[0050] Figure 2 Another flowchart of a method for updating a model provided in an embodiment of the present invention;
[0051] Figure 3 This is a structural block diagram of a system for updating a model, provided in an embodiment of the present invention. Detailed Implementation
[0052] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0053] In this application, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0054] As the background technology shows, the current common practice is to update the Principal Component Analysis (PCA) model in real time; however, real-time updates of the PCA model require a lot of computing resources and the update cost is high.
[0055] Therefore, embodiments of the present invention provide a method and system for updating a model, which updates the PCA model based on normal samples in real-time data and the parameters of the PCA model, and can update the PCA model with less computing resources, thereby reducing the update cost of the PCA model.
[0056] It should be noted that, according to the inventors' research, current PCA models only produce two monitoring results: "normal" and "fault," and cannot provide early warnings for faults. Therefore, this solution also provides early warning limits for the PCA model to provide early warnings for faults. The following examples will explain this solution.
[0057] See Figure 1 The diagram illustrates a flowchart of a method for updating a model according to an embodiment of the present invention, the method comprising:
[0058] Step S101: Obtain the first historical data under normal operating conditions.
[0059] In the specific implementation step S101, historical data of the specified tag number within the normal operating time period is collected, thereby obtaining the first historical data under normal operating conditions.
[0060] It should be noted that the tag includes analog input, analog output, digital input, and digital output. The tag is composed of Chinese and English letters and numbers. The tag is mainly used to represent a certain channel; for example, the tag can be used to represent the reactor outlet temperature, condenser inlet flow rate, distillation column top pressure, etc.
[0061] The designated tag number can be determined by process experts and technicians, and the normal operating period can also be determined by process experts and technicians. Normal operating condition refers to the operating condition in which no fault occurs.
[0062] It should be further clarified that the historical data mentioned above is a data matrix composed of sampled data from multiple bit positions. Each row of this data matrix represents the sampled value of each bit position at a certain sampling time, and each column of the data matrix represents the sampled value of a certain bit position at various sampling times. Historical data is usually stored in a historical database and can be obtained through an interface by following the bit position list and time period.
[0063] Step S102: Perform a first preprocessing procedure on the first historical data to obtain the second historical data.
[0064] In the specific implementation step S102, after obtaining the first historical data, the first historical data is subjected to a first preprocessing process to obtain the second historical data; the preprocessing process includes: processing to complete missing values, processing to normalize quantitative variables, processing to standardize quantitative variables, processing to process qualitative variables, etc.
[0065] In other words, after obtaining the first historical data, the first historical data is processed by filling in missing values, normalizing quantitative variables, standardizing quantitative variables, and processing qualitative variables to obtain the second historical data.
[0066] It should be noted that the quantitative variables mentioned above usually refer to continuous quantities (such as length, temperature, weight, liquid level, speed, etc.). Quantitative variables are quantities obtained by measurement, counting, or statistics, and they have numerical characteristics.
[0067] In contrast to quantitative variables are qualitative variables, also known as categorical variables. Individuals observed by qualitative variables can only belong to one of several incompatible categories. Qualitative variables usually use non-numerical terms to express categories, such as power on / off status and valve on / off status.
[0068] The following sections explain the processing methods mentioned above, including filling in missing values, normalizing quantitative variables, standardizing quantitative variables, and processing qualitative variables.
[0069] Missing value imputation: Determine whether the historical samples in the first historical data contain missing values; if they do, impute the missing values with the mode, mean, or median.
[0070] Normalization of quantitative variables: Normalization methods such as equivalent normalization or Box-Cox transformation are used to normalize the quantitative variables in the first historical data.
[0071] Standardization of quantitative variables: The quantitative variables in the first historical data were standardized using the z-score standardization method. For details of the z-score standardization method, please refer to formula (1).
[0072]
[0073] In formula (1), x j Let x be the j-th column of the data matrix X corresponding to the first historical data. j That is, the j-th position vector [x 1,j ,x 2,j ,…,x n,j ] T The superscript "T" is the transpose operator; the data matrix X is an n x m matrix, where n is the number of historical samples and m is the number of place values; μ j For x j The mean, σ j For x j Standard deviation, μ j and σ j It can be obtained by solving formulas (2) and (3) respectively.
[0074]
[0075]
[0076] Qualitative variable handling: Determine whether the first set of historical data contains qualitative variables. If it does, use dummy variables to replace them, where dummy variables are represented by 0 and 1 to indicate on and off.
[0077] The above content explains the handling of missing values, normalization of quantitative variables, standardization of quantitative variables, and handling of qualitative variables.
[0078] Step S103: Calculate the fault limit of the PCA model based on the second historical data.
[0079] It should be noted that the fault limits include both Type I and Type II fault limits; the Type I fault limit is T. 2 Fault limit (also known as T) 2 Control fault limits, with T 2 UCL 故障 The second type of fault limit is the SPE fault limit (also known as the SPE control fault limit, expressed in QUCL). 故障 express).
[0080] In the specific implementation step S103, the warning limit and fault limit of the PCA model are calculated based on the second historical data. The warning limit includes a first type of warning limit and a second type of warning limit. Among them, the first type of warning limit is T. 2 Warning limit (also known as T) 2 Control and warning limits, with T 2 UCL 预警The second type of warning limit is the SPE warning limit (also known as the SPE control warning limit, in QUCL). 预警 express).
[0081] The following sections describe how to calculate the warning limit and fault limit of the PCA model.
[0082] Explanation of the method for calculating warning limits:
[0083] Data for calculating the warning limit is selected from the second historical data (the first historical data after the first preprocessing process), and the warning limit is calculated using the PCA algorithm.
[0084] Specifically, the data in the second historical data are sorted from smallest to largest (or from largest to smallest), and data in a specified percentile interval are selected from the sorted second historical data. The data in the specified percentile interval is the data used to calculate the warning limit.
[0085] For example: Sort the data in the second historical data in ascending order, divide the sorted data into four equal parts according to quantity, and select the data in the range of 25th percentile to 75th percentile from the sorted second historical data (that is, the data in the range of 1 / 4 to 3 / 4, which is equivalent to the two middle parts of the data). The data in the range of 25th percentile to 75th percentile is the data used to calculate the warning limit.
[0086] The selected data within a specified percentile interval is subjected to dimensionality reduction (PCA dimensionality reduction). Specifically, the PCA method is applied to extract the principal component variables from the data within the specified percentile interval through linear transformation, thereby reducing the dimensionality of the high-dimensional data within the specified percentile interval. During the dimensionality reduction process of the data within the specified percentile interval, formulas (4) and (5) can be used to reduce the dimensionality of the high-dimensional data.
[0087]
[0088]
[0089] In formulas (4) and (5), Z is a matrix composed of data from the selected specified percentile intervals. Let be the dimensionality reduction matrix obtained by principal component analysis (PCA) of matrix Z, T be the score matrix obtained by PCA of matrix Z, P be the load matrix obtained by PCA of matrix Z, a be the number of principal components, t and p be the column vectors of the score matrix T and the load matrix P, respectively, and E be the error matrix obtained by PCA of matrix Z. The number of principal components a can be selected by the contribution rate method, the details of which can be found in formula (6).
[0090]
[0091] In formula (6), ratio is usually taken as 85% (this is just an example; the specific value can be selected according to the actual application); λ j Let Z be the covariance matrix of matrix Z (∑ = ZZ). T The j-th eigenvalue arranged in descending order, λ k Let be the k-th eigenvalue of the covariance matrix of matrix Z arranged in descending order.
[0092] The warning limit of the PCA model is calculated using data from a specified percentile interval after dimensionality reduction. Specifically, the first type warning limit (T) is calculated using formula (7). 2 UCL 预警 The second-class warning limit (QUCL) is calculated using formula (8). 预警 ).
[0093]
[0094]
[0095] In formulas (7) and (8), α is the confidence level (usually taken as 0.99, 0.95, or 0.9, which can be selected according to the actual application); F α (a, na) represents the F-distribution with first degree of freedom a and second degree of freedom na when a confidence level α is selected; α θ represents the upper quantile of the standard normal distribution at a selected confidence level α. l h0 and h0 satisfy formulas (9) and (10), where l = 1, 2, 3.
[0096]
[0097]
[0098] The above is an explanation of how to calculate the early warning limit.
[0099] Explanation of the method for calculating fault limits:
[0100] The second historical data is subjected to dimensionality reduction processing. The method of dimensionality reduction processing can be found in the relevant content of "Dimensionality Reduction Processing of Data in a Specified Percentile Interval" above, and will not be repeated here.
[0101] The fault limit of the PCA model is calculated using the second historical data after dimensionality reduction. The method for calculating the fault limit can be found in the above-mentioned content on "Calculating the warning limit of the PCA model using data from a specified percentile interval after dimensionality reduction", which will not be repeated here.
[0102] The above is an explanation of the calculation method for fault limits.
[0103] As can be seen from the above, the calculation methods for fault limits and warning limits are similar; the difference between the calculation methods for fault limits and warning limits is that the data used to calculate warning limits is data from a specified percentile interval selected from the second historical data, while the data used to calculate fault limits is all the second historical data.
[0104] Step S104: Calculate the first and second type statistics for each historical sample in the second historical data.
[0105] It should be noted that the first type of statistic is T. 2 The second type of statistic is the SPE statistic (also known as the Q statistic).
[0106] In the specific implementation step S104, the first type statistic and the second type statistic of each historical sample in the second historical data are calculated; specifically, the first type statistic (T) is calculated using formula (11). 2 The second type of statistic (SPE statistic) is calculated using formula (12).
[0107]
[0108] SPE = x Τ (I-PP Τ )x(12)
[0109] In formulas (11) and (12), x is the vector of the data matrix X corresponding to the second historical data, I is the identity matrix, and t is the column vector of the score matrix T. k That is, the k-th column vector of the score matrix T, λ k Let be the k-th eigenvalue of the covariance matrix of matrix Z arranged in descending order, P be the load matrix, and the superscript "T" represent the transpose.
[0110] Step S105: Determine the misclassified samples in the second historical data and the first number of misclassified samples.
[0111] It should be noted that the incorrectly judged samples are historical samples in which the first type statistic is greater than the first type fault limit or the second type statistic is greater than the second type fault limit.
[0112] In the specific implementation step S105, after calculating the first type statistic and the second type statistic for each historical sample in the second historical data, the first type statistic of the historical sample is compared with the first type fault limit, and the second type statistic of the historical sample is compared with the second type fault limit.
[0113] For a given historical sample, if the T of that historical sample2 The statistic (i.e., the first type statistic) is greater than T. 2 UCL 故障 Alternatively, if the SPE statistic (i.e., the second-type statistic) of the historical sample is greater than the QUCL. 故障 If the historical sample is incorrect, then it is considered an incorrect sample. It's worth noting that if the T value of this historical sample... 2 The statistic is greater than T 2 UCL 故障 And the SPE statistic is greater than the QUCL. 故障 If so, then the historical sample is also a misjudged sample.
[0114] Identify the erroneous samples in the second historical data and count the number of erroneous samples in the second historical data to obtain the first quantity, which is the number of erroneous samples in the second historical data.
[0115] Step S106: Collect the first real-time data and perform a second preprocessing process on the first real-time data to obtain the second real-time data.
[0116] In the specific implementation of step S106, the first real-time data is collected. Specifically, during the online monitoring process, the sensor data is collected in real time using a data acquisition device to obtain the first real-time data.
[0117] After acquiring the first real-time data, a second preprocessing procedure is performed on the first real-time data to obtain the second real-time data.
[0118] In some embodiments, the second preprocessing procedure includes at least the following processing methods: missing value completion, quantitative variable standardization, and qualitative variable processing. It should be noted that the specific details of missing value completion, quantitative variable standardization, and qualitative variable processing can be found in step S102, and will not be repeated here.
[0119] In some embodiments, during the second preprocessing process of the first real-time data, when a missing value is detected in the first real-time data, a notification message is sent to a designated person.
[0120] In other words, during the second preprocessing process of the first real-time data, missing values will also be filled in. When missing values are found in the first real-time data, a notification message needs to be sent to designated personnel (such as operators) to notify them to check the corresponding sensor and data acquisition components to prevent malfunctions.
[0121] Step S107: Calculate the first and second type statistics for each real-time sample in the second real-time data.
[0122] In the specific implementation of step S107, the first type of statistic and the second type of statistic for each real-time sample in the second real-time data are calculated. For the specific calculation method of the first type of statistic and the second type of statistic for real-time samples, please refer to the relevant content of calculating the first type of statistic and the second type of statistic for historical samples in step S104, which will not be repeated here.
[0123] In some embodiments, after calculating the first and second type statistics for each real-time sample in the second real-time data, it can be determined whether a fault has occurred based on the first and second type statistics of the real-time sample. If a fault has occurred, the top few bits with the largest contribution rates can be found based on the contribution rate, and a fault alarm can be triggered.
[0124] Specifically, when the first type statistic of any real-time sample in the second real-time data is greater than the first type of fault limit, and / or when the second type statistic of any real-time sample in the second real-time data is greater than the second type of fault limit, it indicates that a fault has occurred. At this time, the contribution rate of each specified process variable to the abnormal operating condition is determined, and each specified process variable is sorted in descending order of contribution rate.
[0125] The fault alarm information is output in a first specified format. This fault alarm information includes at least the detailed information of the top b specified process variables in the sorted list. The "top b specified process variables" are the top b specified process variables with the largest contribution rates. The detailed information of the specified process variables includes, but is not limited to, alarm time, alarm tag number, alarm generation value, set value, unit, and description. The first specified format includes, but is not limited to, any one or a combination of text, list, graph, pop-up window, and alarm sound. In other words, after a fault is determined to have occurred, the fault alarm information is sent to technical personnel in any one or a combination of text, list, graph, pop-up window, and alarm sound.
[0126] It should be noted that a fault can be confirmed when any one of the following three abnormal situations occurs. The first abnormal situation: The Type I statistic of any real-time sample in the second real-time data exceeds the Type I fault limit (T). 2 The statistic is greater than T 2 UCL 故障 The second anomaly: The second type of statistic for any real-time sample in the second real-time data is greater than the second type of fault limit (SPE statistic is greater than QUCL). 故障 The third abnormal situation: The first type statistic of any real-time sample in the second real-time data is greater than the first type of fault limit, and the second type statistic of any real-time sample in the second real-time data is greater than the second type of fault limit.
[0127] The methods for determining the contribution rate of a specified process variable to the abnormal operating condition differ under the different abnormal conditions mentioned above; the following explains the methods for determining the contribution rate of a specified process variable under different abnormal conditions.
[0128] The first method for determining the contribution rate of a specified process variable under abnormal conditions: when T 2 The statistic is greater than T 2 UCL 故障 At this time, it is necessary to quantify the contribution rate of each specified process variable. First, for abnormal operating condition X... i It is possible to determine the r out-of-control scores t that caused the out-of-control state. i,s Where r is less than or equal to the number of principal components a (r≤a), the out-of-control score must satisfy formula (13), where λ j Let Z be the covariance matrix of matrix Z (∑ = ZZ). T The j-th eigenvalue arranged in descending order.
[0129]
[0130] Calculate the out-of-control scores t for r individuals. i,s Then, the runaway score t for each specified process variable is calculated using formula (14). i,s Contribution rate C i,j,s .
[0131]
[0132] In formula (14), j = 1, 2, ..., m; s = 1, 2, ..., r; the meanings of the other parameters can be found in the meanings of the parameters in formulas (1) to (13) above, and will not be repeated here.
[0133] Calculate the runaway score t for each specified process variable. i,s Contribution rate C i,j,s Then, the specified process variable x is calculated using formula (15). i,j Contribution rate Ω i,j .
[0134]
[0135] The above describes the method for determining the contribution rate of a specified process variable under the first abnormal condition. Under the first abnormal condition, after determining the contribution rate of each specified process variable, the value is taken relative to the abnormal condition X. i Contribution rate Ω i,j The top b largest specified process variables are used as the root causes of the failure and the variables to be adjusted.
[0136] The second way to determine the contribution rate of a specified process variable in abnormal situations: when the SPE statistic is greater than the QUCL.故障 First, the reconstruction error X is calculated using formula (16). ei The meaning of each parameter in formula (16) can be found in the meaning of the parameters in formulas (1) to (13) above, and will not be repeated here.
[0137]
[0138] Then, the reconstruction error contribution rate Ψ of each specified process variable is calculated using formula (17). ei,j The contribution rate of the reconstruction error of the specified process variable is the contribution rate of the specified process variable under the second abnormal condition.
[0139]
[0140] The above describes how to determine the contribution rate of a specified process variable under the second type of abnormal situation; under the second type of abnormal situation, the contribution rate of each specified process variable (i.e., the reconstruction error contribution rate Ψ) is determined. ei,j After that, take the abnormal operating condition X as an example. i Contribution rate Ψ ei,j The top b largest specified process variables are used as the root causes of the failure and the variables to be adjusted.
[0141] The third way to determine the contribution rate of a specified process variable under abnormal conditions: when T 2 The statistic is greater than T 2 UCL 故障 And the SPE statistic is greater than the QUCL. 故障 Calculate the overall contribution rate of the specified process variable as the contribution rate of the specified process variable under the third abnormal condition; it should be noted that the overall contribution rate of the specified process variable is "(Ω)". i,j +Ψ ei,j ) / 2".
[0142] In the third abnormal situation, after determining the contribution rate of each specified process variable (that is, the comprehensive contribution rate mentioned above), the same approach is taken for the abnormal condition X. i Contribution rate (i.e., (Ω)) i,j +Ψ ei,j The top b largest specified process variables are used as the root causes of failures and variables to be adjusted.
[0143] The above content is an explanation of the fault alarm.
[0144] In some embodiments, after calculating the first and second type statistics for each real-time sample in the second real-time data, it can be determined whether an early warning is needed based on the first and second type statistics of the real-time sample.
[0145] Specifically, when the first type statistic of any real-time sample in the second real-time data is greater than the first type warning limit (i.e., T), 2 The statistic is greater than T 2 UCL 预警 And / or, when the second type statistic of any real-time sample in the second real-time data is greater than the second type warning limit (i.e., the SPE statistic is greater than the QUCL). 预警 The system outputs fault warning information in a second specified form to provide fault warning. The second specified form includes, but is not limited to, any one or a combination of text, list, graphics, pop-up window, and alarm sound.
[0146] Step S108: Determine the second number of accumulated normal samples.
[0147] It should be noted that normal samples are real-time samples in which the first type statistic is less than or equal to the first type fault limit and the second type statistic is less than or equal to the second type fault limit.
[0148] In the specific implementation step S108, the number of normal samples is counted to obtain the second number, which is the number of normal samples.
[0149] When the accumulated second quantity reaches the first quantity, execute step S109; when the accumulated second quantity does not reach the first quantity, execute step S110.
[0150] Step S109: When the second quantity reaches the first quantity, replace the misclassified samples in the first historical data with normal samples, and return to execute step S102 and subsequent steps to complete the update of the PCA model.
[0151] In the specific implementation of step S109, when the second quantity reaches the first quantity (equivalent to the number of accumulated normal samples reaching the number of error samples), the error samples in the first historical data are replaced with normal samples (i.e., normal samples replace the error samples in the first historical data), and the process returns to step S102 and subsequent steps. The fault limit, warning limit, error samples and first quantity are re-determined using the updated first historical data (historical data in which error samples have been replaced by normal samples), thereby completing the update of the PCA model.
[0152] Step S110: When the second quantity does not reach the first quantity, update the mean and standard deviation of the PCA model using normal samples.
[0153] In the specific implementation of step S110, when the second quantity does not reach the first quantity, only the mean and standard deviation of the PCA model need to be updated. Specifically, when the second quantity does not reach the first quantity, the mean and standard deviation of the PCA model are updated using the normal samples of the second real-time data, the original mean of the PCA model, and the original standard deviation of the PCA model. It should be noted that the calculation method of the mean and standard deviation of the PCA model can be found in formulas (2) and (3) above.
[0154] Furthermore, formulas (18) and (19) are used to update the mean and standard deviation of the PCA model.
[0155]
[0156]
[0157] In formulas (18) and (19), μ' j and σ' j These are the updated mean and standard deviation, x, respectively. n+1,j The data vector x of the normal sample of the second real-time data n+1 The j-th bit value in the array.
[0158] As can be seen from formulas (18) and (19), when updating the mean and standard deviation of the PCA model, only the normal samples of the second real-time data, the original mean and standard deviation of the PCA model are used.
[0159] Steps S101 to S110 above describe the process of updating the PCA model. As seen in steps S101 to S110, this solution offers the following advantages: When updating the PCA model, historical data can be avoided by using only real-time data and the PCA model's parameters, allowing for online model updates (i.e., updating the PCA model's mean and standard deviation) with minimal computational cost. It provides a criterion for selecting training samples for the PCA model, replacing older historical samples with real-time samples (i.e., replacing incorrectly classified samples with normal samples), rather than directly discarding the oldest set of historical data. It provides a fault warning function, enabling both fault alerts and early warnings, thereby reducing the system failure rate.
[0160] To better explain how this scheme updates the model, by... Figure 2 Examples will be provided; see [link / reference] Figure 2 This illustrates another flowchart of a method for updating a model provided by an embodiment of the present invention. Figure 2 Includes the following steps:
[0161] Step S201: Collect real-time data and calculate the first and second type statistics of the real-time samples.
[0162] Step S202: Determine if a fault has occurred. If a fault has occurred, proceed to step S203; if no fault has occurred, proceed to step S204.
[0163] In the specific implementation of step S202, when the first type of statistic of the real-time sample is greater than the first type of fault limit, and / or when the second type of statistic of any real-time sample in the second real-time data is greater than the second type of fault limit, a fault is determined to have occurred, and step S203 is executed.
[0164] If the first type statistic of the real-time sample is less than or equal to the first type of fault limit, and if the second type statistic of any real-time sample in the second real-time data is less than or equal to the second type of fault limit, it is determined that no fault has occurred, and step S204 is executed.
[0165] Step S203: Output fault alarm information to issue a fault alarm.
[0166] Step S204: Determine whether an alert is needed. If an alert is needed, proceed to steps S205 and S206; if an alert is not needed, proceed to step S206.
[0167] In the specific implementation of step S204, when the first type of statistic of the real-time sample is greater than the first type of warning limit, and / or when the second type of statistic of the real-time sample is greater than the second type of warning limit, it is determined that a warning is needed, and steps S205 and S206 are executed.
[0168] When the first type statistic of the real-time sample is less than or equal to the first type warning limit, and when the second type statistic of the real-time sample is less than or equal to the second type warning limit, it is determined that no warning is needed, and step S206 is executed.
[0169] Step S205: Output fault warning information to provide fault warning.
[0170] Step S206: Update the PCA model.
[0171] It should be noted that the execution principle of steps S201 to S206 can be found in the above embodiments of the present invention. Figure 1 The details of each step will not be repeated here.
[0172] Corresponding to the method for updating a model provided in the above embodiments of the present invention, see also... Figure 3The present invention also provides a structural block diagram of a system for updating a model, the system comprising: a processing unit 301, a first calculation unit 302, a second calculation unit 303, a first determination unit 304, a data acquisition unit 305, a third calculation unit 306, a second determination unit 307, a first update unit 308, and a second update unit 309.
[0173] The processing unit 301 is used to acquire first historical data under normal operating conditions and perform a first preprocessing process on the first historical data to obtain second historical data.
[0174] In some embodiments, the first preprocessing procedure includes at least: missing value completion, normalization of quantitative variables, standardization of quantitative variables, and processing of qualitative variables.
[0175] The first calculation unit 302 is used to calculate the fault limits of the PCA model based on the second historical data. The fault limits include the first type of fault limit and the second type of fault limit.
[0176] The second calculation unit 303 is used to calculate the first type statistic and the second type statistic for each historical sample in the second historical data, wherein the first type statistic is T. 2 The second type of statistic is the SPE statistic.
[0177] The first determining unit 304 is used to determine the error-identified samples in the second historical data and the first number of error-identified samples. The error-identified samples are historical samples in which the first type of statistic is greater than the first type of fault limit or the second type of statistic is greater than the second type of fault limit.
[0178] The acquisition unit 305 is used to acquire first real-time data and perform a second preprocessing process on the first real-time data to obtain second real-time data.
[0179] In some embodiments, the second preprocessing procedure includes at least: missing value completion, quantitative variable standardization, and qualitative variable processing.
[0180] The third calculation unit 306 is used to calculate the first type of statistic and the second type of statistic for each real-time sample in the second real-time data.
[0181] The second determining unit 307 is used to determine the second number of accumulated normal samples, wherein the normal samples are: real-time samples whose first type statistic is less than or equal to the first type fault limit and whose second type statistic is less than or equal to the second type fault limit.
[0182] The first update unit 308 is used to replace the erroneous samples in the first historical data with normal samples when the second quantity reaches the first quantity, and to execute the processing unit 301 to perform a first preprocessing process on the first historical data in order to complete the update of the PCA model.
[0183] The second update unit 309 is used to update the mean and standard deviation of the PCA model using normal samples when the second quantity does not reach the first quantity.
[0184] In this embodiment of the invention, the PCA model is updated based on normal samples in real-time data and the parameters of the PCA model, which can update the PCA model with less computing resources, thereby reducing the update cost of the PCA model.
[0185] Preferred, combined Figure 3 The system also includes, as shown, the following:
[0186] The third determining unit is used to determine the contribution rate of each specified process variable to the abnormal operating condition when the first type statistic of any real-time sample in the second real-time data is greater than the first type of fault limit, and / or when the second type statistic of any real-time sample in the second real-time data is greater than the second type of fault limit, and to sort the specified process variables in descending order of contribution rate.
[0187] The fault alarm unit is used to output fault alarm information in a first specified form. The fault alarm information includes at least the detailed information of the first b specified process variables in the sorted specified process variables.
[0188] Preferred, combined Figure 3 The first calculation unit 302, as shown, is further configured to: calculate the warning limits of the PCA model based on the second historical data, wherein the warning limits include a first type of warning limit and a second type of warning limit; correspondingly, the system also includes:
[0189] The fault warning unit is used to output fault warning information in a second specified form when the first type of statistic of any real-time sample in the second real-time data is greater than the first type of warning limit, and / or when the second type of statistic of any real-time sample in the second real-time data is greater than the second type of warning limit.
[0190] In some embodiments, the first calculation unit 302 for calculating the warning limit is specifically used to: select data of a specified percentile interval from the second historical data; perform dimensionality reduction processing on the data of the specified percentile interval; and calculate the warning limit of the PCA model using the data of the specified percentile interval after dimensionality reduction processing.
[0191] Preferred, combined Figure 3 The system also includes, as shown, the following:
[0192] The notification unit is used to send a notification message to a designated person when missing values are detected in the first real-time data during the second preprocessing process of the first real-time data.
[0193] In summary, the embodiments of the present invention provide a method and system for updating a model, which updates the PCA model based on normal samples in real-time data and the parameters of the PCA model, and can update the PCA model with less computing resources, thereby reducing the update cost of the PCA model.
[0194] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0195] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0196] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for updating a model, characterized in that, The method includes: Acquire the first historical data under normal operating conditions, and perform a first preprocessing process on the first historical data to obtain the second historical data; The failure limit of the principal component analysis (PCA) model is calculated based on the second historical data. This failure limit includes a first type of failure limit and a second type of failure limit; the first type of failure limit is T. 2 Fault limits, the second type of fault limit is the SPE fault limit; Calculate the first and second type statistics for each historical sample in the second historical data, where the first type statistic is T. 2 The second type of statistic is the SPE statistic; Determine the error-detected samples in the second historical data and the first number of the error-detected samples, wherein the error-detected samples are: historical samples in which the first type of statistic is greater than the first type of fault limit or the second type of statistic is greater than the second type of fault limit; Collect first real-time data and perform a second preprocessing procedure on the first real-time data to obtain second real-time data; Calculate the first type statistic and the second type statistic for each real-time sample in the second real-time data; the first type statistic and the second type statistic are used to determine whether a fault has occurred. Determine a second number of accumulated normal samples, wherein the normal samples are: real-time samples in which the first type of statistic is less than or equal to the first type of fault limit and the second type of statistic is less than or equal to the second type of fault limit; When the second quantity reaches the first quantity, the error-corrected sample in the first historical data is replaced with the normal sample, and the process returns to the first preprocessing step of the first historical data to obtain the second historical data, so as to complete the update of the PCA model. When the second quantity does not reach the first quantity, the mean and standard deviation of the PCA model are updated using the normal samples; the updated PCA model can better predict faults.
2. The method according to claim 1, characterized in that, After calculating the first and second type statistics for each real-time sample in the second real-time data, the method further includes: When the first type statistic of any real-time sample in the second real-time data is greater than the first type of fault limit, and / or when the second type statistic of any real-time sample in the second real-time data is greater than the second type of fault limit, determine the contribution rate of each specified process variable to the abnormal operating condition, and sort the specified process variables in descending order of contribution rate. Output fault alarm information in a first specified form, wherein the fault alarm information includes at least the detailed information of the first b specified process variables in the sorted specified process variables.
3. The method according to claim 1, characterized in that, After calculating the failure limit of the principal component analysis (PCA) model based on the second historical data, the method further includes: The warning limit of the PCA model is calculated based on the second historical data, and the warning limit includes a first type of warning limit and a second type of warning limit; Accordingly, after calculating the first and second type statistics for each real-time sample in the second real-time data, the method further includes: When the first type of statistic of any real-time sample in the second real-time data is greater than the first type of warning limit, and / or when the second type of statistic of any real-time sample in the second real-time data is greater than the second type of warning limit, the fault warning information is output in the second specified form.
4. The method according to claim 1, characterized in that, The first preprocessing procedure includes at least: missing value completion, normalization of quantitative variables, standardization of quantitative variables, and processing of qualitative variables; the second preprocessing procedure includes at least: missing value completion, standardization of quantitative variables, and processing of qualitative variables.
5. The method according to claim 3, characterized in that, The warning limit of the PCA model is calculated based on the second historical data, including: Select data from the second historical data set, specifying the percentile interval; Dimensionality reduction processing is performed on the data within the specified percentile interval; The warning limit of the PCA model is calculated using the data in the specified percentile interval after dimensionality reduction.
6. The method according to claim 4, characterized in that, The method includes: During the second preprocessing process of the first real-time data, when a missing value is detected in the first real-time data, a notification message is sent to a designated person.
7. A system for updating a model, characterized in that, The system includes: The processing unit is used to acquire first historical data under normal operating conditions and perform a first preprocessing process on the first historical data to obtain second historical data. The first calculation unit is used to calculate the failure limits of the principal component analysis (PCA) model based on the second historical data. The failure limits include a first type of failure limit and a second type of failure limit; the first type of failure limit is T. 2 Fault limits, the second type of fault limit is the SPE fault limit; The second calculation unit is used to calculate the first type statistic and the second type statistic for each historical sample in the second historical data, wherein the first type statistic is T. 2 The second type of statistic is the SPE statistic; The first determining unit is used to determine the error-detected samples in the second historical data and the first number of the error-detected samples, wherein the error-detected samples are: historical samples in which the first type of statistic is greater than the first type of fault limit or the second type of statistic is greater than the second type of fault limit; The acquisition unit is used to acquire first real-time data and perform a second preprocessing process on the first real-time data to obtain second real-time data. The third calculation unit is used to calculate the first type of statistic and the second type of statistic for each real-time sample in the second real-time data; the first type of statistic and the second type of statistic are used to determine whether a fault has occurred. The second determining unit is used to determine the second number of accumulated normal samples, wherein the normal samples are: real-time samples in which the first type of statistic is less than or equal to the first type of fault limit and the second type of statistic is less than or equal to the second type of fault limit; The first update unit is used to replace the erroneous samples in the first historical data with the normal samples when the second quantity reaches the first quantity, and to execute the processing unit to perform a first preprocessing process on the first historical data in order to complete the update of the PCA model. The second update unit is used to update the mean and standard deviation of the PCA model using the normal samples when the second quantity does not reach the first quantity; the updated PCA model can better predict faults.
8. The system according to claim 7, characterized in that, The system also includes: The third determining unit is used to determine the contribution rate of each specified process variable to the abnormal operating condition when the first type of statistic of any real-time sample in the second real-time data is greater than the first type of fault limit, and / or when the second type of statistic of any real-time sample in the second real-time data is greater than the second type of fault limit, and to sort the specified process variables in descending order of contribution rate. A fault alarm unit is used to output fault alarm information in a first specified form, wherein the fault alarm information includes at least the detailed information of the first b specified process variables in the sorted specified process variables.
9. The system according to claim 7, characterized in that, The first calculation unit is further configured to: calculate the warning limit of the PCA model based on the second historical data, wherein the warning limit includes a first type of warning limit and a second type of warning limit; Accordingly, the system also includes: The fault warning unit is used to output fault warning information in a second specified form when the first type of statistic of any real-time sample in the second real-time data is greater than the first type of warning limit, and / or when the second type of statistic of any real-time sample in the second real-time data is greater than the second type of warning limit.
10. The system according to claim 7, characterized in that, The first preprocessing procedure includes at least: missing value completion, normalization of quantitative variables, standardization of quantitative variables, and processing of qualitative variables; the second preprocessing procedure includes at least: missing value completion, standardization of quantitative variables, and processing of qualitative variables.
Citation Information
Patent Citations
Adaptive data-driven early fault monitoring method and device during refining process
CN105700517A
Electromechanical clamp fault detection method based on PCA statistics
CN112611970A