Digital twinning-based chemical process real-time monitoring method and system
By identifying the fluctuation range of chemical processes, screening state snapshots, constructing a weighted matrix for singular value decomposition, and combining it with an online Kalman filter correction model, the problem of insufficient model updates in chemical process monitoring is solved, and real-time and accurate monitoring of chemical processes is achieved.
Patent Information
- Application Number
- CN202511627944.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-07
- Publication Date
- 2026-02-03
AI Technical Summary
Existing digital twin technology lacks online model correction and update mechanisms in chemical process monitoring, making it difficult to adapt to time-varying characteristics and resulting in incomplete and inaccurate monitoring.
By identifying process fluctuation ranges, filtering state snapshots, constructing a weighted snapshot matrix, performing singular value decomposition, extracting reduced-order basis functions, and using the Kalman filter algorithm to calibrate the model online, the model is updated in conjunction with a backup basis function library.
It enables full detection of key changes in chemical processes, ensuring the continuous effectiveness and accuracy of monitoring, reducing false alarms, and broadening the applicability of the model.
Smart Images

Figure CN121455095A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of real-time monitoring, and particularly relates to a chemical process real-time monitoring method and system based on digital twinning. BACKGROUND
[0002] Chemical processes generally have complex characteristics such as multivariable, strong coupling, nonlinearity, and time-varying operation conditions, and are often accompanied by dangerous conditions such as high temperature, high pressure, flammable, explosive, and toxic. Therefore, comprehensive, accurate, and real-time monitoring of the running state of the chemical process is the core premise and key technology for ensuring production safety, preventing serious accidents (such as reaction runaway, leakage), optimizing process operation, improving product quality, and reducing energy consumption.
[0003] Traditional monitoring methods usually rely on limited measurement points, which are difficult to fully reflect the complex internal state (such as the temperature field and concentration field distribution in the reactor), resulting in insufficient warning and diagnosis capabilities for abnormal conditions.
[0004] Therefore, digital twinning technology provides a new solution for intelligent control and deep monitoring of chemical processes by constructing a virtual model accurately mapped to the physical entity. However, the high-fidelity mechanism model relied on by digital twinning usually contains a large number of partial differential equations, which has high computational complexity and long solution time, making it difficult to meet the real-time monitoring scene with strict requirements on computational efficiency. Model reduction technology reduces the computational complexity of the model at the cost of acceptable accuracy loss. Among them, the data-driven proper orthogonal decomposition (POD) method is one of the most widely used reduction techniques. By singular value decomposition of the state snapshot data set collected during the historical operation process, the base functions that can represent the main energy modes of the system are extracted, and they are projected into a low-dimensional subspace to construct a fast-solvable reduced model.
[0005] However, conventional uniform sampling or random sampling strategies may miss critical moments of process fluctuations, while in the process of stable operation, they may collect too much redundant information, resulting in insufficient representation of process dynamic characteristics by the constructed reduced model. At the same time, the standard POD method may have difficulty in ensuring the prediction accuracy of key variables when extracting reduced bases. More importantly, traditional reduced models are usually static models constructed offline, and the base functions do not change once determined. Existing methods generally lack effective online correction and structure updating mechanisms, making it difficult to adapt to the time-varying characteristics of chemical processes. SUMMARY
[0006] The application provides a chemical process real-time monitoring method and system based on digital twinning to solve the technical problem of the lack of online model correction and updating mechanism in existing methods.
[0007] In a first aspect, the present application provides a chemical process real-time monitoring method based on digital twinning, comprising the following steps: S1, obtaining historical running data of a high-fidelity mechanism model to construct a state snapshot dataset, and synchronously collecting real-time measurement data of a chemical process to be monitored; S2, identifying a process fluctuation interval based on the time gradient of key state variables in the dataset, and calculating the standard deviation of state vectors in each process fluctuation interval; in each process fluctuation interval, if the minimum Euclidean distance between a selected state snapshot and all state snapshots in the selected state snapshot set is greater than a predetermined multiple of the standard deviation, the selected state snapshot is selected to form an optimal snapshot matrix; S3, constructing a diagonal weight matrix according to the sensitivity of each state variable to the target process index, multiplying the optimal snapshot matrix to obtain a weighted snapshot matrix, performing singular value decomposition on the weighted snapshot matrix, extracting a predetermined number of left singular vectors corresponding to the maximum singular value as a reduced-order basis function, calculating a reduced-order truncation error energy ratio, and constructing a reduced-order model based on the reduced-order basis function; S4, in the real-time monitoring stage, inputting the real-time measurement data into the reduced-order model to calculate a prediction residual; constructing a monitoring threshold positively correlated with the reduced-order truncation error energy ratio; if the norm of the prediction residual is less than the monitoring threshold, the state coefficient of the reduced-order model is corrected using a Kalman filter algorithm; otherwise, the projection error of the prediction residual on each basis function in the backup basis function library is calculated, and the basis function corresponding to the minimum singular value in the current reduced-order basis function is replaced by the basis function with the minimum projection error in the backup basis function library; and outputting the full-order state vector reconstructed based on the corrected or updated reduced-order model.
[0008] Further, the high-fidelity mechanism model is a finite element or finite difference model constructed based on computational fluid dynamics or multi-physical field coupling.
[0009] Further, the process fluctuation interval is identified based on the time gradient of key state variables in the dataset, comprising: For each key state variable, the time gradient at each time step is calculated; if the absolute value of the time gradient of any key state variable is greater than the time gradient absolute value threshold, the time point and each 2 time points before and after the time point are marked as fluctuation time points; all marked fluctuation time points are combined to form a process fluctuation interval.
[0010] Further, in each process fluctuation interval, if the minimum Euclidean distance between a selected state snapshot and all state snapshots in the selected state snapshot set is greater than a predetermined multiple of the standard deviation, the selected state snapshot is selected, comprising: The first state snapshot of each process fluctuation interval is added to the selected state snapshot set as an initial state snapshot; For the remaining candidate state snapshots within the process fluctuation range, calculate the Euclidean distance between the candidate state snapshot and each state snapshot in the set of selected state snapshots in turn, and take the minimum value. If the minimum value is greater than 1.5 times the standard deviation of the state vector in the process fluctuation range, then the candidate state snapshot is added to the set of selected state snapshots.
[0011] Furthermore, a diagonal weight matrix is constructed based on the sensitivity of the target process indicators to each state variable, including: For the The state variable and the first The sensitivity of each target process parameter is calculated using the finite difference method. Sensitivity Used to represent the change in target process parameters when a state variable undergoes a unit change; The first Sensitivity of each state variable to all target process parameters Summing the absolute values of the , we get the . Total sensitivity of each state variable ; Constructing the diagonal weight matrix: The diagonal weight matrix of the first... Line number The diagonal elements of the column are All other off-diagonal elements are 0.
[0012] Furthermore, a predetermined number of left singular vectors corresponding to the largest singular values are extracted as reduction basis functions, and the reduction truncation error energy ratio is calculated, including: Arrange the singular values in descending order as follows: ; from Initially, singular values are accumulated sequentially to determine the energy ratio that is satisfied. The smallest integer ; Extract and Previous A singular value to The corresponding left singular vector serves as a reduced-order basis function; The reduced-order truncation error energy ratio is .
[0013] Furthermore, a monitoring threshold positively correlated with the energy ratio of the order reduction truncation error is constructed, including: The mean is calculated using the norm of the predicted residuals under historical normal operating conditions. and standard deviation Set static baseline threshold ; The monitoring threshold Calculated using the following formula: ,in, The energy ratio of the reduced-order truncation error.
[0014] Furthermore, the state coefficients of the reduced-order model are corrected using the Kalman filter algorithm, including: The state coefficient vector of the reduced-order model is used as the state vector of the Kalman filter, and the state transition matrix is set as the identity matrix. Real-time measurement data is used as the measured value, and the current reduced-order basis function matrix is used as the observation matrix; Based on the prediction and update steps of the Kalman filter, the corrected state coefficient vector is obtained by iterative calculation using real-time measurement data.
[0015] Further, the projection error of the predicted residual onto each basis function in the backup basis function library is calculated, and the basis function with the smallest singular value in the current reduced-order basis function is replaced with the basis function with the smallest projection error in the backup basis function library, including: For each alternative basis function in the alternative basis function library Calculate projection error ,in To predict residuals; In all calculated projection errors Find the minimum value in the middle. And determine the corresponding alternative basis functions. ; In the current set of reduced-order basis functions, find the basis function corresponding to the minimum singular value. ; use replace This yields the updated set of reduced-order basis functions.
[0016] Secondly, the present invention provides a real-time monitoring system for chemical processes based on digital twins, including a memory and a processor. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned real-time monitoring method for chemical processes based on digital twins is implemented.
[0017] The beneficial effects are: the application identifies the process fluctuation interval and filters the state snapshots according to the distance between state vectors and the standard deviation, ensuring sufficient detection of the key change characteristics of the chemical process. By using the weight matrix based on the sensitivity of the process index, the reduced model can focus on the representation of the core state variables. In the monitoring stage, the monitoring threshold related to the model itself truncation error can reduce the false alarm caused by the inherent error of the model. When the process deviates, for smaller deviations, the model coefficients are corrected online through Kalman filtering to maintain the real-time accuracy of the model; for larger deviations beyond the preset range, the model is reconstructed by selecting the optimal basis function from the backup library, so that the model can cope with new working conditions not covered by the training data, thereby widening the application range of the model and ensuring the continuous effectiveness and accuracy of the monitoring when the chemical process changes. BRIEF DESCRIPTION OF DRAWINGS
[0018] Figure 1 A flowchart of the real-time monitoring method for the chemical process based on digital twinning; Figure 2 A schematic diagram of data acquisition; Figure 3 A schematic diagram of real-time monitoring and correction; Figure 4 A schematic diagram of the real-time monitoring system for the chemical process based on digital twinning. DETAILED DESCRIPTION
[0019] Embodiments of the real-time monitoring method for the chemical process based on digital twinning provided by the application: As Figure 1 shown, a real-time monitoring method for a chemical process based on digital twinning includes: S1, obtaining historical running data of a high-fidelity mechanism model to construct a state snapshot dataset, and synchronously collecting real-time measurement data of a chemical process to be monitored; Specifically, the high-fidelity mechanism model is a finite element or finite difference model constructed based on computational fluid dynamics (CFD) or multi-physical field coupling. Specifically, the model is built by using the graphical interface and built-in model library of software such as Aspen Plus and gPROMS, and is called through the provided COM or Python interface. By simulating the dynamic response of the chemical process in multiple scenarios such as startup, stable operation, working condition switching and typical faults in the simulation environment, the temperature, pressure, component concentration and other state variables of all grid nodes in the high-fidelity mechanism model are collected at a preset time step (for example, every second) to form a high-dimensional state vector. The state vectors collected at a series of time points are arranged in chronological order to form a state snapshot matrix, and each column of the state snapshot matrix corresponds to a state snapshot.
[0020] Real-time measurement data is acquired from sensors of physical chemical equipment through a distributed control system (DCS) or a supervisory control and data acquisition system (SCADA), as shown in FIG. 1. Figure 2
[0021] S2, identifying process fluctuation intervals based on time gradients of key state variables in the data set, calculating standard deviations of state vectors in each process fluctuation interval; in each process fluctuation interval, if the minimum Euclidean distance between the selected state snapshot and all state snapshots in the selected state snapshot set is greater than a predetermined multiple of the standard deviation, the selected state snapshot is selected to form a preferred snapshot matrix; Specifically, the outlet temperature of the reactor or the concentration of the key product is selected as the key state variable, and the first-order difference of the key state variable at continuous time points is calculated to approximate the time gradient. When the absolute value of the time gradient exceeds the preset fluctuation threshold, it is marked as the start of the process fluctuation interval; when the absolute value of the time gradient falls below the fluctuation threshold and lasts for a period of time, it is marked as the end of the process fluctuation interval. For each identified process fluctuation interval, the standard deviation of the norm of all state vectors in the process fluctuation interval is calculated .
[0022] In an optional embodiment, identifying process fluctuation intervals based on time gradients of key state variables in the data set comprises: For each key state variable, calculate the time gradient thereof at each time step; if the absolute value of the time gradient of any key state variable is greater than the time gradient absolute value threshold, mark the time point and the two time points before and after the time point as fluctuation time points; combine all marked fluctuation time points to form a process fluctuation interval.
[0023] Specifically, the change rate of each key state variable (such as temperature and pressure) in the state snapshot data set between adjacent time points is calculated one by one, and the change rate is the time gradient. For example, the temperature at time point t is 150°C, and the temperature at the next time point t+1 becomes 152°C, so the temperature gradient at time point t is 2. In the same way, the time gradients of all key state variables at all time points are calculated.
[0024] The preset time gradient absolute value threshold is set to 1.0. All time points are traversed to check whether the time gradient absolute value of any one key state variable exceeds the time gradient absolute value threshold. Assuming that the time gradient absolute value of pressure at time point t=50 is 1.2, which is greater than the time gradient absolute value threshold 1.0, time point 50 is identified as a fluctuation time point. Then, the two time points before and after the fluctuation time point are also marked as fluctuation time points, i.e., time points 48, 49, 50, 51, and 52 are all fluctuation time points, and the five fluctuation time points are collectively marked as a fluctuation segment. If other time points are also identified as fluctuation time points, for example, time point t=53 is also marked, thereby generating a fluctuation segment containing time points 51 to 55, two overlapping segments, i.e., 48 to 52 and 51 to 55, are merged into a continuous interval, i.e., from time point 48 to 55. The merging process is repeated until all marked time points are included in the process fluctuation interval set.
[0025] In an optional embodiment, in each process fluctuation interval, if the minimum Euclidean distance between the selected state snapshot set and the selected state snapshot set is greater than a predetermined multiple of the standard deviation, the selected state snapshot is selected, including: The first state snapshot of each process fluctuation interval is added to the selected state snapshot set as an initial state snapshot; For the remaining selected state snapshots in the process fluctuation interval, the Euclidean distance between the selected state snapshot and each state snapshot in the selected state snapshot set is calculated in turn, and the minimum value is taken; If the minimum value is greater than 1.5 times the standard deviation of the state vector in the process fluctuation interval, the selected state snapshot is added to the selected state snapshot set.
[0026] When selecting snapshots, the first snapshot of the interval is added to the preferred set. The remaining selected snapshots in the interval are traversed in turn, the Euclidean distance between the selected snapshot and each selected snapshot in the preferred set is calculated, and the minimum value is found The preferred predetermined multiple is 1.5, and if is greater than 1.5 times , wherein is the standard deviation of the state vector in the fluctuation interval, the selected snapshot is added to the preferred set. Repeat the process until all snapshots in the fluctuation interval are traversed, and the preferred snapshot set obtained constitutes the preferred snapshot matrix.
[0027] Specifically, taking a fluctuation range from time point 48 to 55 as an example, the state snapshot corresponding to the fluctuation time point 48, such as a vector [150.1, 2.3] containing two variables, temperature and pressure, is selected into the selected snapshot set. At the same time, the standard deviation of temperature is calculated to be 2.5 and the standard deviation of pressure is 0.4 among all state snapshots within this fluctuation range. To simplify the calculation, the average value of 1.45 can be taken as the standard deviation of the state vector for this range.
[0028] Process the candidate state snapshot for the next fluctuation time point 49 within this fluctuation interval, assuming the candidate state snapshot vector is [150.8, 2.4]. Calculate its Euclidean distance to the only snapshot [150.1, 2.3] in the selected snapshot set, which is approximately 0.71. This value is the currently unique distance and therefore the minimum distance.
[0029] The minimum distance of 0.71 is compared with the criterion. The criterion is 1.5 times the standard deviation of the state vector in that interval, i.e., 2.175. Since 0.71 < 2.175, it means that the snapshot at time point 49 is not significantly different from the selected snapshots, and therefore is not selected into the set. The above calculation and comparison process is repeated for the snapshot at time point 50 until the entire interval has been traversed, resulting in a set of representative and significantly different state snapshots.
[0030] S3. Construct a diagonal weight matrix based on the sensitivity of the target process index to each state variable, and multiply it with the preferred snapshot matrix to obtain a weighted snapshot matrix; perform singular value decomposition on the weighted snapshot matrix, extract a predetermined number of left singular vectors corresponding to the maximum singular values as reduced order basis functions, calculate the reduced order truncation error energy ratio, and construct a reduced order model based on the reduced order basis functions. Specifically, product yield is used as the target process indicator in chemical processes. Sensitivity analysis is conducted using a high-fidelity mechanism model, that is, near the steady-state operating point, for each state variable, such as the first... The temperature of each grid node is subjected to a small perturbation, and the resulting change in product yield is observed and calculated. The ratio of the change in product yield to the perturbation of the state variable is defined as the sensitivity of that state variable. Construct a diagonal weight matrix. The first element on the diagonal of the diagonal weight matrix The element is All other elements are zero. This is the diagonal weight matrix. Multiply the preferred snapshot matrix by left to obtain the weighted snapshot matrix.
[0031] In an optional embodiment, a diagonal weight matrix is constructed based on the sensitivity of the target process index to each state variable, including: For the The state variable and the first a target process index, the sensitivity is calculated by finite difference method , the sensitivity is used to represent the change of the target process index when the state variable changes by one unit; the absolute value of the sensitivity of the first state variable to all target process indexes is summed up to obtain the total sensitivity of the first state variable ; a diagonal weight matrix is constructed: the diagonal element of the diagonal weight matrix in the first row and the first column is , and the rest of the non-diagonal elements are all 0.
[0032] Specifically, it is assumed that the chemical process has two key state variables, which are temperature and pressure respectively; and two target process indexes, which are product purity and reaction yield respectively. The sensitivity of the first state variable (temperature) to each target process index is calculated. Through simulation or small amplitude experiment, it is found that when the temperature rises by 1℃, the product purity increases by 0.5 percentage points, and the reaction yield decreases by 0.8 percentage points. Therefore, the sensitivity of temperature to product purity is 0.5, and the sensitivity of temperature to reaction yield is -0.8.
[0033] The total sensitivity of the temperature state variable is calculated , which is the sum of the absolute values of the sensitivities of the temperature state variable to all target process indexes, i.e. is 1.3. Similarly, the second state variable (pressure) is calculated, and it is assumed that the sensitivity of pressure to product purity is 0.2, and the sensitivity of pressure to reaction yield is 0.3, then the total sensitivity of pressure is 0.5. According to the calculated total sensitivity of each state variable, a diagonal weight matrix is constructed. In this example, the diagonal weight matrix is a two-dimensional square matrix, the first element on the diagonal of the two-dimensional square matrix is the total sensitivity of temperature 1.3, the second element is the total sensitivity of pressure 0.5, and all the elements on the non-diagonal line are 0.
[0034] the weighted snapshot matrix of the first row and the first column is subjected to singular value decomposition to obtain a left singular vector matrix , a diagonal singular value matrix , and the transpose of a right singular vector matrix . In the order of singular values from large to small, the first The order of the reduced-order model is determined by the proportion of energy of each singular value to the total energy, i.e., the ratio of the sum of squares. When this proportion first exceeds a preset threshold, such as 99.9%, the order of the reduced-order model is determined. Select The front of the matrix The columns serve as reduced-order basis functions, forming a reduced-order basis matrix. The energy ratio of the order reduction truncation error is 1 minus the aforementioned energy ratio. The order reduction model uses the full-order state vector... Projected onto by Zhang Cheng established it using a low-dimensional space, that is ≈ ,in for A state coefficient vector of dimension 'a'. The partial differential equations of the original high-fidelity model are transformed into ordinary differential equations about the state coefficients 'a' using the Galerkin projection method, thus constructing a lower-order model.
[0035] In an optional embodiment, a predetermined number of left singular vectors corresponding to the maximum singular values are extracted as reduced-order basis functions, and the reduced-order truncation error energy ratio is calculated, including: Arrange the singular values in descending order as follows: ; from Initially, singular values are accumulated sequentially to determine the energy ratio that is satisfied. The smallest integer ; Extract and Previous A singular value to The corresponding left singular vector serves as a reduced-order basis function; The reduced-order truncation error energy ratio is .
[0036] Specifically, after performing singular value decomposition on the weighted state snapshot matrix, a series of singular values are obtained. Assume 10 singular values are obtained, arranged in descending order as 50, 40, 30, 12, 5, 1, 0.5, 0.2, 0.1, and 0.05. The sum of squares of all singular values is calculated as the total energy, assumed to be 5170.35. Starting with the largest singular value, the sum of squares of each singular value is accumulated, and the ratio of this accumulated sum to the total energy is calculated. When k=1, the energy ratio is approximately 0.483. When k=2, the energy ratio is approximately 0.793. This process continues until it is found that when k=5, the accumulated energy ratio first exceeds 0.999. Therefore, the smallest integer k satisfying the condition is determined to be 5. After determining k=5, five left singular vectors corresponding to the five largest singular values 50, 40, 30, 12, and 5 are extracted and used as reduced-order basis functions representing the principal characteristics. At the same time, the energy ratio of the reduced-order truncation error is calculated, which is 0.0009.
[0037] S4, real-time monitoring stage, inputting real-time measurement data into the reduced-order model to calculate a prediction residual; constructing a monitoring threshold positively correlated with a reduced-order truncation error energy ratio; if a norm of the prediction residual is less than the monitoring threshold, using a Kalman filtering algorithm to correct a state coefficient of the reduced-order model; otherwise, calculating a projection error of the prediction residual on each basis function in a backup basis function library, and replacing a basis function corresponding to a minimum singular value in a current reduced-order basis function matrix with a basis function in the backup basis function library having a minimum projection error; and outputting a full-order state vector reconstructed based on the corrected or updated reduced-order model.
[0038] Specifically, at each monitoring time k, a state coefficient is substituted into a system of ordinary differential equations of the reduced-order model, and a prediction state coefficient at the current time is obtained by solving. A prediction value of the full-order state is reconstructed by . Real-time measurement data is compared with a part corresponding to a measurement point in the prediction value of the full-order state, and a two-norm of a difference between the two is calculated, that is, a norm of the prediction residual. The monitoring threshold is set as a value positively proportional to a reduced-order truncation error energy ratio ε, for example, α × ε, where α is a safety coefficient determined according to a residual fluctuation range in historical normal operation data. If the norm of the prediction residual is less than the threshold, a state space equation of the reduced-order model is taken as a prediction model of Kalman filtering, real-time measurement data is taken as an observation value, and a Kalman gain is calculated through a standard Kalman filtering prediction and update step. The prediction state coefficient Figure 3 is corrected by using the prediction residual, and a state coefficient at the current time k is obtained. If the norm of the prediction residual is not less than the threshold, it is indicated that the existing basis function cannot represent the process, and a backup basis function library is formed by left singular vectors corresponding to smaller singular values that are not selected in initial singular value decomposition. A prediction residual vector at the current time is projected on each backup basis function in the backup basis function library, a modulus of a projected residual is calculated, that is, a projection error. A backup basis function capable of minimizing the projection error is selected. Meanwhile, in the r basis functions of the current reduced-order model, a basis function corresponding to the rth, that is, the minimum singular value is found, the basis function is removed, and the basis function is replaced with the optimal backup basis function selected in the previous step, to form a new reduced-order basis function matrix. Whether the state coefficient corrected through the Kalman filtering or the state coefficient recalculated by using the new basis function after the basis function is updated, is multiplied by the current reduced-order basis matrix, to obtain a full-order state vector at the current time k containing state information of all grid nodes.
[0039] In an alternative embodiment, the monitoring threshold positively correlated with the reduced truncation error energy ratio is constructed, comprising: The mean value is calculated using the prediction residual norm under historical normal operating conditions and the standard deviation , and a static reference threshold is set; The monitoring threshold is calculated by the following formula: , wherein is the reduced truncation error energy ratio.
[0040] Specifically, data is required for a period of time when the chemical process is confirmed to be in a normal stable operating condition. The historical data is predicted using the established reduced order model, and the residual norm between the model prediction value and the actual measurement value at each time point is calculated. Assuming that a series of residual norm values are obtained, such as 0.15, 0.18, 0.21, 0.16, etc. The mean value μ of the set of values is 0.18, the standard deviation σ is 0.02, and the static reference threshold is 0.24. The reduced truncation error energy ratio calculated in the current reduced order model construction process is obtained, which represents the amount of information discarded in the model reduction process, and the current model is assumed to be 0.0009. The static reference threshold is combined with the truncation error energy ratio to calculate the monitoring threshold , which is about 0.241. The threshold will be adjusted with the change of after the model is updated, when the model error is large, the threshold will be relaxed accordingly, and vice versa.
[0041] In an alternative embodiment, the Kalman filter algorithm is used to correct the state coefficients of the reduced order model, comprising: The state coefficient vector of the reduced order model is taken as the state vector of the Kalman filter, and the state transition matrix is set as the unit matrix; The real-time measurement data is taken as the measurement value, and the current reduced order basis function matrix is taken as the observation matrix; According to the prediction step and the update step of the Kalman filter, the real-time measurement data is iteratively calculated to obtain the corrected state coefficient vector.
[0042] Specifically, the state coefficient vector in the reduced-order model, for example, a column vector consisting of five coefficients, is set as the state to be estimated by the Kalman filter. Simultaneously, the state transition matrix is set as a 5×5 identity matrix, and the state coefficients remain unchanged when no new measurement information is available. At each time step, when new real-time process data, such as a complete state vector containing all sensor readings, is acquired, this data vector is used as the measurement value for the Kalman filter. The matrix composed of the current five reduced-order basis functions is used as the observation matrix, which represents how the low-dimensional state coefficients are mapped to the high-dimensional actual measurement space. The algorithm executes a standard Kalman filter loop. In the prediction step, a preliminary prediction of the coefficients at the current time step is obtained based on the corrected coefficients and the identity transition matrix from the previous time step. In the update step, the Kalman gain is calculated using the difference between the newly acquired real-time measurement value and the predicted measurement value reconstructed based on the predicted coefficients—the prediction residual—and the preliminary predicted coefficients are corrected. Through continuous iterative calculations, a set of corrected state coefficients that match the real-time data is obtained.
[0043] In an optional embodiment, the projection error of the prediction residual onto each basis function in the backup basis function library is calculated, and the basis function with the smallest singular value in the current reduced-order basis function is replaced with the basis function with the smallest projection error in the backup basis function library, including: For each alternative basis function in the alternative basis function library Calculate projection error ,in To predict residuals; In all calculated projection errors Find the minimum value in the middle. And determine the corresponding alternative basis functions. ; In the current set of reduced-order basis functions, find the basis function corresponding to the minimum singular value. ; use replace This yields the updated set of reduced-order basis functions.
[0044] Specifically, when the monitoring system detects that the predicted residual *r* exceeds a threshold, it indicates that the current reduced-order model can no longer accurately represent the process. At this point, the basis function update procedure is initiated. Assume there are 10 backup basis functions in the backup basis function library. The projection error of the residual vector *r* onto each backup basis function is calculated one by one. For example, for the first backup basis function... First calculate r in By projecting the vector onto the direction r, and calculating the L2 norm of the difference vector between r and the projection vector, the error value is obtained. Repeat this operation for all 10 spare basis functions in the library to obtain... To 10 error values in total.
[0045] Among the calculated 10 projection error values, find the minimum value. Assuming the calculation result is 0.05, then the corresponding backup basis function is selected as the best candidate basis function, which can explain the unmodeled information contained in the current prediction residual.
[0046] At the same time, among the reduced-order basis function set currently used by the model, find the basis function associated with the minimum singular value, and consider this basis function as the basis function that contributes the least and should be replaced the most in the current set, denoted as . Perform a replacement operation to remove from the current basis function set, and add the previously selected best candidate basis function to the set, thereby completing the update of the reduced-order basis function.
[0047] The embodiment of the chemical process real-time monitoring system based on digital twinning provided by the application: As shown in Figure 4 , the chemical process real-time monitoring system based on digital twinning includes a processor and a memory, and the memory stores computer program instructions, which realize the above-mentioned chemical process real-time monitoring method based on digital twinning when executed by the processor.
[0048] The chemical process real-time monitoring system based on digital twinning also includes a communication interface and other components well known to those skilled in the art, the settings and functions of which are known in the art, and therefore will not be described here.
[0049] In addition, in the description of the present specification, the meaning of "a plurality of" is at least two, such as two, three or more, etc., unless otherwise explicitly and specifically limited.
Claims
1. A method for real-time monitoring of chemical processes based on digital twins, characterized in that, include: S1, acquire historical operating data of high-fidelity mechanism model to build state snapshot dataset, and synchronously collect real-time measurement data of chemical process to be monitored; S2, Identify the process fluctuation intervals based on the time gradient of key state variables in the dataset, and calculate the standard deviation of the state vector within each process fluctuation interval; within each process fluctuation interval, if the minimum Euclidean distance between the candidate state snapshot and all state snapshots in the selected state snapshot set is greater than a predetermined multiple of the standard deviation, then select the candidate state snapshot to form an optimal snapshot matrix. S3. Construct a diagonal weight matrix based on the sensitivity of the target process index to each state variable, and multiply it with the preferred snapshot matrix to obtain a weighted snapshot matrix; perform singular value decomposition on the weighted snapshot matrix, extract a predetermined number of left singular vectors corresponding to the maximum singular values as reduced order basis functions, calculate the reduced order truncation error energy ratio, and construct a reduced order model based on the reduced order basis functions. S4, Real-time monitoring phase: Input real-time measurement data into the reduced-order model to calculate the predicted residual; Construct a monitoring threshold positively correlated with the energy ratio of the reduced-order truncation error; If the norm of the predicted residual is less than the monitoring threshold, use the Kalman filter algorithm to correct the state coefficients of the reduced-order model; Otherwise, Calculate the projection error of the predicted residual onto each basis function in the backup basis function library, and replace the basis function with the smallest singular value in the current reduced-order basis function library with the basis function with the smallest projection error in the backup basis function library; Output the full-order state vector reconstructed based on the corrected or updated reduced-order model.
2. The method for real-time monitoring of chemical processes based on digital twins according to claim 1, characterized in that, The high-fidelity mechanism model is a finite element or finite difference model constructed based on computational fluid dynamics or multiphysics coupling.
3. The method for real-time monitoring of chemical processes based on digital twins according to claim 1, characterized in that, Based on the time gradient of key state variables in the dataset, the process fluctuation range is identified, including: For each key state variable, calculate its time gradient at each time step; if the absolute value of the time gradient of any key state variable is greater than the absolute value threshold of the time gradient, mark the time point and the two time points before and after the time point as fluctuation time points; merge all marked fluctuation time points to form the process fluctuation interval.
4. The real-time monitoring method for chemical processes based on digital twins according to claim 3, characterized in that, Within each process fluctuation range, if the minimum Euclidean distance between the candidate state snapshot and all state snapshots in the selected state snapshot set is greater than a predetermined multiple of the standard deviation, then the candidate state snapshot is selected, including: The first state snapshot of each process fluctuation range is added to the selected state snapshot set as the initial state snapshot. For the remaining candidate state snapshots within the process fluctuation range, calculate the Euclidean distance between the candidate state snapshot and each state snapshot in the set of selected state snapshots in turn, and take the minimum value. If the minimum value is greater than 1.5 times the standard deviation of the state vector in the process fluctuation range, then the candidate state snapshot is added to the set of selected state snapshots.
5. The method for real-time monitoring of chemical processes based on digital twins according to claim 1, characterized in that, Construct a diagonal weight matrix based on the sensitivity of the target process parameters to each state variable, including: For the The state variable and the first The sensitivity of each target process parameter is calculated using the finite difference method. Sensitivity Used to represent the change in target process parameters when a state variable undergoes a unit change; The first Sensitivity of each state variable to all target process parameters Summing the absolute values of the , we get the . Total sensitivity of each state variable ; Constructing the diagonal weight matrix: The diagonal weight matrix of the first... Line number The diagonal elements of the column are All other off-diagonal elements are 0.
6. The real-time monitoring method for chemical processes based on digital twins according to claim 5, characterized in that, Extract a predetermined number of left singular vectors corresponding to the largest singular values as reduced-order basis functions, and calculate the reduced-order truncation error energy ratio, including: Arrange the singular values in descending order as follows: ; from Initially, singular values are accumulated sequentially to determine the energy ratio that is satisfied. The smallest integer ; Extract and Previous A singular value to The corresponding left singular vector serves as a reduced-order basis function; The reduced-order truncation error energy ratio is .
7. The method for real-time monitoring of chemical processes based on digital twins according to any one of claims 1-6, characterized in that, Construct monitoring thresholds that are positively correlated with the energy ratio of the reduced-order truncation error, including: The mean is calculated using the predicted residual norm under historical normal operating conditions. and standard deviation Set static baseline threshold ; The monitoring threshold Calculated using the following formula: ,in, The energy ratio of the reduced-order truncation error.
8. The method for real-time monitoring of chemical processes based on digital twins according to claim 7, characterized in that, The state coefficients of the reduced-order model are corrected using the Kalman filter algorithm, including: The state coefficient vector of the reduced-order model is used as the state vector of the Kalman filter, and the state transition matrix is set as the identity matrix. Real-time measurement data is used as the measured value, and the current reduced-order basis function matrix is used as the observation matrix; Based on the prediction and update steps of the Kalman filter, the corrected state coefficient vector is obtained by iterative calculation using real-time measurement data.
9. The method for real-time monitoring of chemical processes based on digital twins according to claim 8, characterized in that, Calculate the projection error of the predicted residual onto each basis function in the backup basis function library, and replace the basis function with the smallest singular value in the current reduced-order basis function library with the basis function with the smallest projection error in the backup basis function library, including: For each alternative basis function in the alternative basis function library Calculate projection error ,in To predict residuals; In all calculated projection errors Find the minimum value in the middle. And determine the corresponding alternative basis functions. ; In the current set of reduced-order basis functions, find the basis function corresponding to the minimum singular value. ; use replace This yields the updated set of reduced-order basis functions.
10. A real-time monitoring system for chemical processes based on digital twins, characterized in that: It includes a memory and a processor, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the real-time monitoring method for chemical processes based on digital twins as described in any one of claims 1-9 is implemented.
Citation Information
Cited By
Thermal coupling field state inversion method and device for compressor hot charging process
CN122021357A