Phase alignment causally explainable soft-sensing method and device for petrochemical processes
Patent Information
- Application Number
- CN202611222607.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-13
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2046-08-13
AI Technical Summary
基于上述概念,现有技术主要存在四方面的局限性:其一,相位对齐缺失,各过程变量之间存在各不相同的物理传输延迟,导致测量输出存在系统性的相位滞后;其二,训练目标对相位误差不敏感,常用的均方误差损失函数逐时间步独立计算,无法有效惩罚相位滞后造成的预测偏差;其三,频谱噪声干扰严重,固定参数的低通滤波器无法适应多变量系统中不同传感器信号各异的频谱分布特征;其四,工业部署链路缺乏标准化的解决方案,导致模型难以快速、稳定地集成到工厂的实时控制系统中
1、本发明实施因果延迟对齐,通过可微分数阶延迟对齐,消除了过程变量因物理传输时差未对齐而引起的人工去相关效应,从根本上解决了石化过程数据驱动软测量中多变量测量的相位滞后问题。学习到的延迟量与工厂已知的传输延迟物理规律高度吻合,可直接作为可解释性输出辅助工艺诊断。在真实的催化裂化装置汽油收率测量应用中,相对最优基线方法的均方误差(MSE)改善幅度超过92%。
Smart Images

