Multi-sensor fusion-based online calibration system for online vibration tube liquid densimeter
The online calibration system, which integrates multi-sensor fusion and dynamic decision-making, solves the measurement deviation problem of vibrating tube liquid density meters under fluctuating operating parameters, achieving high-precision and reliable online density measurement and adapting to the dynamic changes in industrial sites.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-26
- Publication Date
- 2026-04-10
AI Technical Summary
Existing vibrating tube liquid density meters face the influence of fluctuating operating parameters in industrial fields, leading to measurement deviations. Traditional calibration methods cannot adapt to dynamic changes, increase labor costs and reduce measurement accuracy, and lack credibility assessment and value mining of multi-source data complementarity.
An online calibration system based on multi-sensor fusion is adopted, including a data acquisition, preprocessing and fusion module, an online-offline dual-mode calibration decision module, an offline benchmark calibration module and a parameter correction module. It utilizes a gated attention mechanism and dynamic threshold decision, combined with the Levenberg-Marquardt algorithm for parameter correction, to achieve high-precision online density measurement and reliability assessment.
It accurately counteracts interference from operating conditions, achieves high-precision online density measurement, adapts to dynamic changes in industrial scenarios, avoids overcalibration or undercalibration, and ensures the reliability of measurement results and sensor parameters.
Smart Images