Figure CN122738698B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent measurement and control technology for industrial processes, and in particular relates to a phase-aligned causal interpretable soft measurement method and device for petrochemical processes. Background Technology
[0002] In process industries such as petrochemicals, refining, and fine chemicals, the ability to measure key process parameters in real time and accurately is crucial for proactively optimizing operating conditions, ensuring product quality, and reducing energy consumption. Taking a catalytic cracking unit in a petrochemical company as an example, this unit consists of three main units: a reaction regeneration unit, a fractionation unit, and an absorption stabilization unit. The core indicator that needs to be monitored is the stable gasoline yield. However, this indicator cannot be directly measured and statistically analyzed in real time using existing instruments after the process is complete and the product has flowed into the pipeline. Therefore, this indicator can only be obtained through soft sensing technology, that is, by using mathematical models and hundreds of process variables such as temperature, pressure, and flow rate that can be measured in real time to calculate the gasoline yield. Moreover, the physical transmission delays of these upstream process variables affecting the gasoline yield vary; some variables react quickly, while others react slowly, resulting in typical heterogeneous transmission delay characteristics.
[0003] All the data required for the aforementioned soft sensor model, including process variables that can be directly measured in real time for input, and historical real-world test values of target variables used for model training but with time lags, all originate from the data collected and recorded by the distributed control system (DCS) of actual industrial production processes. This industrial data exhibits typical characteristics such as strong coupling of multiple variables, varying transmission delays, and severe sensor noise interference. However, existing mainstream data-driven soft sensor methods have significant technical limitations in handling these data characteristics. To more clearly illustrate these limitations, several key concepts must first be clarified. A petrochemical process refers to a continuous industrial production process that uses crude oil and petroleum fractions as raw materials, and through a series of continuous chemical processes such as reaction, separation, heat exchange, and transportation, produces products such as gasoline, diesel, liquefied petroleum gas, and chemical raw materials. In this process, process variables refer to auxiliary process variables that can be measured in real time by sensors and used as model inputs, such as temperature, pressure, and flow rate. The industrial deployment chain refers to the complete process from the completion of the soft sensor model development to its final implementation and operation in the distributed control system (DCS), encompassing the entire process of real-time data acquisition and transmission, online model inference calculation, result storage and display, and predictive value feedback control. Based on the above concepts, existing technologies have four main limitations: First, phase alignment is lacking, and different physical transmission delays exist between process variables, resulting in systematic phase lag in the measurement output; second, the training target is not sensitive to phase errors, and the commonly used mean square error loss function is calculated independently step by step, which cannot effectively punish the prediction bias caused by phase lag; third, spectral noise interference is severe, and low-pass filters with fixed parameters cannot adapt to the different spectral distribution characteristics of different sensor signals in multivariable systems; fourth, there is a lack of standardized solutions for industrial deployment links, making it difficult to quickly and stably integrate the model into the factory's real-time control system.
[0004] Therefore, how to simultaneously solve the four core problems of process variable phase alignment, adaptive spectrum denoising, phase-aware training target design and complete industrial deployment within an end-to-end trainable framework is a pressing challenge for current petrochemical process data-driven soft measurement technology. Summary of the Invention
[0005] This invention proposes a phase-aligned causal interpretable soft measurement method and apparatus for petrochemical processes. Through the collaborative design of adaptive frequency denoising, end-to-end causal delay alignment, dual-path parallel coding, and anti-hysteresis compound loss, it fundamentally solves the phase lag problem of multivariate measurements in data-driven soft measurement of petrochemical processes and provides a complete deployment scheme.
[0006] To achieve the above objectives, the technical solution of the present invention is implemented as follows: A phase-aligned causal interpretable soft measurement method for petrochemical processes includes: S1. Collect multivariate process time series data from the industrial distributed control system and construct the original observation tensor of the process variables, while extracting the corresponding historical sequence of the target variable; perform reversible instance normalization RevIN preprocessing to obtain the standardized original sequences of the process variables and the target variables respectively, and send the standardized original sequences of the process variables into the direct path branch and the causal path branch. S2. The causal path branch performs adaptive frequency denoising on the input standardized original sequence to obtain the denoised intermediate feature sequence. Then, through causal delay alignment, the process variables of the denoised intermediate feature sequence are causally aligned with the target variable in time, and the causal aligned sequence is output. S3. The normalized original sequence of the direct path branch and the causal aligned sequence of the causal path branch are fed into two hybrid encoder streams with the same structure but independent parameters. They are projected to the hidden token space through linear embedding and cross-variable token mixing and channel mixing are performed sequentially using multiple stacked hybrid coding blocks to output direct path features and causal path features respectively. S4. The token content of each process variable is concatenated according to the direct path feature and the causal path feature, and the weighted fusion of the variable-wise dual-stream hybrid weight related to the content is calculated by the perceptron network and the normalized exponential function to obtain the process variable fusion token. S5. Generate a target variable token as a query anchor based on the standardized original sequence of the target variable. Combine the process variable fusion token with the target variable token to calculate the relevance gating score for all process variables. Use the gating score to weighted aggregate to obtain the context vector. Fuse the target variable features and output the soft measurement prediction value. S6. Perform inverse normalization scaling on the soft measurement predictions to output the final soft measurement values with physical engineering dimensions.
[0007] Furthermore, it also includes: S7. Perform anti-hysteresis composite loss training to construct a composite objective function for end-to-end joint training. The composite objective function includes point-level mean square error loss, differential shape loss, direction anchor penalty, delay regularization loss, dual-stream fusion entropy polarization auxiliary loss, and target gated polarization auxiliary loss. The above items are weighted and added together. Among them, the point-level mean square error loss is used to evaluate the accuracy of progressive prediction values, the differential shape loss is used to match the waveform trajectory of time difference increment, and the direction anchor penalty is used to apply a direction penalty when the predicted direction is opposite to the true differential direction.
[0008] Furthermore, step S6 also includes: Based on the final soft measurement value, the operating status of equipment in the petrochemical process is given a real-time warning, or adjustment commands are dynamically output to the upstream process control system.
[0009] Furthermore, the adaptive frequency noise reduction in step S2 includes: The time-series signals of each variable in the standardized original sequence are divided into blocks using overlapping windows. The blocks are then transformed to the frequency domain using real-valued fast Fourier transform. Each frequency block is independently amplitude-modulated using a learnable variable-wise frequency gating matrix to achieve adaptive bandpass filtering. The denoised signal is reconstructed by inverse transform and overlapping, and the denoising intensity is controlled by a learnable scalar residual gating to output the intermediate denoised feature sequence.
[0010] Furthermore, the causal delay alignment described in step S2 includes: The noise reduction intermediate feature sequence is received, and a continuous delay parameter is learned for each variable. The continuous delay parameter is constrained within a set maximum delay budget range by a nonlinear activation function and decomposed into an integer part and a fractional part. The subsampling precision delay shift of the continuous delay parameter is achieved by linear interpolation of adjacent time steps, so that each process variable and the target variable are causally aligned in time, and a causal alignment sequence is output.
[0011] Furthermore, during training, the continuous delay parameters are subject to a delay regularization loss consisting of an anti-initialization penalty, a diversity penalty, a minimum delay penalty, and an alignment quality auxiliary loss, to prevent all variables from collapsing to the same extreme value.
[0012] Furthermore, the token mixing in step S3 includes applying two layers of perceptrons along the variable dimension within each mixed coding block to perform cross-variable information aggregation and interaction; the channel mixing includes applying two layers of perceptrons, first expanding and then compressing, within the feature dimension of each variable to perform deep feature transformation.
[0013] Furthermore, the calculation of the correlation gating score in step S5 includes: Each process variable fusion token in the process variable fusion token matrix is concatenated with the target variable token to obtain a concatenation vector. After the concatenation vector is applied by a two-layer perceptron, the correlation gating score is obtained by the sigmoid activation function.
[0014] Furthermore, the inverse normalization scaling restoration described in step S6 is performed based on the mean and standard deviation statistics of the target variable in the reversible instance normalization RevIN preprocessing of step S1.
[0015] In another aspect, the present invention also proposes a phase-aligned causal interpretable soft measurement device for petrochemical processes, comprising: Preprocessing module: Collects multivariate process time series data from industrial distributed control systems and constructs the original observation tensors of process variables, while extracting the corresponding historical sequences of target variables; performs reversible instance normalization RevIN preprocessing to obtain the standardized original sequences of process variables and target variables respectively, and sends the standardized original sequences of process variables into direct path branches and causal path branches; Causal alignment module: The causal path branch performs adaptive frequency denoising on the input standardized original sequence to obtain the denoised intermediate feature sequence, and causally aligns the process variables of the denoised intermediate feature sequence with the target variable in time through causal delay alignment, and outputs the causal aligned sequence. Hybrid coding module: The normalized original sequence of the direct path branch and the causal aligned sequence of the causal path branch are fed into two hybrid encoder streams with the same structure but independent parameters. They are projected to the hidden token space through linear embedding and then perform cross-variable token mixing and variate-wise channel mixing in turn using multiple stacked hybrid coding blocks to output direct path features and causal path features respectively. The splicing and fusion module splices the token content of each process variable according to the direct path features and the causal path features, and calculates the content-related variable-wise dual-stream hybrid weights through a perceptron network and a normalized exponential function, and performs weighted fusion to obtain the process variable fusion token. Perception Aggregation Module: Generates target variable tokens as query anchors based on the standardized original sequence of the target variable, combines them with the process variable fusion tokens, calculates the relevance gating scores for all process variables, uses the gating scores for weighted aggregation to obtain the context vector, fuses the target variable features, and outputs the soft measurement prediction value; Inverse normalization module: Performs inverse normalization scaling on the soft measurement predictions to output the final soft measurement values with physical engineering dimensions.
[0016] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention implements causal delay alignment. By aligning with differentiable fractional-order delays, it eliminates the artificial decorrelation effect caused by misalignment of physical transmission time differences in process variables, fundamentally solving the phase lag problem in multivariate measurements in data-driven soft measurement of petrochemical processes. The learned delay quantity highly matches the known physical laws of transmission delay in the plant and can be directly used as an interpretable output to assist in process diagnosis. In real-world gasoline yield measurement applications in catalytic cracking units, the mean square error (MSE) improvement compared to the optimal baseline method exceeds 92%.
[0017] 2. This invention uses adaptive frequency noise reduction to adaptively filter the different noise spectrum characteristics of different sensors in a multivariable system. Combined with low-frequency bias initialization and scalar residual gating mechanism, it effectively ensures the gradient stability of soft measurement in the early stage of training.
[0018] 3. This invention proposes dual-path complementary coding and content-related fusion. The direct path fully preserves the full-band information and short-range dynamics of the original signal, while the causal path specifically encodes the pure cross-variable causal dependencies after delay alignment. Through Softmax fusion gating, the dual-path representation information can be adaptively combined according to the content characteristics of different variables.
[0019] 4. The present invention designs anti-hysteresis compound loss training, which innovatively supervises measurement quality from three levels: numerical accuracy, temporal pattern, and direction of change, overcoming the fundamental defect that the standard mean square error (MSE) is insensitive to phase hysteresis error.
[0020] 5. This invention can output the causal delay of each variable (supporting the distinction between fast and slow critical variables), the mixed weight of the two streams, and the target gating score. These data interfaces can provide process engineers with a basis for sensor importance analysis and process diagnosis, and have extremely strong industrial practical value.
[0021] 6. This invention provides a complete industrial deployment solution that integrates DCS data acquisition, industrial time-series data transmission, asynchronous inference prediction, and front-end output display. It can be directly used as the core underlying support component of a factory AI digital monitoring and dynamic process optimization system. Attached Figure Description
[0022] Figure 1 This is a flowchart of the method in Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the structure of Embodiment 4 of the present invention. Detailed Implementation
[0023] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.
[0024] To make the purpose and features of this invention patent more apparent and understandable, the invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
[0025] Example 1: This embodiment provides a phase-aligned, causally interpretable soft measurement method for petrochemical processes, such as... Figure 1 As shown, it includes: S1: Data acquisition, normalization, and dual-path splitting.
[0026] Multivariate process time-series data are collected from industrial distributed control systems (DCS) or industrial Internet of Things (IIoT) time-series databases to form the original observation tensors of the process variables. ,in Let B represent the set of real numbers, L be the batch size, L be the lookback window length, and N be the number of process variables. Simultaneously, extract the corresponding historical sequence of the target variable. For the original observation tensor The process variable data and its target variable historical sequence are independently preprocessed using Reversible Instance Normalization (RevIN), which involves independently calculating the mean and standard deviation within the lookback window for each variable and standardizing the sequence to zero mean and unit variance. The processed process variable data are then internally rearranged. Then, the standardized raw sequences of the process variables are obtained and fed into the direct path branch and the causal path branch, respectively; the standardized raw sequence of the target variable is obtained after performing RevIN on the historical sequence of the target variable, denoted as... .
[0027] In the subsequent step S6, the prediction results of soft measurement are denormalized based on the mean and standard deviation of the target variable recorded here, and restored to physical engineering dimensions, thereby eliminating dimensional differences and non-stationary mean drift.
[0028] S2: Causal path adaptive frequency noise reduction and causal delay alignment.
[0029] 1. Adaptive frequency noise reduction: This step is performed only on the branching causal path from which the current branch originates. The time series signals of each variable are divided into M overlapping windows with a step size s, and the window length is P. The formula for calculating the number of windows M is as follows: ; For the m-th window of process variable n Performing a real-valued Fast Fourier Transform (RFFT) yields the complex spectrum. The frequency bin number K is calculated as follows (where... (representing a K-dimensional complex vector space) ; Through a learnable variable-wise frequency gating matrix Apply Sigmoid gating to each frequency module This operation only scales the amplitude without changing the phase, and is equivalent to adaptive bandpass filtering.
[0030] Filtered spectrum bin The calculation formula is as follows: ; Where k is the frequency bin index. , This represents the Sigmoid gating of the k-th frequency bin of process variable n.
[0031] The gate matrix is initialized with a low-frequency bias, let... Let this be the initial gating value for the k-th frequency bin of process variable n. The initial gating value varies with the frequency bin index. Monotonically decreasing: ; in The hyperparameter for controlling the low-frequency bias slope has a range of values of [value range missing]. Preferred ; When k=0 (representing the DC component), the initial gate value is... When k = K-1 (representing the highest frequency), the initial value is... After being restored by inverse real-valued fast Fourier transform (IRFFT), the filtered sequence is reconstructed by overlapping and adding the results. Gated by scalar residuals Control the overall noise reduction intensity, among which The learnable scalar residual gating parameters are initialized to 0. The output is the denoised intermediate feature sequence of the causal path branch. , its first road sequence The calculation formula is as follows: ; In the formula, This is the filtering correction amount, i.e., the increment of the denoised signal relative to the original signal. When As it approaches negative infinity, the gate value As the value approaches zero, the module degenerates into an identity mapping, i.e. ;when When initialized to 0, the gate value is... In the early stages of training, the module fuses the original and filtered sequences using equal-weighted residual interpolation. This prevents the filtered branch from completely replacing the original signal, thereby reducing the risk of information loss due to excessive noise reduction during the initial training phase. Parameters The noise reduction intensity can be freely adjusted during training to learn the optimal level.
[0032] 2. Causal Delay Alignment: Learn scalar parameters for each process variable n in the denoised intermediate feature sequence. Continuous delay Constrained by the Sigmoid function and the maximum delay budget Inside: ; Will Decompose into integer parts (For full-step shifts) and fractional parts (For subsampling interpolation), achieving delay shift that is differentiable with respect to continuous delay parameters at non-integer delay boundaries through linear interpolation. Let... Use time step indices to output causal aligned sequences. Its time step The value is calculated as follows: ; ; in Represents the set of non-negative integers. The subscript [ ] is a time index boundary protection operation. When the calculated time step index is less than 0, it is forcibly truncated to 0 to prevent the data index from going out of bounds.
[0033] because It occurs linearly, and except for integer delay boundaries, the gradient can propagate backward from the aligned sequence to the delay parameter. During training, a delay regularization loss consisting of an anti-initialization penalty, a diversity penalty, a minimum delay penalty, and an alignment quality auxiliary loss is applied. To prevent all variables from collapsing to the same extreme value due to delay: Deinitialization penalty: ; Diversity penalty: ; Minimum delay penalty: ; ; in To modify the activation function of the linear unit, This represents the set consisting of continuously delayed parameters for all variables. Represented by natural constant An exponential function with base 0, in the formula The denominator constant 8 is a Gaussian width-adjusted hyperparameter, corresponding to approximately [value missing] near the initial expected delay. Constraints of multiple standard deviations; With the mean as Standard deviation is Initialize using a normal distribution. = ·σ(-2)≈0.119· This represents the initial expected delay. `std` and `mean` represent the standard deviation and mean calculations, respectively. Alignment quality auxiliary loss is also included. By maximizing the mean absolute Pearson correlation coefficient between each alignment process variable and the target variable. To supervise the process. The aligned sequence of the target variable is processed using a stopping gradient sg method to prevent gradient leakage: ; ; in For the mean-centered aligned sequence of process variable n, This is the mean-centered form of the historical sequence of the target variable. Represents the vector dot product. This indicates that the gradient operation is stopped. It represents the smallest positive number that is a numerically stable term. Quantify the degree of linear correlation between the nth alignment process variables and the target variable. To align quality loss weights.
[0034] S3: Dual-path hybrid encoding.
[0035] Construct two identical but parameter-independent hybrid encoder streams. The direct path branch uses the normalized raw sequence of the process variables output in step S1. For the input corresponding to the hybrid encoder stream; the causal path branches are the causal alignment sequence output in step S2. This is the input to another hybrid encoder stream.
[0036] After the two sequential data streams are input into the hybrid encoder, they are projected onto the d-dimensional token space through linear embedding layers with independent parameters. (d is the dimension of the hidden layer features), where These represent direct path A and causal path B, respectively. ; In the formula, For activation function, Representation layer normalization, and Weights and biases for the linear mapping. Piecewise input variables. Defined as: when hour, That is, the direct path receives the raw data; when hour, That is, the causal path receives the clean data after noise reduction and alignment. The two streams each pass through... The process involves stacked mixed coding blocks, with each block sequentially undergoing token mixing and channel mixing. Let U be the input feature tensor of the current block. Let be the intermediate feature tensor after token mixing. The output feature tensor after channel mixing; To expand dimensions, For discarding layers, For transpose operation, For a token-based hybrid network, the learnable weight matrix is... Here is the learnable weight matrix in a channel hybrid network: Token mixing: ; Channel mixing: ; In token mixing Cross-variable interaction is achieved directly along the variable dimension through left multiplication; in channel mixing. The transformation is performed within the feature dimension by right multiplication by the transpose matrix; each of the two streams outputs its direct path feature. and causal path features .
[0037] S4: Dual-stream content gating fusion.
[0038] For each process variable direct path features Tokens in and causal path features Tokens in After splicing, the data is input into a two-layer perceptron to obtain... After Softmax normalization, the content-related, variable-wise dual-stream hybrid weights are obtained. : ; ; in These are the weights of the first and last layers of a two-layer perceptron; Then, based on the variable-wise dual-stream mixing weights, a weighted fusion is performed to obtain the fusion token for process variable n. ; .
[0039] The final layer weight Initialize to zero to ensure unbiased fusion during the initial training phase. Apply a two-stream fusion entropy polarization auxiliary loss. By minimizing Shannon entropy, gating generates explicit preferences: ; Where E represents the expected average over all variables. These represent direct path A and causal path B, respectively. Represents the natural logarithm; This is a parameter with a value of 0.01.
[0040] S5: Target-aware aggregation.
[0041] Based on the standardized original sequence of the target variable obtained in step S1 The target variable token is obtained through linear mapping and activation function. ;in The weights represent the linear mapping. Indicates bias. As a query anchor, it serves only as a query reference for context extraction, is independent of process variables, and does not participate in subsequent process variable sorting.
[0042] Fusion tokens combined with process variable n The Sigmoid gating score of the correlation between process variables is calculated using a perceptron network. Quantify the contribution of each process variable to the target soft measurement: ; in Let be the learnable weight matrix of the target gating network.
[0043] When the total number of process variables exceeds the set high-dimensional threshold (e.g.) When this occurs, it automatically switches to a contention-based sparse gating mechanism. Only retain the player with the highest gating score. Each process variable participates in aggregation, defining the active variable set. Exemplary Sparsed gating score Calculate using the following standard piecewise function: .
[0044] The context vector c is obtained by weighted aggregation of gating scores (or sparsed gating scores) and then fused with the target variable token. At the output end, the time-step output dimension transformation and alignment are completed through an output mapping layer, which is composed of a weight matrix. and bias terms Achieve this; then superimpose the standardized real observations from the final step. As a residual anchor point, and The broadcast is superimposed onto all H prediction steps to obtain the soft measurement prediction value. .
[0045] ; ; ; in, When the sparse mechanism is enabled, the effective gating weights that ultimately participate in the aggregation are... ,otherwise ; To fuse the learnable weight matrix of the perceptron, To integrate the updated target token, and These are the weight matrix and bias term of the output mapping layer, respectively. To predict the step size, It represents the smallest positive number that is a numerically stable term.
[0046] This step involves setting gated polarization auxiliary loss. By minimizing the Bernoulli variance corresponding to the gating scores of each variable. This drives the gating score to tend towards 0 or 1, producing a binary-like variable selection effect. To ensure that the polarization loss only penalizes valid variables participating in the actual aggregation and avoids the expected dilution problem caused by unselected variables, the loss function is designed in a piecewise form: when the competitive sparse gating mechanism is not enabled (e.g., ), in all Averaging over process variables; when competitive sparse gating is enabled (e.g.) Only in the active variable set Calculate the average above: ; Weighting coefficients in the formula Bernoulli variance Indicates parameters The variance of the Bernoulli distribution, when When the time is zero, The maximum value is 0.25.
[0047] S6: Denormalization reduction.
[0048] Soft measurement predicted value By the mean of the target variable and standard deviation Reverting to physical engineering dimensions yields the final soft measurement values. : ; target variable mean and standard deviation The data used is the one calculated and recorded during the reversible instance normalization of the historical sequence of the target variable in step S1.
[0049] S7: Training to combat hysteresis compound loss.
[0050] To overcome the insensitivity of the standard MSE to phase, a multi-weighted composite objective function is constructed. All training losses are calculated in the RevIN normalized space, where the true target sequence is the normalized original sequence of the target variable after standardization in step S1; during the inference output stage, it is then inversely normalized to physical engineering dimensions according to the formula in step S6.
[0051] Component 1: Point-level mean square error loss This measures the accuracy of progressively predicted numerical values. For batch indexing, For predicting the time step index, For the corresponding real target sequence value, For the corresponding soft measurement prediction values: .
[0052] Component 2: Differential Shape Loss Anchor points are spliced before the measurement sequence (the actual target sequence and the soft measurement prediction sequence). Construct augmented sequences ( To predict augmented sequences, (for real augmented sequences), supervised time difference increment trajectory; where This represents the first-order difference operator along the time step. and These are the first-order difference increments between the predicted sequence and the true sequence: ; .
[0053] Component 3: Directional Anchor Point Penalty A penalty is applied only when the direction of change of the predicted value (increasing or decreasing) is opposite to the direction of change of the actual value; the true difference is treated as a constant. ; Where sg represents the stop gradient operation. The directional anchor penalty applies the stop gradient operation to the true difference to prevent gradient leakage through the real data path. This penalty term is complementary to the difference morphology loss, providing dual supervision and suppressing phase alignment errors from both the temporal increment level and the change sign level.
[0054] Overall composite objective function For the weighted combination of each item, where The balancing weights for each loss are as follows: ; The overall composite objective function is the final cost function for jointly optimizing and updating the soft measurement parameters.
[0055] During the testing phase, only point-level mean square error loss is used. An evaluation was conducted to ensure a fair comparison with baseline methods.
[0056] In this embodiment, after obtaining the final soft measurement value, interpretable output can be provided. In addition to the final soft measurement value, the learning causal delay of each variable reflects the physical transmission delay of the process variable to the target variable; the dual-stream mixed weight indicates the degree of emphasis of each variable's features on the direct path or causal path; the gating score quantifies the contribution of each process variable to the target soft measurement, with process variables with high gating scores being key sensors and process variables with scores close to zero being redundant measurement points. Simultaneously, based on the output content, real-time early warnings can be provided for the equipment operating status in the petrochemical process, or adjustment commands can be dynamically output to the upstream process control system.
[0057] This embodiment fundamentally solves the phase lag problem in industrial multivariate measurements through the collaborative design of adaptive frequency denoising, end-to-end causal delay alignment, dual-path parallel coding, and anti-hysteresis composite loss.
[0058] Example 2: This embodiment is an application example of the method described in Embodiment 1.
[0059] The debutanizer column is a typical distillation unit in the petrochemical industry. Its data comes from a publicly available benchmark dataset, with a sampling interval of 6 minutes and approximately 2205 records. The dataset contains 7 process input variables and 1 quality output variable, as detailed below: Process variables: This refers to the top temperature of the tower. This refers to the top pressure of the tower. This refers to the reflux flow. The distillation flow rate is the flow rate to the next process. This refers to the temperature of the 6th tray. Let A be the bottom temperature of the tower. B is the bottom temperature of the tower.
[0060] Target variable: This refers to the butane content at the bottom of the tower, which is the mole fraction of C4 hydrocarbon components.
[0061] The effects of the above seven process variables on the butane content at the bottom of the column exhibit varying degrees of transmission delay, among which... The response of the bottom temperature of the tower to the target variable is relatively fast (delay approximately). Step), return flow Distillation flow rate The response of the target variable affected by mass transfer and heat exchange processes is relatively slow (delay approximately...). step).
[0062] Soft measurement hyperparameters: lookback window L=40 steps (corresponding to 240 minutes), prediction step size Step, frequency denoising window P=12, step size s=6, hidden layer dimension d=32, feedforward dimension Number of mixed coding blocks R=1, maximum delay budget =8 steps, batch size 16, learning rate 0.001, maximum number of training rounds 100, early stop patience 10 rounds; =1.0 (default value) =0.5~1.0, =0.5~1.0 (adjust according to the measurement step).
[0063] Table 1 Comparison of predicted MSE for butanizer towers
[0064] In Table 1 above, the "ours" row contains the predicted MSE of the butanizer tower using the method of this invention; the last row, "improvement," indicates the reduction in MSE achieved by the method of this invention compared to the optimal baseline method, PatchTST, in this embodiment. As shown in Table 1, the method of this invention achieves the optimal MSE at all three measurement step sizes, and the advantage significantly increases with increasing measurement step size (a 10.0% reduction at H=5 and a 27.2% reduction at H=20), indicating that the anti-hysteresis loss is particularly effective in suppressing the cumulative phase error over long step sizes.
[0065] Example 3: This embodiment is another application example of the method described in Embodiment 1.
[0066] A petrochemical company's catalytic cracking (FCC) unit consists of three main units: a reaction regeneration unit, a fractionation unit, and an absorption stabilization unit. The target variable is the stable gasoline yield (mass percentage). Data is obtained from the DCS data collection records during actual unit operation, with a sampling interval of 5 minutes. There are a total of 520 process variables, i.e., N=520 (representing the number of process variables participating in target gating and key sensor identification). The historical sequence of the target variable is used as the target token or residual anchor point input and does not participate in TopK process variable ranking. TopK competitive sparse gating is automatically enabled. Hyperparameter settings are the same as in Example 1, with a measurement step size H∈{6,12,24} steps.
[0067] Table 2 Comparison of MSE in Catalytic Cracking Gasoline Yield Measurement
[0068] In Table 2 above, the "ours" row contains the MSE (Mean Sequence Estimate) of catalytic cracking gasoline yield measured using the method of this invention. Among other methods, the optimal baseline is iTransformer when H=6, PatchTST when H=12, and DLinear when H=24. The method of this invention improves the MSE by more than 92% relative to the optimal baseline method at all three measurement steps, fully demonstrating the strong time-delay coupling between the process variables and the target variables of this invention. Traditional methods deviate significantly from the effective signal when trained on high-dimensional unaligned process variables.
[0069] Example 4: This embodiment proposes a phase-aligned, causally interpretable soft measurement device for petrochemical processes, such as... Figure 2 As shown, it includes: Preprocessing module: Collects multivariate process time series data from industrial distributed control systems and constructs the original observation tensors of process variables, while extracting the corresponding historical sequences of target variables; performs reversible instance normalization RevIN preprocessing to obtain the standardized original sequences of process variables and target variables respectively, and sends the standardized original sequences of process variables into direct path branches and causal path branches; Causal alignment module: The causal path branch performs adaptive frequency denoising on the input standardized original sequence to obtain the denoised intermediate feature sequence, and causally aligns the process variables of the denoised intermediate feature sequence with the target variable in time through causal delay alignment, and outputs the causal aligned sequence. Hybrid coding module: The normalized original sequence of the direct path branch and the causal aligned sequence of the causal path branch are fed into two hybrid encoder streams with the same structure but independent parameters. They are projected to the hidden token space through linear embedding and then perform cross-variable token mixing and variate-wise channel mixing in turn using multiple stacked hybrid coding blocks to output direct path features and causal path features respectively. The splicing and fusion module splices the token content of each process variable according to the direct path features and the causal path features, and calculates the content-related variable-wise dual-stream hybrid weights through a perceptron network and a normalized exponential function, and performs weighted fusion to obtain the process variable fusion token. Perception Aggregation Module: Generates target variable tokens as query anchors based on the standardized original sequence of the target variable, combines them with the process variable fusion tokens, calculates the relevance gating scores for all process variables, uses the gating scores for weighted aggregation to obtain the context vector, fuses the target variable features, and outputs the soft measurement prediction value; Inverse normalization module: performs inverse normalization scaling on the soft measurement predictions and outputs the final soft measurement values with physical engineering dimensions; Hysteresis-resistant composite loss training module: Constructs an end-to-end joint training composite objective function, which includes point-level mean square error loss, differential shape loss, direction anchor penalty, delay regularization loss, dual-stream fusion entropy polarization auxiliary loss, and target gated polarization auxiliary loss. The above items are weighted and added together. Among them, the point-level mean square error loss is used to evaluate the accuracy of progressive prediction values, the differential shape loss is used to match the waveform trajectory of time difference increment, and the direction anchor penalty is used to apply a direction penalty when the predicted direction is opposite to the true differential direction.
[0070] The denormalization module also includes: Based on the final soft measurement value, the operating status of equipment in the petrochemical process is given a real-time warning, or adjustment commands are dynamically output to the upstream process control system.
[0071] The adaptive frequency noise reduction described in the causal alignment module includes: The time-series signals of each variable in the standardized original sequence are divided into blocks using overlapping windows. The blocks are then transformed to the frequency domain using real-valued fast Fourier transform. Each frequency block is independently amplitude-modulated using a learnable variable-wise frequency gating matrix to achieve adaptive bandpass filtering. The denoised signal is reconstructed by inverse transform and overlapping, and the denoising intensity is controlled by a learnable scalar residual gating to output the intermediate denoised feature sequence.
[0072] The causal delay alignment described in the causal alignment module includes: The noise reduction intermediate feature sequence is received, and a continuous delay parameter is learned for each variable. The continuous delay parameter is constrained within a set maximum delay budget range by a nonlinear activation function and decomposed into an integer part and a fractional part. The subsampling precision delay shift of the continuous delay parameter is achieved by linear interpolation of adjacent time steps, so that each process variable and the target variable are causally aligned in time, and a causal alignment sequence is output.
[0073] The continuous delay parameter is subjected to a delay regularization loss during training, which consists of an anti-initialization penalty, a diversity penalty, a minimum delay penalty, and an alignment quality auxiliary loss, to prevent all variables from collapsing to the same extreme value.
[0074] The token mixing in the hybrid coding module includes applying two layers of perceptrons along the variable dimension within each hybrid coding block to perform cross-variable information aggregation and interaction; the channel mixing includes applying two layers of perceptrons, first expanding and then compressing, within the feature dimension of each variable to perform deep feature transformation.
[0075] The calculation of the relevance gating score in the perception aggregation module includes: Each process variable fusion token in the process variable fusion token matrix is concatenated with the target variable token to obtain a concatenation vector. After the concatenation vector is applied by a two-layer perceptron, the correlation gating score is obtained by the sigmoid activation function.
[0076] The denormalization scaling restoration described in the denormalization module is performed based on the mean and standard deviation statistics of the target variable in the reversible instance normalization RevIN preprocessing of the preprocessing module.
[0077] In practical deployments, the aforementioned phase-aligned causal-interpretable soft measurement device for petrochemical processes is integrated into the plant's AI digital monitoring and dynamic process optimization system according to the following scheme to fully support the device's operational logic: (1) Data acquisition layer. The factory DCS system continuously generates process variable data at a set sampling period (6 minutes for the butane dehydrogenator and 5 minutes for other units), uploads it to the factory edge server through the industrial standard communication protocol, writes it into the industrial time series database, stores it in groups by equipment and variable, and supports high-frequency data millisecond-level writing and efficient time range query.
[0078] (2) Data transmission layer. A lightweight data stream agent is deployed on the edge server to periodically extract the latest process variable data from the industrial time series database according to the configured time window, encapsulate it into a standard data packet, and perform preprocessing such as outlier filtering, missing value interpolation, and timestamp alignment through the data stream processing platform before forwarding it to the model inference interface.
[0079] (3) Model Inference Layer. An inference service is built based on an asynchronous RESTful inference framework and deployed on a GPU inference server. The inference service assembles the input process variables into the original observation tensor and sends it to the phase-aligned causal interpretable soft measurement device for petrochemical processes. It outputs the final soft measurement value and interpretability information (causal delay, dual-stream hybrid weight, and gating score). The measured inference delay is about 15~35 milliseconds, which meets the requirements of industrial real-time control.
[0080] (4) Result storage layer. The inference service persists the output results of this device to a relational database. The record fields include prediction timestamp, prediction step size, prediction value of each step, RevIN statistic, causal delay value of each process variable, dual-stream mixed weight, gating score and active variable set.
[0081] (5) Front-end presentation layer. Based on the back-end RESTful API service framework, the front-end visualization framework implements: historical curves of target variables and comparison charts of multi-step measurements, causal delay distribution bar charts of various process variables (displayed by category for fast / slow key variables), heatmaps of dual-stream mixed weights and gating scores, a scrolling statistics panel for measurement errors, and a key sensor recommendation report. Process engineers can access the above visualization dashboards in real time through a browser to assist in production operation decisions and process parameter optimization.
[0082] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A phase-aligned causal interpretable soft measurement method for petrochemical processes, characterized in that, include: S1. Collect multivariate process time series data from the industrial distributed control system and construct the original observation tensor of the process variables, while extracting the corresponding historical sequence of the target variable; perform reversible instance normalization RevIN preprocessing to obtain the standardized original sequences of the process variables and the target variables respectively, and send the standardized original sequences of the process variables into the direct path branch and the causal path branch. Process variables include top temperature, top pressure, reflux flow rate, distillate flow rate, temperature of the 6th tray, bottom temperature A, and bottom temperature B; target variables include bottom butane content. S2. The causal path branch performs adaptive frequency denoising on the input standardized original sequence to obtain the denoised intermediate feature sequence. Then, through causal delay alignment, the process variables of the denoised intermediate feature sequence are causally aligned with the target variable in time, and the causal aligned sequence is output. S3. The normalized original sequence of the direct path branch and the causal aligned sequence of the causal path branch are fed into two hybrid encoder streams with the same structure but independent parameters. They are projected to the hidden token space through linear embedding and cross-variable token mixing and channel mixing are performed sequentially using multiple stacked hybrid coding blocks to output direct path features and causal path features respectively. S4. The token content of each process variable is concatenated according to the direct path feature and the causal path feature, and the weighted fusion of the variable-wise dual-stream hybrid weight related to the content is calculated by the perceptron network and the normalized exponential function to obtain the process variable fusion token. S5. Generate a target variable token as a query anchor based on the standardized original sequence of the target variable. Combine the process variable fusion token with the target variable token to calculate the relevance gating score for all process variables. Use the gating score to weighted aggregate to obtain the context vector. Fuse the target variable features and output the soft measurement prediction value. S6. Perform inverse normalization scaling on the soft measurement predictions to output the final soft measurement values with physical engineering dimensions.
2. The phase-aligned causal interpretable soft measurement method for petrochemical processes according to claim 1, characterized in that, Also includes: S7. Perform anti-hysteresis composite loss training to construct a composite objective function for end-to-end joint training. The composite objective function is obtained by weighted summation of point-level mean square error loss, differential shape loss, direction anchor penalty, delay regularization loss, dual-stream fusion entropy polarization auxiliary loss, and target gated polarization auxiliary loss. Among them, point-level mean square error loss is used to evaluate the accuracy of progressive prediction values, differential shape loss is used to match the waveform trajectory of time difference increment, and direction anchor penalty is used to apply a direction penalty when the predicted direction is opposite to the true differential direction.
3. The phase-aligned causal interpretable soft measurement method for petrochemical processes according to claim 1, characterized in that, Step S6 also includes: Based on the final soft measurement value, the operating status of equipment in the petrochemical process is given a real-time warning, or adjustment commands are dynamically output to the upstream process control system.
4. The phase-aligned causal interpretable soft measurement method for petrochemical processes according to claim 1, characterized in that, The adaptive frequency noise reduction in step S2 includes: The time-series signals of each variable in the standardized original sequence are divided into blocks using overlapping windows. The blocks are then transformed to the frequency domain using real-valued fast Fourier transform. Each frequency block is independently amplitude-modulated using a learnable variable-wise frequency gating matrix to achieve adaptive bandpass filtering. The denoised signal is reconstructed by inverse transform and overlapping, and the denoising intensity is controlled by a learnable scalar residual gating to output the intermediate denoised feature sequence.
5. The phase-aligned causal interpretable soft measurement method for petrochemical processes according to claim 1, characterized in that, The causal delay alignment described in step S2 includes: The noise reduction intermediate feature sequence is received, and a continuous delay parameter is learned for each variable. The continuous delay parameter is constrained within a set maximum delay budget range by a nonlinear activation function and decomposed into an integer part and a fractional part. The subsampling precision delay shift of the continuous delay parameter is achieved by linear interpolation of adjacent time steps, so that each process variable and the target variable are causally aligned in time, and a causal alignment sequence is output.
6. The phase-aligned causal interpretable soft measurement method for petrochemical processes according to claim 5, characterized in that, The continuous delay parameter is subjected to a delay regularization loss during training, which consists of an anti-initialization penalty, a diversity penalty, a minimum delay penalty, and an alignment quality auxiliary loss, to prevent all variables from collapsing to the same extreme value.
7. The phase-aligned causal interpretable soft measurement method for petrochemical processes according to claim 1, characterized in that, The token mixing in step S3 includes applying two layers of perceptron along the variable dimension within each mixed coding block to perform cross-variable information aggregation and interaction; the channel mixing includes applying two layers of perceptron first expanding and then compressing within the feature dimension of each variable to perform deep feature transformation.
8. The phase-aligned causal interpretable soft measurement method for petrochemical processes according to claim 1, characterized in that, The calculation of the correlation gating score in step S5 includes: Each process variable fusion token in the process variable fusion token matrix is concatenated with the target variable token to obtain a concatenation vector. After the concatenation vector is applied by a two-layer perceptron, the correlation gating score is obtained by the sigmoid activation function.
9. The phase-aligned causal interpretable soft measurement method for petrochemical processes according to claim 1, characterized in that, The inverse normalization scaling restoration described in step S6 is performed based on the mean and standard deviation statistics of the target variable in the reversible instance normalization RevIN preprocessing of step S1.
10. A phase-aligned, causally interpretable soft measurement device for petrochemical processes, characterized in that, include: Preprocessing module: Collects multivariate process time series data from industrial distributed control systems and constructs the original observation tensors of process variables, while extracting the corresponding historical sequences of target variables; performs reversible instance normalization RevIN preprocessing to obtain the standardized original sequences of process variables and target variables respectively, and sends the standardized original sequences of process variables into direct path branches and causal path branches; Process variables include top temperature, top pressure, reflux flow rate, distillate flow rate, temperature of the 6th tray, bottom temperature A, and bottom temperature B; target variables include bottom butane content. Causal alignment module: The causal path branch performs adaptive frequency denoising on the input standardized original sequence to obtain the denoised intermediate feature sequence, and causally aligns the process variables of the denoised intermediate feature sequence with the target variable in time through causal delay alignment, and outputs the causal aligned sequence. Hybrid coding module: The normalized original sequence of the direct path branch and the causal aligned sequence of the causal path branch are fed into two hybrid encoder streams with the same structure but independent parameters. They are projected to the hidden token space through linear embedding and then perform cross-variable token mixing and variate-wise channel mixing in turn using multiple stacked hybrid coding blocks to output direct path features and causal path features respectively. The splicing and fusion module splices the token content of each process variable according to the direct path features and the causal path features, and calculates the content-related variable-wise dual-stream hybrid weights through a perceptron network and a normalized exponential function, and performs weighted fusion to obtain the process variable fusion token. Perception Aggregation Module: Generates target variable tokens as query anchors based on the standardized original sequence of the target variable, combines them with the process variable fusion tokens, calculates the relevance gating scores for all process variables, uses the gating scores for weighted aggregation to obtain the context vector, fuses the target variable features, and outputs the soft measurement prediction value; Inverse normalization module: Performs inverse normalization scaling on the soft measurement predictions to output the final soft measurement values with physical engineering dimensions.
Citation Information
Patent Citations
Recommendation method and system based on double-view time domain comparison and alignment
CN122153176A
Method and device for processing digital pre-distortion data
WO2014063540A1