Figure CN121830376A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of automatic calibration of densitometers, and particularly relates to an online calibration system for an online vibrating tube liquid densitometer based on multi-sensor fusion. BACKGROUND
[0002] A vibrating tube liquid densitometer is widely used in the online detection of liquid density in the fields of petroleum, chemical industry, food and medicine due to its high measurement accuracy and fast response speed. The working principle of the vibrating tube liquid densitometer is based on the physical property that the natural frequency of a vibrating tube changes with the density of the liquid in the tube, and the density of the liquid is calculated by measuring the original frequency of the vibrating tube.
[0003] However, in actual industrial scenarios, the long-term stable operation of the vibrating tube liquid densitometer faces many challenges. The fluctuation of temperature and pressure in the industrial field, the change of liquid viscosity, and the instability of flow conditions will directly affect the vibration characteristics of the vibrating tube, resulting in deviation of the density measurement value. The traditional single-sensor measurement method cannot effectively offset such interference, and the existing calibration method mainly adopts a periodic offline calibration mode. The sample is manually sampled and sent to the laboratory for analysis by high-precision equipment, which not only interrupts the production process and increases the labor cost, but also cannot adapt to the dynamic changes of the working conditions due to the fixed calibration period. Some online calibration schemes only correct the sensor parameters based on single working condition point data, without considering the physical property constraints of the sensor, which may lead to the correction parameters exceeding the physical limit and reducing the measurement accuracy. At the same time, there is a lack of evaluation of the uncertainty of the calibration results, which cannot judge the reliability of the correction parameters and the traditional multi-sensor application cannot fully tap the complementary value of multi-source data by simply superimposing the data without adjusting the weight of each parameter according to the dynamic working conditions, which makes it difficult to realize high-precision online density calculation and reliability evaluation.
[0004] Therefore, there is an urgent need for an online calibration system that can fuse multi-source working condition data, dynamically decide the calibration mode, and reliably correct the core parameters. SUMMARY
[0005] The present application aims to at least solve one of the technical problems existing in the prior art. To this end, the present application proposes an online calibration system for an online vibrating tube liquid densitometer based on multi-sensor fusion, which is used to solve the following technical problems: The temperature, pressure fluctuation, liquid viscosity change, flow instability and other working condition parameters of the industrial site directly affect the vibration characteristics of the vibrating tube, causing the density measurement value to deviate, and the traditional single sensor measurement method cannot effectively offset such interference, the existing calibration mostly adopts a periodic offline calibration mode, which needs manual sampling and sending the sample to the laboratory for analysis by high-precision equipment, which not only interrupts the production process and increases the labor cost, but also the fixed calibration period cannot adapt to the dynamic change of working conditions, and the part of online calibration scheme only corrects the sensor parameters based on single working condition point data, without considering the physical property constraints of the sensor, which easily leads to the correction parameters exceeding the physical limit, thereby reducing the measurement accuracy; meanwhile, the calibration result uncertainty is not evaluated, and the reliability of the correction parameters and the traditional multi-sensor application cannot judge the reliability of the correction parameters and the traditional multi-sensor application cannot fully tap the complementary value of multi-source data, and it is difficult to realize the high-precision online density calculation and reliability evaluation.
[0006] To solve the above problems, the present application provides an online vibrating tube liquid density meter online calibration system based on multi-sensor fusion, comprising the following modules: A multi-sensor data acquisition module: including a vibrating tube density sensor, a temperature sensor, a pressure sensor, a viscosity sensor and a flow sensor, for synchronously acquiring liquid density raw data and working condition parameters; A data preprocessing and fusion module: preprocessing the raw data, constructing a multi-source feature fusion network based on a gated attention mechanism, obtaining the fused online density measurement value, and calculating the reliability evaluation index; An online-offline dual-mode calibration decision module: determining the calibration requirement based on a multi-dimensional dynamic threshold composite trigger condition, and dynamically selecting online self-calibration or triggering offline reference calibration process; An offline reference calibration module: automatically sampling and processing liquid samples, and obtaining offline reference density values through a laboratory-grade high-precision density analysis unit; A parameter correction and execution module: correcting the core measurement parameters of the vibrating tube density sensor based on the offline reference density value, and updating the online measurement model; A data storage and visualization module: storing calibration process data and real-time displaying measurement and calibration status.
[0007] Preferably, the data preprocessing and fusion module comprises: A data preprocessing unit: using a sliding time window mechanism to align the collected data in time sequence and remove outliers; The multi-source feature fusion network based on the gated attention mechanism is constructed, specifically: Feature embedding unit: The preprocessed temperature, pressure, viscosity and flow rate parameters are mapped to a unified high-dimensional feature space through a fully connected layer to generate corresponding feature vectors; Gated attention unit: The attention gating value corresponding to the feature vector of each working condition parameter is calculated through a gating network. The input of the gating network includes the feature vector of the working condition parameter, the instantaneous value of the original frequency signal of the vibrating tube and its first derivative, which are constructed through a fully connected layer and a sigmoid activation function. The output is a gating scalar value. Dynamic weight generation unit: Multiply the feature vector of each operating condition parameter with its corresponding gated scalar value to obtain the modulation feature vector, and then input it into the Softmax function for normalization to output a set of weight influence coefficients; The calibration neural network is constructed by concatenating the original frequency of the vibrating tube with the feature vector of the working condition parameters after dynamic weighting, and inputting it into the encoder-decoder structure of the residual connection. The last layer of the network connects two fully connected layers in parallel, and outputs the fused online density measurement value and its logarithmic variance respectively. The logarithmic variance is transformed and used as the uncertainty of the online density measurement value, which is the reliability evaluation index.
[0008] Preferably, the uncertainty of the online density measurement value after transformation of the logarithmic variance includes: The logarithmic variance is converted into a standard deviation through exponential and square root operations. This standard deviation serves as the uncertainty of the online density measurement value. in, For uncertainty, It is an exponential function. To calibrate the log-variance of the neural network output.
[0009] Preferably, the online-offline dual-mode calibration decision module includes: The composite triggering conditions are dynamically adjusted based on historical calibration data, including time dimension, fluctuation dimension and credibility dimension; The dynamic adjustment method for the thresholds of each dimension is as follows: The time dimension threshold is obtained by multiplying the base time interval by the calibration interval correction factor. The calibration interval correction factor is calculated as follows: in, For calibration interval correction factor, To adjust the coefficient, The value of the uncertainty output by the data preprocessing and fusion module within the most recent preset historical time period. The maximum permissible uncertainty is preset for the system; The fluctuation dimension threshold is used to determine the fluctuation rate of the measured value. It is calculated by the ratio of the standard deviation to the mean of the density measured values within N consecutive sliding windows. The fluctuation dimension threshold is divided into two categories according to real-time operating conditions: steady-state fluctuation threshold and dynamic fluctuation threshold. The system compares the current flow rate of change with the steady-state critical value in real time and automatically selects the applicable threshold as the current fluctuation dimension threshold. The credibility dimension threshold is determined based on the real-time uncertainty output by the data preprocessing and fusion module, and an early warning threshold and a trigger threshold are set; if the real-time uncertainty is greater than or equal to the trigger threshold, the system immediately triggers the offline benchmark calibration process.
[0010] Preferably, the triggering mechanism of the online-offline dual-mode calibration decision module includes: The priority decision-making process is as follows: A1. If the real-time uncertainty is greater than or equal to the trigger threshold, the offline benchmark calibration process will be triggered immediately. A2. If A1 is not triggered, then determine: if the volatility of the real-time measured value is greater than or equal to the current applicable volatility dimension threshold, then trigger the offline benchmark calibration process; A3. If A1 and A2 are not triggered, then determine: if the time interval since the last calibration is ≥ the current time dimension threshold, then trigger the online self-calibration process; The online self-calibration process is as follows: using the multi-sensor data at the current moment, the built-in reference model is driven to calculate a set of virtual reference parameters; the virtual reference parameters are compared with the operating parameters currently used by the vibration tube density sensor; if the deviation is within the preset allowable range, only the calibration timestamp is updated; otherwise, the offline reference calibration process is triggered. The built-in reference model takes as input the original vibration frequency, temperature, pressure, viscosity and flow data of the vibrating tube at the current moment from multiple sensors, and outputs the virtual reference density value under the corresponding working condition. The training data of the built-in reference model comes from all offline reference calibration events in the history of system operation. The multi-sensor data at each calibration moment is paired with the offline reference density value, and the model is trained by minimizing the mean square error loss function.
[0011] Preferably, the offline reference calibration module includes: The fluid loop control system automatically diverts a portion of the liquid from the main pipeline to the sample cell after the calibration process is triggered. The sample cell includes a temperature control and degassing unit, which is used to process the sample to a standard state before transporting it to the high-precision density analysis unit. The high-precision density analysis unit is a laboratory-grade analyzer based on the principle of a U-shaped oscillating tube, and its measurement results serve as offline reference density values.
[0012] Preferably, the parameter correction and execution module includes: A physical-guided deep state network is constructed as an online measurement model. The inputs are the original vibration frequency, temperature and pressure of the vibrating tube, and the output is the predicted liquid density value. The core parameters include the tube equivalent stiffness factor and the system equivalent mass factor as trainable internal state variables, and are fused with multi-sensor data. The offline reference density value is compared with the output value of the online measurement model under the current working conditions, and the optimal correction amount of the core parameters is solved by inversion. The optimal correction amount is updated to the online measurement model using a smooth transition algorithm.
[0013] Preferably, the online measurement model of the vibrating tube density sensor includes: The physically guided deep state network is specifically as follows: Model inputs: original vibration frequency, temperature, and pressure of the vibrating tube; internal trainable states include: tube equivalent stiffness factor and system equivalent mass factor; State-aware feature generation branch: The internal trainable states are passed through a fully connected layer to generate a physical state feature vector; Operating condition perception feature generation branch: Temperature and pressure are passed through another fully connected layer to generate operating condition feature vectors; Adaptive physical modulation layer: The original frequency of the vibrating tube is concatenated with the physical state feature vector and the working condition feature vector, and then input together into the attention modulation layer; Regression output layer: The modulated high-level features are passed through a fully connected layer to finally output the predicted liquid density value.
[0014] Preferably, the optimal correction amount for solving the core parameters through inversion includes: Define an inversion optimization objective function, which is the sum of squared residuals output by the online measurement model at multiple historical and current calibration operating points, where the residual is the difference between the predicted liquid density value and the corresponding offline reference density value; The Levenberg-Marquardt algorithm is used to solve the inversion optimization problem in order to find the core parameter correction amount that minimizes the objective function; and during the iteration of the Levenberg-Marquardt algorithm, inequality constraints based on the physical characteristics of the sensor are explicitly added, including tube constraints and mass constraints. The inversion optimization uses the current single offline reference density value and at least three high-confidence offline calibration data accumulated in the past 30 days to form a multi-operating point sample set, and assigns a weight to each sample point, the weight being inversely proportional to the interval from the calibration time to the current time; After solving for the optimal correction amount, the covariance matrix of the optimal correction amount is calculated and its uncertainty is evaluated. If the uncertainty of the core parameter correction amount is greater than or equal to the preset uncertainty threshold, the inversion result is determined to be unreliable and recalibration is triggered.
[0015] Preferably, the explicit addition of constraints based on the physical characteristics of the sensor includes: The tube constraint conditions are specifically: the updated tube equivalent stiffness factor. satisfy ,in, The stiffness factor before the update. Maximum relative change threshold; Quality constraint: Updated system equivalent quality factor satisfy .
[0016] The beneficial effects of this invention are: This invention utilizes a gated attention mechanism multi-source feature fusion network to dynamically allocate weights for temperature, pressure, viscosity, and flow parameters, accurately offsetting operational interference and achieving high-precision online density measurement. Simultaneously, by obtaining uncertainty through logarithmic variance transformation, it achieves a quantitative assessment of the reliability of the measurement results, providing a reliable basis for calibration decisions. This invention sets dynamic thresholds and priority decision-making processes based on time, fluctuation, and reliability. When the operating conditions fluctuate greatly or the measurement reliability is low, offline benchmark calibration is triggered immediately. When the operating conditions are stable, the status is updated through online self-calibration. This avoids wasting resources due to overcalibration and also prevents poor accuracy due to undercalibration, thus adapting to the dynamic changing needs of industrial scenarios. This invention employs the Levenberg-Marquardt algorithm combined with historical data from multiple operating points (including weight allocation) to invert the optimal correction amount during the parameter correction process. Simultaneously, it incorporates physical constraints on pipe stiffness and equivalent mass, thus preventing the correction parameters from exceeding physical limits. Through precise cancellation of operating disturbances and reliable parameter correction, it avoids excessive vibration or fatigue damage to the vibrating pipe caused by long-term operating parameter deviations. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the module flow of the present invention; Figure 2 This is a schematic diagram of the multi-source feature fusion network process in the data preprocessing and fusion module of the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] Please see Figure 1 As shown, this invention is an online calibration system for an online vibrating tube liquid density meter based on multi-sensor fusion, comprising the following modules: Multi-sensor data acquisition module: including vibrating tube density sensor, temperature sensor, pressure sensor, viscosity sensor and flow sensor, used to simultaneously acquire raw liquid density data and operating parameters; Data preprocessing and fusion module: preprocesses the raw data, constructs a multi-source feature fusion network based on a gated attention mechanism, obtains the fused online density measurement value, and calculates the credibility evaluation index; Online-offline dual-mode calibration decision module: Based on composite triggering conditions with multi-dimensional dynamic thresholds, it determines calibration requirements and dynamically selects between online self-calibration or triggering the offline reference calibration process; Offline benchmark calibration module: Automatically samples and processes liquid samples, and obtains offline benchmark density values through a laboratory-grade high-precision density analysis unit; Parameter correction and execution module: Corrects the core measurement parameters of the vibrating tube density sensor based on the offline reference density value and updates the online measurement model; Data storage and visualization module: Stores calibration process data and displays the measurement and calibration status in real time.
[0020] Specifically, in the multi-sensor data acquisition module, the measurement pipelines of the vibration tube density sensor, temperature sensor, pressure sensor, viscosity sensor, and flow sensor are set in parallel, with a sampling frequency of 1-10Hz. The data is transmitted to the data preprocessing and fusion module via industrial Ethernet. The preprocessed data is input into the multi-source feature fusion network, where the gated attention unit dynamically calculates the weights of each operating condition parameter. The weighted features are concatenated with the vibration frequency, and after calibration, the fused density value and its logarithmic variance are output through the neural network. The logarithmic variance is converted into uncertainty using a formula, serving as a reliability assessment index. The online-offline dual-mode calibration decision module makes judgments based on three dimensions: reliability, fluctuation, and time. The current data is input into the built-in reference model (…). The trained calibration neural network obtains a virtual reference density value, and inversely calculates the virtual parameters. If the deviation from the current parameters is within the tolerance, the calibration timestamp is updated; otherwise, offline calibration is triggered. The fluid loop controls the sample diversion to a temperature-controlled degassed sample cell. The processed sample is measured by a U-shaped oscillating tube high-precision analyzer to obtain an offline reference density value. The offline reference value is input into the parameterized model, and the Levenberg-Marquardt algorithm is used to solve for the optimal correction amount of the core parameters (satisfying physical constraints). The model is then updated through a smoothing algorithm. All data and calibration results are stored in the database, and the measured values, uncertainties, and system status are refreshed in real time on the human-machine interface. This system achieves accurate, efficient, and fully automatic online calibration of the vibrating tube density meter through multi-sensor fusion and intelligent decision-making.
[0021] In one embodiment of the present invention, the data preprocessing and fusion module includes: Data preprocessing unit: Employs a sliding time window mechanism to perform time-series alignment and outlier removal on the collected data; The construction of the multi-source feature fusion network based on the gated attention mechanism is specifically as follows: Feature embedding unit: The preprocessed temperature, pressure, viscosity and flow rate parameters are mapped to a unified high-dimensional feature space through a fully connected layer to generate corresponding feature vectors; Gated attention unit: The attention gating value corresponding to the feature vector of each working condition parameter is calculated through a gating network. The input of the gating network includes the feature vector of the working condition parameter, the instantaneous value of the original frequency signal of the vibrating tube and its first derivative, which are constructed through a fully connected layer and a sigmoid activation function. The output is a gating scalar value. Dynamic weight generation unit: Multiply the feature vector of each operating condition parameter with its corresponding gated scalar value to obtain the modulation feature vector, and then input it into the Softmax function for normalization to output a set of weight influence coefficients; The calibration neural network is constructed by concatenating the original frequency of the vibrating tube with the feature vector of the working condition parameters after dynamic weighting, and inputting it into the encoder-decoder structure of the residual connection. The last layer of the network connects two fully connected layers in parallel, and outputs the fused online density measurement value and its logarithmic variance respectively. The logarithmic variance is transformed and used as the uncertainty of the online density measurement value, which is the reliability evaluation index.
[0022] Specifically, the window duration is set to 5 seconds, which can be adjusted according to the response speed of the operating conditions. The window sliding step is 1 second. The raw data from multiple sensors is segmented in units of time windows. Using the acquisition timestamp of the vibration tube density sensor as a reference, the timestamps of temperature, pressure, viscosity, and flow rate data within the same window are interpolated and matched to ensure that the data from each sensor correspond one-to-one in the time dimension, eliminating the timing deviation caused by data acquisition delay. The 3σ criterion is used to identify abnormal data within the window. The preprocessed temperature, pressure, viscosity, and flow rate parameters are input into independent fully connected layers for feature embedding. Each fully connected layer contains one input layer (with 1 neuron, corresponding to a single operating condition parameter) and one hidden layer (with 64 neurons). The system uses ReLU activation and one output layer (32 neurons). Through linear transformation and nonlinear activation in a fully connected layer, various operating parameters are mapped from the original low-dimensional space to a unified 32-dimensional high-dimensional feature space, generating corresponding feature vectors, including temperature, pressure, viscosity, and flow rate feature vectors. Simultaneously, the first derivative of the preprocessed original frequency signal of the vibrating tube is calculated to obtain the frequency change rate. The feature vectors of each operating parameter are concatenated with the original frequency signal and the frequency change rate of the vibrating tube to form the input vector of the gating network. The gating network consists of one fully connected layer and a sigmoid activation function. Each input vector is input into the gating network and processed through linear transformation and sigmoid activation. Activation is performed, outputting the gated scalar values for the corresponding operating parameters, including: temperature gate, pressure gate, viscosity gate, and flow gate. The gate values characterize the influence weight of the corresponding operating parameters on density measurement. The feature vectors of each operating parameter are multiplied by the corresponding gated scalar values to obtain the modulation feature vector. The four modulation feature vectors are concatenated into a feature matrix, which is then input into the Softmax function to calculate the normalized weights. The weight influence coefficients of temperature, pressure, viscosity, and flow are output, and the sum of the four weight influence coefficients is 1. The original frequency of the vibrating tube is converted into a vector form and concatenated with the dynamically weighted operating parameter feature vector to form the input vector of the calibration neural network. The encoder-decoder structure of the calibration neural network includes 3 encoding layers and 3 decoding layers. Each layer is a fully connected layer, and residual connections are set between adjacent encoding / decoding layers (directly adding the output of the previous layer to the output of the current layer to alleviate the gradient vanishing problem). The output of the decoding layer is input in parallel into two independent fully connected layers. The first fully connected layer outputs the fused online density measurement value, and the second fully connected layer outputs the logarithmic variance of the online density measurement value.
[0023] In one embodiment of the present invention, the logarithmic variance, after transformation, is used as the uncertainty of the online density measurement value, including: The logarithmic variance is converted into a standard deviation through exponential and square root operations. This standard deviation serves as the uncertainty of the online density measurement value. in, For uncertainty, It is an exponential function. To calibrate the log-variance of the neural network output.
[0024] Specifically, the logarithmic variance of the calibration neural network output is converted into standard deviation through exponential and square root operations, which serves as the uncertainty (i.e., reliability assessment index) of the online density measurement. The smaller the value, the higher the reliability of the online density measurement.
[0025] In one embodiment of the present invention, the online-offline dual-mode calibration decision module includes: The composite triggering conditions are dynamically adjusted based on historical calibration data, including time dimension, fluctuation dimension and credibility dimension; The dynamic adjustment method for the thresholds of each dimension is as follows: The time dimension threshold is obtained by multiplying the base time interval by the calibration interval correction factor. The calibration interval correction factor is calculated as follows: in, For calibration interval correction factor, To adjust the coefficient, The value of the uncertainty output by the data preprocessing and fusion module within the most recent preset historical time period. The maximum permissible uncertainty is preset for the system; The fluctuation dimension threshold is used to determine the fluctuation rate of the measured value. It is calculated by the ratio of the standard deviation to the mean of the density measured values within N consecutive sliding windows. The fluctuation dimension threshold is divided into two categories according to real-time operating conditions: steady-state fluctuation threshold and dynamic fluctuation threshold. The system compares the current flow rate of change with the steady-state critical value in real time and automatically selects the applicable threshold as the current fluctuation dimension threshold. The credibility dimension threshold is determined based on the real-time uncertainty output by the data preprocessing and fusion module, and an early warning threshold and a trigger threshold are set; if the real-time uncertainty is greater than or equal to the trigger threshold, the system immediately triggers the offline benchmark calibration process.
[0026] Specifically, upon system startup, the basic parameters of the dual-mode calibration decision module are preset, including: time-dimensional basic parameters: the basic time interval is set to 24 hours, and the adjustment coefficient is set to 0.8 to balance threshold adjustment sensitivity and stability; the maximum permissible uncertainty of the system is set based on the measurement accuracy of the vibrating tube density meter. The number of sliding windows is set to N. A steady-state critical value is set based on the stable operating conditions of the process flow (obtained through statistical analysis of long-term historical flow data; the distribution of the flow rate change rate of the calculation device during most normal production periods (e.g., over 95% of the time) is used; the 95th percentile or an empirically conservative value is set as the steady-state critical value; if the rate of change is lower than this value, the system is considered to be in the allowable steady-state operating range). The steady-state fluctuation threshold is calculated by having the densitometer measure a physically stable liquid (e.g., pure water) in a laboratory or production site, running it for a long time at absolutely stable flow and temperature, and calculating the fluctuation rate (standard deviation / mean) of the density measurement value. This fluctuation rate is determined by the noise and limiting accuracy of the sensor itself, and is obtained by multiplying its fluctuation rate by a safety factor (multiplying by a safety factor ensures that under ideal steady-state conditions, it will not be falsely triggered due to the sensor's own noise). The dynamic fluctuation threshold is calculated by recording the output of the densitometer when measuring a stable liquid within the allowable dynamic operating range (flow rate change rate between the steady-state critical value and an upper limit value), and observing... Observe its volatility and set its 95th percentile or an empirical value as the dynamic volatility threshold; the basic parameters of the credibility dimension are: based on the statistical distribution of the uncertainty of the calibration neural network output and the requirements of the production process for density measurement accuracy, determine the warning threshold and the trigger threshold. During the system debugging phase, collect a large number of data pairs covering various working conditions, including neural network prediction values and high-precision offline benchmark values. Calculate the error of each prediction value and compare it with the uncertainty of the network output. The warning threshold is determined through statistical analysis. Find a warning threshold such that when the output uncertainty is < the warning threshold, the prediction error has a very high probability (e.g., >99%) to meet the highest accuracy level requirements; find a trigger threshold such that when the uncertainty is ≥ the trigger threshold, the prediction error has a very high probability (e.g., >80%) to exceed the error range allowed by the process.
[0027] The real-time flow rate of change is calculated by acquiring flow sensor data from the current moment and the previous moment, with a time interval of 5 seconds between the two flow data points. The real-time flow rate of change is compared with the steady-state critical value. If the real-time flow rate of change is less than or equal to the steady-state critical value, it is determined to be a steady-state condition, and the steady-state fluctuation threshold is selected as the current fluctuation dimension threshold. If the real-time flow rate of change is greater than the steady-state critical value, it is determined to be a dynamic condition, and the dynamic fluctuation threshold is selected as the current fluctuation dimension threshold. The measured value volatility is obtained by extracting the online density measurement values output by the data preprocessing and fusion module within the most recent N sliding windows, calculating the mean and standard deviation of the data set, and then obtaining the measured value volatility by the ratio of the standard deviation to the mean. The system acquires the real-time uncertainty output by the data preprocessing and fusion module and compares it with the warning threshold and trigger threshold of the credibility dimension. Specifically: if the real-time uncertainty is less than the warning threshold, the current measurement credibility is determined to be high, and no calibration warning needs to be triggered; if the warning threshold is less than or equal to the real-time uncertainty and less than the trigger threshold, the current measurement credibility is determined to be low, and the system warning is triggered, but the calibration process is not triggered; if the real-time uncertainty is greater than or equal to the trigger threshold, the system immediately triggers the offline benchmark calibration process.
[0028] In one embodiment of the present invention, the triggering mechanism of the online-offline dual-mode calibration decision module includes: The priority decision-making process is as follows: A1. If the real-time uncertainty is greater than or equal to the trigger threshold, the offline benchmark calibration process will be triggered immediately. A2. If A1 is not triggered, then determine: if the volatility of the real-time measured value is greater than or equal to the current applicable volatility dimension threshold, then trigger the offline benchmark calibration process; A3. If A1 and A2 are not triggered, then determine: if the time interval since the last calibration is ≥ the current time dimension threshold, then trigger the online self-calibration process; The online self-calibration process is as follows: using the multi-sensor data at the current moment, the built-in reference model is driven to calculate a set of virtual reference parameters; the virtual reference parameters are compared with the operating parameters currently used by the vibration tube density sensor; if the deviation is within the preset allowable range, only the calibration timestamp is updated; otherwise, the offline reference calibration process is triggered. The built-in reference model takes as input the original vibration frequency, temperature, pressure, viscosity and flow data of the vibrating tube at the current moment from multiple sensors, and outputs the virtual reference density value under the corresponding working condition. The training data of the built-in reference model comes from all offline reference calibration events in the history of system operation. The multi-sensor data at each calibration moment is paired with the offline reference density value, and the model is trained by minimizing the mean square error loss function.
[0029] Specifically, the system comprehensively determines whether to trigger calibration based on the priority order of credibility, volatility, and time dimensions. The specific logic is as follows: First, credibility dimension judgment: If the real-time uncertainty is greater than or equal to the trigger threshold, the offline benchmark calibration process is immediately triggered, skipping subsequent dimension judgments; if not, the volatility dimension judgment is initiated. Second, volatility dimension judgment: The measured value volatility is compared with the current volatility dimension threshold. If the real-time measured value volatility is greater than or equal to the currently applicable volatility dimension threshold, the offline benchmark calibration process is triggered; if the real-time measured value volatility is less than the currently applicable volatility dimension threshold, the time dimension judgment is initiated. Third, time dimension judgment: The timestamp of the last calibration completion is obtained, and the time interval between the current time and the timestamp of the last calibration completion is calculated. If the time interval since the last calibration is greater than or equal to the current time dimension threshold, the online self-calibration process is triggered; if the time interval since the last calibration is less than the current time dimension threshold, it is determined that no calibration is needed at present, the module returns to the initial state, and waits for the next judgment cycle. The built-in reference model extracts historical data from the system's historical operation database, gathering all successfully executed offline benchmark calibration events (accumulating at least 30 valid offline calibration events covering different temperature, pressure, viscosity, and flow conditions). For each offline calibration event, it pairs the multi-sensor data at the calibration time with the corresponding offline benchmark density value. Specifically, this involves the original vibration frequency, temperature, pressure, viscosity, and flow rate of the vibrating tube at the calibration time, along with the benchmark values measured by the high-precision density analysis unit (U-shaped oscillating tube principle) in the offline benchmark calibration module. Abnormal pairings are removed, ultimately forming the training dataset. The built-in reference model employs a fully connected neural network structure with a Dropout layer. The specific number of layers and neurons is as follows: Input layer: neural... The model has 5 neurons, corresponding to the input vector (data from 5 sensors); 3 hidden layers: the first layer has 128 neurons (ReLU activation function), the second layer has 64 neurons (ReLU activation function), and the third layer has 32 neurons (ReLU activation function); Dropout layer: placed between the second and third hidden layers, with a dropout value of 0.2 to prevent overfitting; Output layer: 1 neuron, outputting a virtual baseline density value; The training dataset is divided into training, validation, and test sets. The mean squared error loss function is used, and the Adam optimizer is selected. The initial learning rate is set to 0.001. After training, the final accuracy of the model is evaluated using the test set.
[0030] In one embodiment of the present invention, the offline reference calibration module includes: The fluid loop control system automatically diverts a portion of the liquid from the main pipeline to the sample cell after the calibration process is triggered. The sample cell includes a temperature control and degassing unit, which is used to process the sample to a standard state before transporting it to the high-precision density analysis unit. The high-precision density analysis unit is a laboratory-grade analyzer based on the principle of a U-shaped oscillating tube, and its measurement results serve as offline reference density values.
[0031] Specifically, after the sample is processed to a standard state, it is transported to a high-precision density analysis unit. Density measurement is performed using the U-shaped oscillating tube principle. Specifically, the processed sample is slowly fed into the U-shaped oscillating tube until it is full (confirmed by a liquid level sensor at the end of the tube). A detection coil collects the vibration frequency of the U-shaped tube in real time, and the density value is calculated based on the linear relationship between the vibration frequency and the density of the liquid inside the tube. ,in, These are the instrument calibration coefficients, calibrated using a standard density liquid before leaving the factory. This is the natural frequency of the oscillating tube when it is empty. The vibration frequency when the sample is fully filled. The correction factor corresponds to the density of water at 23℃. To improve the reliability of the baseline value, the system continuously measures the density value 5 times to obtain the measurement sequence. Data is then discarded and the baseline value is determined (the arithmetic mean of the remaining valid measurements is taken to obtain the final offline baseline density value). The high-precision density analysis unit sends the mean value and the corresponding measurement timestamp, sample temperature / pressure parameters to the data storage module, and simultaneously sends the offline calibration completion signal to the parameter correction and execution module to trigger the subsequent sensor core parameter correction process.
[0032] In one embodiment of the present invention, the parameter correction and execution module includes: A physical-guided deep state network is constructed as an online measurement model. The inputs are the original vibration frequency, temperature and pressure of the vibrating tube, and the output is the predicted liquid density value. The core parameters include the tube equivalent stiffness factor and the system equivalent mass factor as trainable internal state variables, and are fused with multi-sensor data. The offline reference density value is compared with the output value of the online measurement model under the current working conditions, and the optimal correction amount of the core parameters is solved by inversion. The optimal correction amount is updated to the online measurement model using a smooth transition algorithm.
[0033] In one embodiment of the present invention, the online measurement model of the moving tube density sensor includes: The physically guided deep state network is specifically as follows: Model inputs: original vibration frequency, temperature, and pressure of the vibrating tube; internal trainable states include: tube equivalent stiffness factor and system equivalent mass factor; State-aware feature generation branch: The internal trainable states are passed through a fully connected layer to generate a physical state feature vector; Operating condition perception feature generation branch: Temperature and pressure are passed through another fully connected layer to generate operating condition feature vectors; Adaptive physical modulation layer: The original frequency of the vibrating tube is concatenated with the physical state feature vector and the working condition feature vector, and then input together into the attention modulation layer; Regression output layer: The modulated high-level features are passed through a fully connected layer to finally output the predicted liquid density value.
[0034] Specifically, the acquisition of the tube equivalent stiffness factor and the system equivalent quality factor is an optimization learning process carried out together with the neural network weights and based on gradient descent. Specifically, when the system is first put into operation, the two factors are initialized and their initial values are set to 1.0. These two factors are dimensionless scalars, and their initial value of 1.0 indicates that the sensor is in an ideal new machine state.
[0035] In one embodiment of the present invention, the step of solving for the optimal correction amount of the core parameters through inversion includes: Define an inversion optimization objective function, which is the sum of squared residuals output by the online measurement model at multiple historical and current calibration operating points, where the residual is the difference between the predicted liquid density value and the corresponding offline reference density value; The Levenberg-Marquardt algorithm is used to solve the inversion optimization problem in order to find the core parameter correction amount that minimizes the objective function; and during the iteration of the Levenberg-Marquardt algorithm, inequality constraints based on the physical characteristics of the sensor are explicitly added, including tube constraints and mass constraints. The inversion optimization uses the current single offline reference density value and at least three high-confidence offline calibration data accumulated in the past 30 days to form a multi-operating point sample set, and assigns a weight to each sample point, the weight being inversely proportional to the interval from the calibration time to the current time; After solving for the optimal correction amount, the covariance matrix of the optimal correction amount is calculated and its uncertainty is evaluated. If the uncertainty of the core parameter correction amount is greater than or equal to the preset uncertainty threshold, the inversion result is determined to be unreliable and recalibration is triggered.
[0036] Specifically, after sensors are deployed in industrial sites, their core parameters may gradually drift due to pipe fatigue and changes in installation stress. Continuous updates via offline benchmark calibration combined with inversion optimization are necessary. Specifically, after each offline benchmark calibration, the system stores the operating condition data and offline benchmark density values at the calibration time, forming a historical calibration dataset (accumulating at least three high-reliability data sets with a time span of ≤30 days). The LM Levenberg-Marquardt algorithm is used to solve for the minimum objective function, obtaining the optimal correction amount for the core parameters to ensure that the correction meets physical constraints. An exponential smoothing transition algorithm is then used to update the corrected core parameters (through...) The model is gradually updated by adding the optimal correction amount to the current core parameter coefficient value. After the update, the deviation between the model's predicted value and the offline baseline value is verified to be ≤0.0001 g / cm³, ensuring the update is effective. The preset uncertainty threshold is defined based on the acceptable drift range of the sensor parameters and statistical significance testing. The maximum relative change threshold of the core parameters is determined, and the preset uncertainty threshold is defined as a proportional coefficient of the maximum relative change threshold. This coefficient is set to 0.1 ≤ P ≤ 0.5 to ensure sufficient statistical accuracy of the estimated value. The preset uncertainty threshold is thus obtained as: Upre = P * min ( , ), where P is the proportionality coefficient, and These are the maximum relative change thresholds for the two core parameters, respectively. Specifically, at least three high-confidence historical offline calibration data points accumulated within the past 30 days were retrieved, and each sample point was assigned a weight, which was inversely proportional to the calibration time, with more recent data having a higher weight. ,in, For the current time, For the first Calibration time. This is the attenuation coefficient, with a value of 0.1.
[0037] In one embodiment of the present invention, the explicit addition of constraints based on the physical characteristics of the sensor includes: The tube constraint conditions are specifically: the updated tube equivalent stiffness factor. satisfy ,in, The stiffness factor before the update. Maximum relative change threshold; Quality constraint: Updated system equivalent quality factor satisfy .
[0038] Specifically, the maximum relative change threshold is obtained directly from the maximum relative change in stiffness allowed within a single calibration cycle as specified by the manufacturer.
[0039] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.
Claims
1. An online calibration system for an online vibrating tube liquid density meter based on multi-sensor fusion, characterized in that, Includes the following modules: Multi-sensor data acquisition module: including vibrating tube density sensor, temperature sensor, pressure sensor, viscosity sensor and flow sensor, used to simultaneously acquire raw liquid density data and operating parameters; Data preprocessing and fusion module: preprocesses the raw data, constructs a multi-source feature fusion network based on a gated attention mechanism, obtains the fused online density measurement value, and calculates the credibility evaluation index; Online-offline dual-mode calibration decision module: Based on composite triggering conditions with multi-dimensional dynamic thresholds, it determines calibration requirements and dynamically selects between online self-calibration or triggering the offline reference calibration process; Offline benchmark calibration module: Automatically samples and processes liquid samples, and obtains offline benchmark density values through a laboratory-grade high-precision density analysis unit; Parameter correction and execution module: Corrects the core measurement parameters of the vibrating tube density sensor based on the offline reference density value and updates the online measurement model; Data storage and visualization module: Stores calibration process data and displays the measurement and calibration status in real time.
2. The online calibration system for an online vibrating tube liquid density meter based on multi-sensor fusion according to claim 1, characterized in that, The data preprocessing and fusion module includes: Data preprocessing unit: Employs a sliding time window mechanism to perform time-series alignment and outlier removal on the collected data; The construction of the multi-source feature fusion network based on the gated attention mechanism is specifically as follows: Feature embedding unit: The preprocessed temperature, pressure, viscosity and flow rate parameters are mapped to a unified high-dimensional feature space through a fully connected layer to generate corresponding feature vectors; Gated attention unit: The attention gating value corresponding to the feature vector of each working condition parameter is calculated through a gating network. The input of the gating network includes the feature vector of the working condition parameter, the instantaneous value of the original frequency signal of the vibrating tube and its first derivative, which are constructed through a fully connected layer and a sigmoid activation function. The output is a gating scalar value. Dynamic weight generation unit: Multiply the feature vector of each operating condition parameter with its corresponding gated scalar value to obtain the modulation feature vector, and then input it into the Softmax function for normalization to output a set of weight influence coefficients; The calibration neural network is constructed by concatenating the original frequency of the vibrating tube with the feature vector of the working condition parameters after dynamic weighting, and inputting it into the encoder-decoder structure of the residual connection. The last layer of the network connects two fully connected layers in parallel, and outputs the fused online density measurement value and its logarithmic variance respectively. The logarithmic variance is transformed and used as the uncertainty of the online density measurement value, which is the reliability evaluation index.
3. The online calibration system for an online vibrating tube liquid density meter based on multi-sensor fusion according to claim 2, characterized in that, The uncertainty of the online density measurement value after the log-variance is transformed includes: The logarithmic variance is converted into a standard deviation through exponential and square root operations. This standard deviation serves as the uncertainty of the online density measurement value. in, For uncertainty, It is an exponential function. To calibrate the log-variance of the neural network output.
4. The online calibration system for an online vibrating tube liquid density meter based on multi-sensor fusion according to claim 1, characterized in that, The online-offline dual-mode calibration decision module includes: The composite triggering conditions are dynamically adjusted based on historical calibration data, including time dimension, fluctuation dimension and credibility dimension; The dynamic adjustment method for the thresholds of each dimension is as follows: The time dimension threshold is obtained by multiplying the base time interval by the calibration interval correction factor. The calibration interval correction factor is calculated as follows: in, For calibration interval correction factor, To adjust the coefficient, The value of the uncertainty output by the data preprocessing and fusion module within the most recent preset historical time period. The maximum permissible uncertainty is preset for the system; The fluctuation dimension threshold is used to determine the fluctuation rate of the measured value. It is calculated by the ratio of the standard deviation to the mean of the density measured values within N consecutive sliding windows. The fluctuation dimension threshold is divided into two categories according to real-time operating conditions: steady-state fluctuation threshold and dynamic fluctuation threshold. The system compares the current flow rate of change with the steady-state critical value in real time and automatically selects the applicable threshold as the current fluctuation dimension threshold. The credibility dimension threshold is determined based on the real-time uncertainty output by the data preprocessing and fusion module, and an early warning threshold and a trigger threshold are set; if the real-time uncertainty is greater than or equal to the trigger threshold, the system immediately triggers the offline benchmark calibration process.
5. The online calibration system for an online vibrating tube liquid density meter based on multi-sensor fusion according to claim 4, characterized in that, The triggering mechanism of the online-offline dual-mode calibration decision module includes: The priority decision-making process is as follows: A1. If the real-time uncertainty is greater than or equal to the trigger threshold, the offline benchmark calibration process will be triggered immediately. A2. If A1 is not triggered, then determine: if the volatility of the real-time measured value is greater than or equal to the current applicable volatility dimension threshold, then trigger the offline benchmark calibration process; A3. If A1 and A2 are not triggered, then determine: if the time interval since the last calibration is ≥ the current time dimension threshold, then trigger the online self-calibration process; The online self-calibration process is as follows: using the multi-sensor data at the current moment, the built-in reference model is driven to calculate a set of virtual reference parameters; the virtual reference parameters are compared with the operating parameters currently used by the vibration tube density sensor; if the deviation is within the preset allowable range, only the calibration timestamp is updated; otherwise, the offline reference calibration process is triggered. The built-in reference model takes as input the original vibration frequency, temperature, pressure, viscosity and flow data of the vibrating tube at the current moment from multiple sensors, and outputs the virtual reference density value under the corresponding working condition. The training data of the built-in reference model comes from all offline reference calibration events in the history of system operation. The multi-sensor data at each calibration moment is paired with the offline reference density value, and the model is trained by minimizing the mean square error loss function.
6. The online calibration system for an online vibrating tube liquid density meter based on multi-sensor fusion according to claim 1, characterized in that, The offline benchmark calibration module includes: The fluid loop control system automatically diverts a portion of the liquid from the main pipeline to the sample cell after the calibration process is triggered. The sample cell includes a temperature control and degassing unit, which is used to process the sample to a standard state before transporting it to the high-precision density analysis unit. The high-precision density analysis unit is a laboratory-grade analyzer based on the principle of a U-shaped oscillating tube, and its measurement results serve as offline reference density values.
7. The online calibration system for an online vibrating tube liquid density meter based on multi-sensor fusion according to claim 1, characterized in that, The parameter correction and execution module includes: A physical-guided deep state network is constructed as an online measurement model. The inputs are the original vibration frequency, temperature and pressure of the vibrating tube, and the output is the predicted liquid density value. The core parameters include the tube equivalent stiffness factor and the system equivalent mass factor as trainable internal state variables, and are fused with multi-sensor data. The offline reference density value is compared with the output value of the online measurement model under the current working conditions, and the optimal correction amount of the core parameters is solved by inversion. The optimal correction amount is updated to the online measurement model using a smooth transition algorithm.
8. The online calibration system for an online vibrating tube liquid density meter based on multi-sensor fusion according to claim 7, characterized in that, The construction of a physically guided deep state network as an online measurement model includes: The physically guided deep state network is specifically as follows: Model inputs: original vibration frequency, temperature, and pressure of the vibrating tube; internal trainable states include: tube equivalent stiffness factor and system equivalent mass factor; State-aware feature generation branch: The internal trainable states are passed through a fully connected layer to generate a physical state feature vector; Operating condition perception feature generation branch: Temperature and pressure are passed through another fully connected layer to generate operating condition feature vectors; Adaptive physical modulation layer: The original frequency of the vibrating tube is concatenated with the physical state feature vector and the working condition feature vector, and then input together into the attention modulation layer; Regression output layer: The modulated high-level features are passed through a fully connected layer to finally output the predicted liquid density value.
9. The online calibration system for an online vibrating tube liquid density meter based on multi-sensor fusion according to claim 7, characterized in that, The optimal correction amount obtained by inversion of the core parameters includes: Define an inversion optimization objective function, which is the sum of squared residuals output by the online measurement model at multiple historical and current calibration operating points, where the residual is the difference between the predicted liquid density value and the corresponding offline reference density value; The Levenberg-Marquardt algorithm is used to solve the inversion optimization problem in order to find the core parameter correction amount that minimizes the objective function; and during the iteration of the Levenberg-Marquardt algorithm, inequality constraints based on the physical characteristics of the sensor are explicitly added, including tube constraints and mass constraints. The inversion optimization uses the current single offline reference density value and at least three high-confidence offline calibration data accumulated in the past 30 days to form a multi-operating point sample set, and assigns a weight to each sample point, the weight being inversely proportional to the interval from the calibration time to the current time; After solving for the optimal correction amount, the covariance matrix of the optimal correction amount is calculated and its uncertainty is evaluated. If the uncertainty of the core parameter correction amount is greater than or equal to the preset uncertainty threshold, the inversion result is determined to be unreliable and recalibration is triggered.
10. The online calibration system for an online vibrating tube liquid density meter based on multi-sensor fusion according to claim 9, characterized in that, The explicit inclusion of constraints based on sensor physical characteristics includes: The tube constraint conditions are specifically: the updated tube equivalent stiffness factor. satisfy ,in, The stiffness factor before the update. Maximum relative change threshold; Quality constraint: Updated system equivalent quality factor satisfy .