A method for automatic adjustment of liquid temperature and density in a tank metering system
By constructing a joint inversion model and nonlinear standard state projection for the tank metering system, the problem of inconsistent readings caused by multi-source uncertainties in tank metering was solved, achieving stable and reliable metering under extreme operating conditions, reducing systematic deviations and noise impacts, and ensuring the accuracy of inventory accounting.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-12
- Publication Date
- 2026-03-13
AI Technical Summary
Tank metering faces multiple uncertainties. Fluctuations in temperature and pressure with operating conditions lead to changes in physical properties. Stratification and local mixing cause vertical non-uniformity. Tank posture and geometric deviations affect volume conversion. Sensor drift and switching between different media result in inconsistent readings. Often, a unified correction is made at the end in an open-loop manner, ignoring the coupling and dynamic consistency of geometry, physical properties and acoustics. This easily leads to deviations in inventory accounting and handover metering. Especially under extreme liquid levels and rapid switching of operating conditions, the above deviations are further amplified, putting pressure on production scheduling, safety management and cost settlement.
By collecting cross-sectional area curves, pressure profiles, liquid level heights, temperature profiles, and sound velocity profiles, a joint inversion model based on the hydrostatic relationship and the acoustic bulk modulus relationship is constructed. Combined with mass conservation, a nonlinear standard state projection is implemented to achieve closed-loop updates of density and compressibility profiles, and output stable and consistent standard state readings.
It achieves co-source solutions for density and compressibility profiles, reduces systematic deviations caused by inconsistencies between channels, ensures physical closure of volume and density conversion, suppresses geometric distortion near the liquid surface, isolates compressibility from transient disturbances, reduces noise and boundary errors, maintains robustness and consistency of readings, and maintains the reliability of measurement results, especially under varying operating conditions.
Smart Images

Figure CN121301729B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial metering and process control technology, and in particular to a method for automatically adjusting the temperature and density of liquids in a tank metering system. Background Technology
[0002] Tank metering faces multiple uncertainties: temperature and pressure fluctuations with operating conditions lead to changes in physical properties; stratification and local mixing cause vertical non-uniformity; tank posture and geometric deviations affect volume conversion; and sensor drift and switching between different media result in inconsistent readings. The industry has long relied on single-point temperature compensation or empirical coefficient conversion, often using an open-loop approach for unified correction at the end point, neglecting the coupling and dynamic consistency of geometry, physical properties, and acoustics. This easily leads to deviations in inventory accounting and handover metering. Under extreme liquid levels and rapid switching of operating conditions, these deviations are further amplified, putting pressure on production scheduling, safety management, and cost settlement. Summary of the Invention
[0003] To address the numerous problems existing in the prior art, this invention provides an automatic adjustment method for liquid temperature and density in a tank metering system. This invention acquires cross-sectional area curves, pressure profiles, liquid level heights, temperature profiles, and sound velocity profiles to construct a joint inversion model based on hydrostatic relations and acoustic bulk modulus relations, obtaining density and compressibility profiles. Then, it performs nonlinear standard state projection with mass conservation and uses the consistency of the projections of volume, mass, and standard state density as a constraint feedback to update the closed-loop inversion model, obtaining stable and consistent standard state readings.
[0004] This specification provides one or more embodiments of a method for automatically adjusting the temperature and density of a liquid in a tank metering system, including the following steps:
[0005] Collect and reconstruct cross-sectional area curves, pressure profiles, liquid level heights, temperature profiles, and sound velocity profiles to form the input dataset;
[0006] Based on the input dataset and the relationship between hydrostatics and acoustic bulk modulus, a joint inversion model is established to obtain density profile, temperature profile and compressibility profile.
[0007] The nonlinear standard state projection based on mass conservation maps the field temperature and pressure to the standard state, and calculates the standard state volume, mass and density.
[0008] A closed-loop update is performed using a projection consistency constraint feedback joint inversion model composed of standard state volume, mass, and standard state density, outputting the updated standard state volume, standard state density, and mass.
[0009] The method described according to one or more embodiments of this specification includes the following acquisition and reconstruction steps:
[0010] The wall profile was reconstructed by circumferential ultrasonic tomography and the cross-sectional area was calculated to obtain the cross-sectional area curve.
[0011] The hydrostatic gradient is obtained after zero-point correction and smoothing of the pressure profile.
[0012] Time synchronization and spatial alignment of temperature and sound velocity profiles;
[0013] The tilt angle of the inertial measurement unit is used to correct the attitude of the cross-sectional area curve and the liquid level height to form the input dataset.
[0014] According to one or more embodiments of the method described in this specification, the joint inversion model includes:
[0015] Measurement constraints and prior constraints are set in the form of factor diagrams. Measurement constraints include hydrostatic relation constraints and acoustic bulk modulus relation constraints, while prior constraints include material constitutive relation constraints and smoothness constraints.
[0016] Density profile, temperature profile, and compressibility profile are obtained by nonlinear least squares solution.
[0017] According to one or more embodiments of this specification, before performing a nonlinear least squares solution, the sensitivity matrix of the joint inversion model is orthogonalized to improve the numerical conditions, and then the nonlinear least squares solution is performed.
[0018] According to the method described in one or more embodiments of this specification, the compressibility profile is decomposed into slow-varying components and fast-varying components. An alternating update strategy is used to process the smooth term and the sparse term respectively. The fast-varying component is obtained through threshold update, and the slow-varying component is used to participate in the calculation of the standard state projection.
[0019] According to one or more embodiments of this specification, the standard state projection includes:
[0020] A monotone invertible mapping is used to transform the coordinates of the field temperature and field pressure. The monotone invertible mapping is parameterized by a monotone spline function.
[0021] The mapping parameters are solved by taking mass conservation and consistency of local volume change as constraints.
[0022] According to the method described in one or more embodiments of this specification, the standard state volume is calculated by performing layered integration of the volume conversion factor of each layer with the cross-sectional area curve, and calculating the derivative of the standard state volume with respect to the liquid level height. The derivative is then checked for consistency with the cross-sectional area curve to form a shape consistency constraint for correcting the standard state projection.
[0023] According to one or more embodiments of the method described in this specification, during the standard state projection and closed-loop update process, sensitivity-based error propagation is performed on the mass, standard state volume, and standard state density to obtain variance estimation, and end-region confidence intervals are generated based on piecewise monotonic calibration of historical residuals, which are used to output confidence information and set the weights for closed-loop update.
[0024] According to one or more embodiments of the method described in this specification, the projection consistency constraint is embedded in the objective function of the joint inversion model in the form of a weighted residual term, and the density profile, temperature profile, and compressibility profile are kept consistent with the standard state volume, mass, and standard state density through incremental nonlinear least squares updates.
[0025] According to the method described in one or more embodiments of this specification, experimental design and online system identification are implemented during the closed-loop update process to improve identifiability. Small-amplitude flow pulses or reflux fine-tuning are used as excitations. The transfer kernel between pressure and mass is identified based on the observed response, and the transfer kernel is used as an additional measurement constraint for the joint inversion model in subsequent updates.
[0026] Compared with the prior art, the advantages and beneficial effects of the present invention are as follows:
[0027] By using the joint inversion technique of "static water relation + acoustic bulk modulus", the density profile and compressibility profile are solved from the same source, reducing the systematic deviation caused by the inconsistency between channels.
[0028] By using a nonlinear standard state projection technique based on mass conservation, a traceable mapping from the field state to the standard state is achieved, ensuring the physical closure of the volume and density conversion.
[0029] By using a combined constraint technique of shape consistency and projection consistency, the consistency verification of geometric curves and volume derivatives was achieved, suppressing geometric distortion near the liquid surface.
[0030] By employing slow / fast change decomposition and threshold update techniques, compressibility is used to isolate transient disturbances, thus preserving stable components for settlement.
[0031] By using incremental nonlinear least squares closed-loop update technology, the projection results are fed back to the inversion solution in real time, reducing the accumulation of noise and boundary errors.
[0032] By employing sensitivity-based error propagation and end-region monotonic calibration techniques, the uncertainty of standard state volume, mass, and standard state density is quantified and end-region weighted, making the readings at extreme liquid levels more robust.
[0033] By employing online identification techniques involving small-amplitude flow pulses or reflux fine-tuning, constrained injection of the pressure-mass dynamic relationship was achieved, maintaining consistent readings under varying operating conditions. Attached Figure Description
[0034] Figure 1 This is a schematic diagram of the execution flow of the method of the present invention. Detailed Implementation
[0035] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0036] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0037] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0038] A tank metering system is an engineering system that integrates "geometry-property-metering" sensing and conversion of media within storage tanks in storage and transportation scenarios. Its typical components include three links: multi-source sensing (liquid level, pressure, temperature, and acoustic measurements), geometric modeling (cross-sectional area curves and attitude correction), and property estimation and metering interfaces. Data is organized using a unified time base and dimensional system. During operation, the system is simultaneously affected by tank deformation, temperature stratification, media compressibility, and fluctuations in operating conditions. Errors in any single channel will be amplified in the conversion of volume, mass, and density. Therefore, the core of a tank metering system goes beyond simply "measuring numbers," but rather mapping heterogeneous measurements into traceable, consistent readings under standard conditions, and maintaining stability and verifiability when operating conditions change.
[0039] Based on the above understanding, this invention proposes a data-model closed-loop method for tank metering systems: First, an input dataset is generated, consisting of cross-sectional area curves, pressure profiles, liquid level heights, temperature profiles, and sound velocity profiles. Then, a joint inversion is established based on the hydrostatic relationship and the acoustic bulk modulus relationship, outputting density and compressibility profiles. Under mass conservation constraints, a nonlinear standard state projection is implemented to calculate the standard state volume, mass, and density. Finally, a joint inversion is performed using projection consistency feedback to complete the closed-loop update. Thus, the tank metering system acquires automatic temperature and density adjustment capabilities for standard states, continuously outputting consistent and traceable metering results under different liquid levels and varying operating conditions.
[0040] like Figure 1 As shown, a method for automatically adjusting the liquid temperature and density in a tank metering system includes the following steps:
[0041] Collect and reconstruct cross-sectional area curves, pressure profiles, liquid level heights, temperature profiles, and sound velocity profiles to form the input dataset;
[0042] The acquisition and reconstruction steps include:
[0043] The wall profile was reconstructed by circumferential ultrasonic tomography and the cross-sectional area was calculated to obtain the cross-sectional area curve.
[0044] The hydrostatic gradient is obtained after zero-point correction and smoothing of the pressure profile.
[0045] Time synchronization and spatial alignment of temperature and sound velocity profiles;
[0046] The tilt angle of the inertial measurement unit is used to correct the attitude of the cross-sectional area curve and the liquid level height to form the input dataset.
[0047] This embodiment provides a practical explanation of "collecting and reconstructing cross-sectional area curves, pressure profiles, liquid level heights, temperature profiles, and sound velocity profiles to form an input dataset." A ring of piezoelectric ultrasonic transducers is installed around the circumference of the tank. A sequential, full-receive scanning method is used to obtain the flight time and amplitude information between any two points. A time delay-radial distance conversion relationship and amplitude threshold are established through empty and full tank calibration. The inner wall contour of each layer is reconstructed layer by height. After mapping the radial distance of each angle to polar coordinate contours, missing angle interpolation and burr removal are performed. The contours are then closed, and the cross-sectional area is calculated, resulting in the cross-sectional area curve varying along the height. To avoid false protrusions caused by local attachments, a temporal consistency check is used: the contours at the same elevation at adjacent times are differentially analyzed. If the difference exceeds an empirical threshold, resampling and weighted noise reduction of that angle are triggered. The units, coordinate systems, and timestamps of the inner wall contours and cross-sectional areas are fixed at this stage and directly reused in subsequent steps without secondary conversion.
[0048] The pressure profile is acquired by a vertically distributed array of static pressure transmitters, with a headspace pressure sensor used for zero-point correction. Upon power-up, static zero-point calibration is performed, recording the offset of each channel under known liquid level or empty tank conditions and writing it to the device register. During operation, short-term checks are performed at set intervals; if drift is detected, offset compensation is performed based on the headspace pressure. To suppress high-frequency noise in the pressure curve, a combination of sliding window smoothing filtering and outlier median replacement is used, followed by linear interpolation on a uniform elevation grid to form a continuous pressure profile. Liquid level is provided by an independent level gauge, and cross-checking with the pressure profile is established: when the liquid level is inconsistent with the isobaric surface calculated from the pressure profile, a self-check prompt is triggered in the level channel, and an identifier is recorded to prevent abnormal data from entering subsequent stages.
[0049] Temperature profiles are provided by distributed temperature sensing units, typically implemented as fiber optic distributed temperature sensors or multi-point platinum resistance arrays. Sound velocity profiles are measured using a short-baseline ultrasonic path, with the path span and installation angle fixed in the factory calibration. Temperature and sound velocity channels are synchronized using a unified time source, and the two profiles are spatially aligned on a unified elevation grid. If the probe installation height deviates from the nominal height, height correction is performed based on the installation records. A consistency check is performed on the two profiles: several reference layers are selected, and the temperature and sound velocity changes are compared to determine if they conform to the common-sense unidirectional or antidirectional relationship of the medium. If there is a significant inconsistency, the sound velocity weight of that layer is reduced, and maintenance is prompted.
[0050] Attitude correction is achieved by deploying inertial measurement units (IMUs) at the tank flange to acquire pitch and roll angles. The attitude angles output by the IMUs are converted into gravity direction vectors in real time. These vectors are then used to rotate the cross-sectional area curve and the liquid level reference surface to obtain geometric quantities aligned with the gravity direction. To avoid erroneous corrections caused by instantaneous vibrations, the attitude angles are subjected to Kalman filtering or an equivalent low-pass filtering, retaining only low-frequency components for geometric and liquid level corrections. The attitude correction process generates attitude quality indicators to guide subsequent algorithms to reduce reliance on attitude anomalies.
[0051] After calibration, filtering, alignment, and correction of each channel, the data is encapsulated into an input dataset with a unified timestamp. This dataset includes cross-sectional area curves, pressure profiles, liquid level heights, temperature profiles, and sound velocity profiles, along with their metadata. The metadata includes at least coordinate system definitions, units, sampling intervals, calibration coefficients, quality identifiers, and missing measurement masks. To ensure traceability, the input dataset is versioned at the window level, and the generation algorithm and parameter summaries are recorded. This facilitates subsequent joint inversion and standard state projection in tracing the data source when reading anomalies occur. This embodiment, through a rigorous acquisition, reconstruction, and alignment process, provides subsequent steps with a clearly structured, dimensionally consistent, and directly usable input dataset, ensuring the reliability and stability of subsequent automatic temperature and density adjustments from an engineering perspective.
[0052] Based on the input dataset and the relationship between hydrostatics and acoustic bulk modulus, a joint inversion model is established to obtain density profile, temperature profile and compressibility profile.
[0053] This embodiment focuses on the construction and solution of a joint inversion model, aiming to obtain density, temperature, and compressibility profiles from the input dataset within the same data window. The input dataset consists of the aforementioned cross-sectional area curves, pressure profiles, liquid level heights, temperature profiles, and sound velocity profiles, all of which have been synchronized in time, aligned spatially, and standardized in units. The joint inversion model employs a hierarchical discretization approach, dividing the tank height into equally spaced layers. The unknowns are the density, temperature, and compressibility of each layer. The model uses a factor graph to organize constraints, where measurement factors represent physical measurement relationships, prior factors represent smoothing and boundary conditions, and the solution employs nonlinear least squares combined with robust loss to suppress outliers.
[0054] The core physical constraints are the hydrostatic relation and the acoustic bulk modulus relation. The hydrostatic relation is written as follows:
[0055]
[0056] in, For pressure at height, Density at height position, For height coordinates, This is the acceleration due to gravity.
[0057] Writing acoustic bulk modulus relationships:
[0058] ;
[0059] in, Bulk modulus The speed of sound at altitude. For compressibility. The above two equations directly constrain the pressure profile and sound velocity profile to density and compressibility, avoiding inconsistencies between independent channels.
[0060] To improve identifiability, temperature profiles are directly included in the calculations as measured channels, and weak constraints based on material constitutive modeling are added to the factor plot to limit the direction and magnitude of density variation with temperature. This is specifically implemented as a combination of first-order difference smoothing and boundary conditions, without introducing additional complex equations. Prior factors also apply smoothing to density and compressibility along the height direction to prevent measurement noise from being amplified into interlayer oscillations. For layers with missing measurements or those marked as anomalous in quality, measurement factors are automatically downweighted or masked, while the solution process remains convergent.
[0061] The solution process employs a hierarchical iterative Gauss-Newton method. Each iteration first calculates the residuals and weights of each factor based on the current estimate, then updates the unknowns. The step size is determined through a line search, and the convergence criterion is a decrease in the overall residual and a change in the sum of two consecutive estimates being less than a set threshold. To avoid numerical ill-conditioning caused by scaling inconsistencies, the residuals of each factor are first normalized, and the column scaling of the sensitivity matrix is adjusted. After the solution is completed, a hierarchical uncertainty assessment is given based on the inverse pair density, temperature, and compressibility of the approximate Hessian matrix, serving as the weighting basis for subsequent steps.
[0062] In this embodiment, the tank height is discretized using a 0.1-meter grid. The pressure gradient is obtained by differentiating the pressure profile on a uniform grid. The sound velocity profile is directly calculated from the ultrasonic path, and the temperature profile is obtained from multi-point sensing. The initial density is calculated using hydrostatic relations, and the initial compressibility is calculated from the initial values of sound velocity and density. Convergence is achieved after approximately 6 to 10 iterations, resulting in a density and compressibility profile that is smooth with height and consistent with pressure and sound velocity. The temperature profile is adjusted with weak constraints to maintain consistency with the measured channels. This joint inversion result serves as the input for subsequent standard state projection and closed-loop updates, effectively reducing reading deviations caused by stratification and measurement noise, and ensuring the stability and traceability of subsequent volume and density conversions.
[0063] The joint inversion model includes:
[0064] Measurement constraints and prior constraints are set in the form of factor diagrams. Measurement constraints include hydrostatic relation constraints and acoustic bulk modulus relation constraints, while prior constraints include material constitutive relation constraints and smoothness constraints.
[0065] Density profile, temperature profile, and compressibility profile are obtained by nonlinear least squares solution.
[0066] This embodiment provides a practical explanation of the "joint inversion model, which includes measurement and prior constraints of the factor graph, and obtains density, temperature, and compressibility profiles through nonlinear least squares solutions." The input dataset consists of synchronized and aligned cross-sectional area curves, pressure profiles, liquid level heights, temperature profiles, and sound velocity profiles. The height direction is discretized using a fixed grid, with each grid containing three unknowns: density, temperature, and compressibility. The factor graph uses nodes to represent unknowns and edges to represent constraints, which are divided into measurement constraints and prior constraints. Measurement constraints directly utilize the hydrostatic relationship formula and acoustic bulk modulus relationship formula given earlier, establishing a one-to-one correspondence between pressure gradient, sound velocity, and unknowns; liquid level height is used to limit the consistency of pressure and geometric reference at the upper boundary. Prior constraints include two types: material constitutive relationship constraints, used to limit the reasonable direction of temperature and density changes; and smoothing constraints, used to limit abrupt changes between adjacent grids, automatically reducing the weight or masking missing measurement locations.
[0067] The solution employs an iterative nonlinear least squares approach. First, the inverse calculation of the still-water relationship is used as the initial density value. The initial compressibility value is calculated using the sound velocity and the initial density, while the initial temperature value is directly derived from the temperature profile. Then, the objective function is constructed and iterated. Weights are adaptively adjusted based on channel quality indicators and residual magnitude, and outliers are suppressed by robust weights. During iteration, the residuals and Jacobian information for each constraint are calculated layer by layer. After updating the unknowns, a line search is performed to determine the step size. The iteration stops when the overall residual decreases slowly and the update amounts between two consecutive iterations are below a threshold. After the solution is completed, the uncertainty assessments for the three profiles are approximated using regularized normal equations and output along with the data quality indicators for subsequent weight setting steps.
[0068] To facilitate engineering implementation, the system architecture includes a data interface layer, a factor graph construction layer, a solver layer, and a quality management layer. The data interface layer is responsible for time synchronization, unit unification, and coordinate mapping; the factor graph construction layer generates computable residuals and weights for each physical relationship; the solver layer performs iteration, line search, and convergence criteria; and the quality management layer tracks the reliability of each profile, records missing measurement masks, and generates diagnostic logs. Recommended parameters include a height grid spacing of no more than 1% of the tank height, and the number of iterations typically does not exceed ten. When vibration or sudden temperature changes cause an increase in residuals, the smoothing constraint weights are automatically increased, and the weights of abnormal channels are decreased to ensure solution stability.
[0069] This embodiment can be deployed on common industrial controllers or embedded computing units. In actual tests, the above process can stably output density and compressibility profiles consistent with pressure gradient and sound velocity within a single time window. The temperature profile remains consistent with the measurement under weak constitutive constraints. The results serve as direct inputs for standard state projection and closed-loop updates, significantly reducing reading drift caused by sensor noise, local stratification, and attitude changes.
[0070] The core computational expression used in this embodiment only involves the least squares form of the objective function:
[0071]
[0072] in, For each height grid cell, there is an unknown vector (including density, temperature, and compressibility). The residual function corresponding to the constraint, The weights are for this constraint. The hydrostatic relation formula and the acoustic bulk modulus relation formula given earlier are used to construct the residual terms related to pressure and sound velocity, and will not be repeated here.
[0073] Before performing the nonlinear least squares solution, the sensitivity matrix of the joint inversion model is orthogonalized to improve the numerical conditions, and then the nonlinear least squares solution is performed.
[0074] This embodiment details the practical approach of "orthogonalizing the sensitivity matrix of the joint inversion model to improve numerical conditions before performing the nonlinear least squares solution." The aim is to reduce ill-conditioned phenomena caused by different parameter dimensions and correlations, thereby improving the stability and interpretability of the update step.
[0075] First, within the current time window and height grid, residual vectors and sensitivity matrices are established based on prior data and the model, forming a linearization subproblem. To ensure consistency with subsequent closed-loop weights, channel weights and quality indicators are applied to each observation channel to complete weighting and outlier suppression. Subsequently, column scaling by unit and scale is performed to ensure that each parameter column has a similar magnitude, avoiding a single parameter dominating the update.
[0076] The core computation uses a weighted linearized subproblem:
[0077] ;
[0078] in, Update the vector for the parameters. For the residual vector, This is the sensitivity matrix. Let be the diagonal weight matrix. To improve the condition number, an orthogonal decomposition with column pivots is performed on the weighted sensitivity matrix to obtain an orthogonal basis and upper triangular factors, and then least squares are solved in the orthogonal space. The computational relationship is as follows:
[0079]
[0080] in, This is the weighted and scaled sensitivity matrix. This is the weighted residual vector. It is an orthogonal matrix. The matrix is an upper triangular matrix. The update step is then obtained through back-substitution, and the matrix is scaled back to the original parameter space. If an element close to zero appears on the upper triangular diagonal, its rank is determined by a numerical threshold; lower-rank directions are frozen or a smaller step size is used to avoid amplifying noise.
[0081] To ensure feasibility, the orthogonalization module employs column-pivoted QR decomposition, with numerical thresholds depending on machine accuracy and sample size. Column scaling factors are derived from the L2 norm of each column or the stability scale of the historical window. Step size control uses a line search or trust region strategy, selectively accepting update steps that reduce the objective function; if the objective function increases, damping is increased and retrying continues until the descent condition is met or a degradation strategy is triggered. All processing records the condition number, effective rank, frozen parameter index, and final step size, serving as the basis for subsequent weight scheduling and maintenance hints.
[0082] In terms of system implementation, it is recommended to divide it into four sub-units: a sensitivity construction unit responsible for generating residuals and sensitivities; a weighting and scaling unit performing channel weighting, anomaly weighting, and column scaling; an orthogonalization solution unit performing column pivoting QR decomposition, rank determination, and back substitution; and a step size and recording unit completing line search, damping adjustment, and diagnostic archiving. This process can run in real time on common industrial computing platforms. Typically, one iteration of orthogonalization and one update per window is sufficient to meet the convergence requirements, thus providing robust parameter estimates for subsequent standard state projection and closed-loop updates. The above formulas have been given uniformly above and will not be repeated in subsequent references.
[0083] The compressibility profile is decomposed into slow-varying components and fast-varying components. An alternating update strategy is used to process the smooth term and the sparse term respectively. The fast-varying component is obtained through threshold update, and the slow-varying component is used to participate in the calculation of the standard state projection.
[0084] This embodiment provides an engineering implementation for the decompressibility profile decomposition and solution. To suppress the impact of transient disturbances and local mixing on the conversion results, the compressibility profile is split into slow-varying components and fast-varying components, which are updated alternately within the same data window. Finally, only the slow-varying components are used in the subsequent standard state projection calculation, while the fast-varying components are used for alarms and quality indicators.
[0085] The compressibility profile is decomposed according to the following formula:
[0086]
[0087] in, For height coordinates, It is a compressible profile. For slowly varying components, The components are fast-changing components. This decomposition assigns stratification or slow gradients to slow-changing components, while short-term fluctuations and local disturbances are assigned to fast-changing components.
[0088] In the initialization phase, the compressibility profile is calculated based on the sound velocity profile and initial density value. One-dimensional second-order difference smoothing is used to obtain the initial slowly varying components, while the rapidly varying components are set to zero. Then, alternating updates are performed: First, the rapidly varying components are updated by calculating the difference between the current compressibility and the slowly varying components, and applying a threshold contraction to the difference to obtain the rapidly varying components; second, the slowly varying components are updated by performing least-squares fitting under smoothing constraints on the slowly varying components while keeping the first derivative of the boundary continuous, avoiding step jumps at the top and bottom.
[0089] The threshold shrinkage update for rapidly changing components can be written as:
[0090]
[0091] in, For the first The fast variable component of the next iteration. For the first The slow-varying component of the next iteration For the threshold, This is a threshold shrinkage operator, which means subtracting from the input in the positive and negative directions respectively. If the threshold is less than zero, it is set to zero. The threshold is taken from a robust estimate of the historical window noise level, preferably converted using the median absolute deviation of the residuals, and is adaptively adjusted according to the channel quality label.
[0092] The slow-varying components are updated using linear least squares with smoothing constraints, terminating in the inner layers with a fixed number of iterations or a convergence criterion. Weights are assigned according to the quality identifiers of the pressure, sound velocity, and temperature channels, with weights reset to zero for missing layers. To avoid numerical drift, a physically feasible range is set for the slow-varying components; when a fast-varying component continuously exceeds this range at a certain height, it is recorded as a transient disturbance and maintenance suggestions are output.
[0093] The iteration terminates when the mean square error of the slowly varying component between two iterations is less than a preset threshold or the maximum number of iterations is reached. After termination, three types of outputs are generated: slowly varying components for subsequent standard state projection, the intensity and location of rapidly varying components for diagnosis and alarms, and uncertainty assessment for closed-loop weight settings. The slowly varying components directly replace the original compressibility in volume and density conversions, while the rapidly varying components do not participate in the conversion to prevent transient disturbances from being transmitted to the readings.
[0094] In system implementation, this function is encapsulated as a "compressibility decomposition module," sharing timestamps and coordinate grids with the data quality management and joint inversion solver. The module employs mirror continuation processing for the boundary layer, reduces the threshold sensitivity of rapidly varying components to attitude anomaly windows, and fully records thresholds, iteration cycles, and alarm flags to ensure traceability and verifiability of results. Field verification shows that this decomposition strategy significantly reduces the impact of interlayer noise artifacts and short-term disturbances on volume and density conversions, improving the stability and consistency of subsequent readings.
[0095] The nonlinear standard state projection based on mass conservation maps the field temperature and pressure to the standard state, and calculates the standard state volume, mass and density.
[0096] This embodiment illustrates a nonlinear standard state projection based on mass conservation. The goal is to map the physical and geometric properties corresponding to on-site temperature and pressure to preset standard temperature and pressure within the same data window, outputting standard state volume, mass, and density. Inputs include cross-sectional area curves, liquid level height, density profile, temperature profile, pressure profile, and slowly varying compressibility components. The standard states are provided in a calibration file and include standard temperature and pressure.
[0097] The standard state projection is calculated using volume conversion factors layered along the height. These volume conversion factors reflect the volume change between the field condition and the standard state, and are expressed using a superposition of exponential and linear thermal expansion, taking into account compressibility and the influence of temperature on volume.
[0098]
[0099] This is the volume conversion factor. For height coordinates, It is a slowly varying component of compressibility. For on-site pressure For standard pressure, The ambient temperature. Standard temperature This is the volumetric thermal expansion coefficient. The volumetric thermal expansion coefficient is derived from a media database or experimental calibration table. If this is not available, a safe lower limit value is taken based on the media type, and the mass identifier is retained. To ensure monotonicity and physical rationality, upper and lower limits are set for the volume conversion factor, and smooth constraints are applied between layers.
[0100] The standard state volume, mass, and density are calculated using the following formulas:
[0101]
[0102]
[0103]
[0104] For the standard state volume, For quality, For the standard state density, This refers to the liquid level height. For the cross-sectional area curve, This is a density profile. All three quantities are calculated and archived within the same timestamp to ensure traceability.
[0105] In numerical implementation, the volumetric thermal expansion coefficient is first initialized hierarchically: if the temperature fluctuates within a narrow range, the volumetric thermal expansion coefficient remains constant; if a significant temperature gradient exists, the volumetric thermal expansion coefficient is taken according to the temperature range of the medium surface. Then, a prediction-correction process is performed on the volume conversion coefficient: in the prediction stage, the hierarchical volume conversion coefficient is directly obtained from the formula; in the correction stage, shape consistency is used as the criterion for comparison. The difference between the cross-sectional area curve and the value at the liquid surface is considered. If the difference exceeds a threshold, the weights of the volumetric thermal expansion coefficient and the slowly varying compressibility component are fine-tuned, and the volume conversion factor is recalculated. To avoid noise-induced oscillations, shape consistency is evaluated only within a finite layer near the liquid surface, using an exponential moving average stable derivative.
[0106] Regarding boundary and anomaly handling, natural boundary conditions are used for the top and bottom boundaries, and the derivative of the volume conversion factor is constrained to zero at the boundaries. When the attitude mass indicator or pressure mass indicator is abnormal, the volume conversion factor is locked unchanged, and the mass is updated only with density integral. The full projection is restored after the mass indicator is restored. All adjustments are recorded in the window log, including standard temperature and standard pressure, source of volumetric thermal expansion coefficient, shape consistency error, volume conversion factor range, and final version number.
[0107] This embodiment can run in embedded or host computer environments. In practical applications, the volume conversion factor fluctuates little under most media. A single prediction and correction can satisfy the dual constraints of shape consistency and mass conservation, resulting in a stable standard state volume and standard state density, providing reliable input for closed-loop updates and reading consistency.
[0108] Standard state projection includes:
[0109] A monotone invertible mapping is used to transform the coordinates of the field temperature and field pressure. The monotone invertible mapping is parameterized by a monotone spline function.
[0110] The mapping parameters are solved by taking mass conservation and consistency of local volume change as constraints.
[0111] This embodiment illustrates the implementation process of standard state projection. The goal is to convert field temperature and pressure into standard temperature and pressure through a monotonically reversible mapping within the same data window, and to determine the mapping parameters under the constraints of mass conservation and consistency of local volume changes. The outputs are standard state volume, mass, and standard state density. Inputs include cross-sectional area curves, liquid level height, density profile, temperature profile, pressure profile, and slowly varying compressibility components. Standard temperature and pressure are provided by the calibration file.
[0112] A triangular monotone reversible mapping is employed: first, the field temperature is mapped to a standard temperature, and then, using the standard temperature as a condition, the field pressure is mapped to a standard pressure. The core expression for this mapping is:
[0113] ,
[0114] Standard temperature For standard pressure, The ambient temperature. Due to on-site pressure, and It is a monotonic spline function. and These are spline parameters. Monotonicity is achieved by using nonnegative reparameters or a monotonic spline library on the spline derivative parameters, ensuring the mapping is invertible. Height coordinates are represented by a layered raster, with a set of parameters shared between layers or shared segmentally within a finite number of layers to balance stability and adaptability.
[0115] The parameter solution follows two types of constraints. The first is the mass conservation constraint: the Jacobian of the volume conversion factor is calculated using the current mapping, and the standard state volume is obtained accordingly. The mass is obtained by integrating the density and cross-sectional area, and the standard state density is obtained by the ratio of mass to standard state volume; the calculations for volume and density have been given previously and will not be repeated. The second is the local volume change consistency constraint: the volume conversion factor derived from the mapping is compared with the physical volume conversion factor obtained based on the slowly varying compressibility component and volumetric thermal expansion (the calculation formula has been given previously), and the deviation between the two is used as the constraint residual. Considering both types of constraints, a nonlinear least squares problem with the residual sum of squares as the objective is constructed, and the solution is obtained iteratively. and .
[0116] In terms of engineering implementation, a set of replicable steps is provided. Firstly, node setup and initialization: Select several nodes for both the temperature and pressure axes, ensuring the node range covers the observed extreme values while leaving safety boundaries. Initially... Obtained from linear calibration, initial The following are the key features of the solution: First, monotonicity and smoothness control: The spline derivative parameters are nonnegated, and first-order derivative continuity is added at the layer boundaries. Constraint weights are reduced for attitude anomalies or missing layers to avoid noise amplification. Second, solution and convergence: Gauss-Newton or Löwenberg-Marquardt methods are used, with the step size determined by line search. When the objective function decreases insufficiently or overfitting occurs, the smoothing weight is increased and the parameter step size is reduced. Third, shape consistency verification: The liquid level derivative and cross-sectional area curves are compared using the standard volume near the liquid surface. If the threshold is exceeded, the inter-node tension parameters are recalculated. Fourth, anomalies and rollback: When the channel quality indicator shows continuous anomalies, the following steps are taken: Temporarily degenerates into an identity mapping, only for Perform small-step updates; resume combined updates after the anomaly is resolved.
[0117] The output includes standard state volume, mass, and standard state density, as well as mapping parameters, node locations, constraint residuals, and mass identifiers, all archived according to time windows for easy traceability and maintenance. This method, while ensuring physical consistency, uses finite parameters of monotonic splines to characterize nonlinear mappings, facilitating stable deployment in industrial controllers or host computer environments.
[0118] The standard state volume is calculated by performing layered integration of the volume conversion coefficients of each layer with the cross-sectional area curve, and calculating the derivative of the standard state volume with respect to the liquid level height. This derivative is then used to verify the consistency of the cross-sectional area curve to form a shape consistency constraint for correcting the standard state projection.
[0119] This embodiment illustrates the implementation process of shape consistency constraints. The purpose is to constrain the geometric consistency of the standard state projection using a cross-sectional area curve, avoiding unreasonable geometric distortions in volume conversion near the liquid surface. The inputs are the cross-sectional area curve, liquid level height, density profile, slowly varying compressibility component, temperature profile, and pressure profile. The volume conversion factor has been obtained from compressibility, temperature, and pressure as described above, and the formula will not be repeated here.
[0120] After discretizing along the height into a fixed grid, the standard state volume is calculated. The core expression is:
[0121]
[0122] in: For the standard state volume, This refers to the liquid level height. For the cross-sectional area curve, This represents the volume conversion factor. Numerical implementation employs layered integration, prioritizing the trapezoidal rule and densifying the grid near the liquid surface to improve boundary accuracy.
[0123] To perform geometric consistency verification, the derivative of the standard state volume with respect to the liquid level height was calculated and normalized at the liquid surface:
[0124] ;
[0125] in: Let be the derivative of the standard state volume with respect to the liquid level height. This is the volume conversion factor at the liquid surface. For the normalized derivative, This is a weighted average of the volume conversion factors for several layers above and below the liquid surface. The normalized derivative is compared with the value of the cross-sectional area curve at the liquid surface, and the shape consistency error is defined as... .
[0126] The engineering process is as follows: First, select a narrow window centered on the liquid surface and calculate... And obtained Second, with First, compare and form an error sequence, and use exponential moving average to suppress single noise impacts. Second, set two threshold levels. If the error is below the first threshold, it is considered to pass. If the error is above the first threshold but below the second threshold, reduce the change of the volume conversion factor in that window. If the error is above the second threshold, perform small-step correction on the mapping parameters of the standard state projection. Third, after correction, recalculate the standard state volume and normalized derivative. If the error does not return to the threshold, temporarily lock the volume conversion factor of the next one or two layers above the liquid surface, and resume joint update in the next time window.
[0127] Quality and anomaly handling include: when the attitude or pressure channel quality is flagged as abnormal, only the mass integral is calculated, and shape consistency correction is not triggered; when there are missing measurement intervals in the cross-sectional area curve near the liquid surface, historical window interpolation is used to repair them first, followed by comparison; when a sudden temperature change causes... During transitions, the smoothing coefficient of the moving average is automatically increased to avoid overcorrection. All comparison and correction actions are recorded with timestamps, window levels, thresholds, parameter increments, and result status for easy traceability and maintenance.
[0128] In this embodiment, the grid spacing is no greater than 1% of the tank height, and the liquid level window has three to five layers; the two threshold levels are obtained statistically according to the calibration period. This constraint, without changing the mass conservation, makes the boundary response of the standard state volume to the liquid level consistent with the cross-sectional area curve, significantly reducing the impact of small geometric distortions near the liquid level on the stability of the reading.
[0129] A closed-loop update is performed using a projection consistency constraint feedback joint inversion model composed of standard state volume, mass, and standard state density, outputting the updated standard state volume, standard state density, and mass.
[0130] This embodiment illustrates the implementation process of closed-loop update. The preceding steps have already obtained the standard-state volume, mass, and density from the standard-state projection output, as well as the density profile, temperature profile, and slowly varying compressibility component obtained from the joint inversion. The purpose of closed-loop update is to feed back the globally consistent information formed by the standard-state projection into the joint inversion, performing minor corrections to the density profile, temperature profile, and slowly varying compressibility component. This ensures that the volumetric stratification integral and the mass integral match each other under the standard state, reducing deviations caused by noise, local disturbances, or boundary errors.
[0131] Projection consistency constraints are constructed on a single time window basis. First, the standard state volume, mass, and density are recalculated from the current field variables, denoted as the standard state volume, mass, and density calculated from the field variables, respectively. Then, these are compared with the standard state volume, mass, and density calculated from the standard state projection results to obtain the residuals. These residuals are then incorporated into the joint inversion objective function as additional constraints in the secondary solution within the same window. To avoid local anomalies hindering global updates, component weights are applied to the residuals, with the weights adaptively set based on channel quality indicators and historical stability.
[0132] The core computation expression contains only the least-squares form of the consistency residuals:
[0133]
[0134] The vector of field variables to be updated; This is the diagonal weight matrix for the projection consistency constraint; For consistent residuals; The standard state volume is calculated from the field variables. The standard state volume is obtained by projecting the standard state. The mass is calculated from the field variables. The mass obtained by projecting from the standard state; The standard density of states is calculated from the field variables. The standard density of states is obtained by projecting the standard state.
[0135] The engineering implementation proceeds in the following order: First, construct consistent residuals and weights. If the liquid level, attitude, or pressure mass is identified as abnormal, the corresponding component weight is temporarily reduced. Second, perform an incremental update using the same solver as the joint inversion, with the step size determined by line search. If the objective function does not decrease, reduce the step size and increase the smoothing constraint weight. Third, after the update, recalculate the standard state volume, mass, and standard state density. If any component residual still exceeds the threshold, only local fine-tuning is performed on the high-sensitivity layers, and an alarm is recorded. Fourth, output the standard state volume, standard state density, and mass after closed-loop update, and archive the weights, step sizes, residuals, and mass identifiers in this window for reference in subsequent windows.
[0136] Boundary and anomaly handling includes: freezing the consistency weight of the narrow window when there are missing measurements or abnormal fluctuations in the cross-sectional area curve near the liquid surface, and only updating the remaining layers; extending the time window of the smoothing constraint to suppress oscillations when sudden changes in sound velocity or temperature cause short-term instability in the slowly varying compressible components. Through the above closed-loop mechanism, the global constraints of the standard state projection and the local constraints of the joint inversion are consistent within the same solution framework, thereby improving the stability and traceability of tank gauge readings under different operating conditions.
[0137] During the standard state projection and closed-loop update process, sensitivity-based error propagation is performed on the mass, standard state volume, and standard state density to obtain variance estimates. Piecewise monotonic calibration based on historical residuals generates end-region confidence intervals, which are used to output confidence information and set the weights for closed-loop updates.
[0138] This embodiment presents a method for generating confidence levels and setting weights during the standard state projection and closed-loop update stages. The goal is to assess the uncertainty of mass, standard state volume, and standard state density within a single time window, perform piecewise monotonic calibration based on historical residuals, output a confidence interval, and use the confidence information for weight configuration in the closed-loop update, thereby improving robustness under extreme conditions such as low and high liquid levels.
[0139] First, sensitivity-driven error propagation is performed. The input quantities are selected as hierarchical sampled values of cross-sectional area curves, liquid level heights, density profiles, temperature profiles, pressure profiles, and slowly varying compressibility components. Numerical sensitivity is constructed by applying a small perturbation to each input quantity, obtaining the output increment using the aforementioned volume and mass calculation process, and then forming an approximation of the partial derivative of the output with respect to the input. These are then aggregated layer by layer into a sensitivity matrix. The core expression is:
[0140]
[0141] in, For the output vector , This is the sensitivity matrix. This is the covariance matrix of the input variables. The square root of the diagonal elements yields the uncertainties of the three output variables, which are used for subsequent interval estimation and weight setting.
[0142] Based on the above uncertainties, a nominal confidence interval is formed:
[0143]
[0144] For the point estimate of the current window, is the confidence coefficient. To avoid insufficient end-area coverage, piecewise monotonic calibration based on historical residuals is used to determine it. The specific approach is as follows: Divide the liquid level into several sections, with the end sections being more densely populated; for each section, calculate the residual and nominal interval coverage over the most recent period to generate empirical coefficients within the section; apply monotonic constraints to the coefficient sequence to ensure that the coefficients near the end sections are not lower than those of the internal sections. In practice, adjacent sections are merged and piecewise linear interpolation is used to obtain a monotonic calibration curve that changes with the liquid level, mapping the nominal interval to the calibration interval. When there are significant temperature or pressure stratifications, secondary segments based on temperature or pressure bands are superimposed to ensure the reasonableness of coverage changes with operating conditions.
[0145] The weights for closed-loop updates are set as the reciprocal of the interval width and limited to an engineering-acceptable range: the wider the interval, the smaller the weight, to avoid forced convergence when uncertainty is high. Weight calculation includes a minimum and maximum weight constraint to prevent extreme weighting due to short-term noise. For areas near the liquid surface and at extremely low or high levels, the calibrated interval width is used to set the weights. Data segments marked as abnormal (with unqualified attitude, pressure, or sound velocity quality indicators) are temporarily downweighted or frozen, and only participate in the update after the quality indicator is restored.
[0146] The system implementation comprises three parts: a sensitivity calculation module that uses forward differencing or symmetric differencing to perform perturbation and recalculation in parallel; a historical residual cache module that maintains a sliding time window and provides segmented statistics and coverage assessment; and a calibration and weighting module that outputs confidence intervals, segment coefficients, and closed-loop weights, sharing the same timestamp and version number with the joint inversion solver. During operation, the system saves the size of the sensitivity matrix, the source of the input covariance, segment divisions, monotonic calibration curves, and final weights for easy traceability and maintenance. This method, while ensuring controllable computational costs, achieves self-consistent configuration of confidence information and weights for extreme operating conditions, thereby improving the stability of closed-loop updates and reading consistency.
[0147] The projection consistency constraint is embedded in the objective function of the joint inversion model in the form of a weighted residual term. Through incremental nonlinear least squares update, the density profile, temperature profile, and compressibility profile are kept consistent with the standard state volume, mass, and density.
[0148] This embodiment illustrates a method for embedding projection consistency constraints into a joint inversion model and performing closed-loop updates using incremental nonlinear least squares. The inputs include the density profile, temperature profile, and slowly varying compressibility component obtained from the previous joint inversion, as well as the standard-state volume, mass, and density output from the standard-state projection. The objective is to ensure that the standard-state volume, mass, and density calculated from the field variables are consistent with the standard-state projection results within a single time window, and to fine-tune the field variables accordingly to suppress deviations caused by noise and boundary errors.
[0149] First, the projection consistency residuals are constructed. The standard state volume, mass, and density calculated from the current field variables are obtained using the existing process. These are then subtracted term by term from the standard state projection results to obtain a ternary residual vector. Component weights are set based on uncertainty and channel mass indicators; the weights for the liquid surface neighborhood and extreme liquid levels can be appropriately reduced. Subsequently, the projection consistency residuals are added as weighted terms to the joint inversion objective function, forming an augmented problem. Larger step sizes are allowed only for high-sensitivity layers to avoid overcorrection in low-resolution regions.
[0150] The core calculation expression is:
[0151]
[0152] in, The field variable vector (containing density profile, temperature profile, and slowly varying compressibility components), For the increment of the field variable, For the physical and prior residuals of the joint inversion, This is the corresponding sensitivity matrix. For the joint inversion residual weight matrix, Let be the projection consistency residual vector. This is the projection consistency weight matrix.
[0153] The solution process employs incremental updates using column pivoting and line search: 1. Based on the current solution, construct residuals and sensitivity, and complete channel weighting and column scale normalization; 2. Solve the increment and perform step-size search; if the objective function does not decrease, increase damping or decrease the step size; 3. Apply boundary projection to out-of-bounds components and perform local refinement only at layers with high error sensitivity; 4. Recalculate the standard state volume, mass, and standard state density; if any component still exceeds the threshold, freeze the weights of abnormal layers and proceed to the next small update step. When attitude, pressure, or cross-sectional area curves are marked as abnormal, temporarily reduce the weight of projection consistency to a single-component constraint of mass consistency or volume consistency; once the mass label is restored, full constraints are reactivated.
[0154] To ensure project feasibility, the system is divided into consistency building units (generating projective consistency residuals and weights), augmented solution units (completing incremental solutions and line searches), constraint and boundary units (shape consistency, physical upper and lower bounds, and layer freezing), and diagnostic archiving units (saving step size, residuals, weights, and states). In field applications, one to two incremental updates are typically sufficient for each time window to bring the three consistency residuals into the threshold band, while maintaining the smoothness and physical feasibility of density and compressibility in the height direction. Closed-loop updates output the updated standard-state volume, standard-state density, and mass, which are simultaneously archived for weight and initial value settings in subsequent windows, forming stable and traceable continuous readings.
[0155] Experimental design and online system identification are implemented during the closed-loop update process to improve identifiability. Small-amplitude flow pulses or recirculation fine-tuning are used as excitations. The transfer kernel between pressure and mass is identified based on the observed response, and the transfer kernel is used as an additional measurement constraint for the joint inversion model in subsequent updates.
[0156] This embodiment illustrates the specific procedures for experimental design and online system identification during closed-loop updates. The aim is to obtain the dynamic response of pressure to mass changes by using controllable small-amplitude flow pulses or reflux fine-tuning as excitation, without affecting process safety and metering continuity. This allows for the identification of the transmission core between pressure and mass, which is then added as an additional measurement constraint to the joint inversion model for subsequent update iterations.
[0157] The experimental design phase is triggered after the standard state projection is completed and before the closed-loop update begins. The control unit sends a short-duration, amplitude-limited, and symmetrical excitation sequence to the bypass valve or return pump, while simultaneously recording synchronous data from the flow meter, pressure sensor, temperature, and liquid level. To reduce operational disturbances, the excitation uses stepped pulses or triangular pulses, and water hammer is suppressed by gradual rise and fall at the start and stop edges. The data undergoes preprocessing: transient anomalies caused by valve position jitter are removed; pressure is detrended and band-limited filtered, and aligned with the flow signal using a unified clock; abnormal intervals in attitude or headspace pressure are marked and weighted to avoid contamination identification.
[0158] The online system identification employs recursive least squares with finite memory, incorporating nonnegativity and finite support constraints to ensure the transfer kernel satisfies physical interpretability (unidirectional response, finite time delay). The core relationship is:
[0159]
[0160] This represents the increase in pressure after the trend has reversed. This serves as the kernel for the transfer of pressure to mass flow rate. For flow-driven induction, a forgetting factor is used to control time-varying behavior during the identification process, and regularization is used to stabilize ill-conditioned directions. When there are abrupt changes in temperature or slowly varying compressibility components, the memory length is automatically shortened to improve tracking ability. After identification, validity is verified: the residual autocorrelation is checked to see if it is close to white noise, and the consistency between predicted pressure and measured pressure is compared. If the consistency exceeds the threshold, the current kernel is discarded and the system reverts to the previous stable version.
[0161] When integrating the transfer kernel into the joint inversion model, an additional residual of "pressure prediction-pressure observation" is constructed and assigned a weight matching the kernel confidence level. This residual couples mass change information with pressure observations in the time domain, enabling the joint inversion to simultaneously meet the static consistency of standard state projection and the dynamic consistency of online identification in the updates of density profiles, temperature profiles, and slowly varying compressibility components. To avoid overcorrection, the step size is relaxed only at high-sensitivity layers, and stricter boundary and shape constraints are imposed on the liquid surface neighborhood.
[0162] The system architecture comprises an excitation execution unit, a synchronous acquisition unit, a preprocessing and quality management unit, an online identification unit, and a constraint injection unit. The excitation execution unit is responsible for pulse delivery and amplitude limiting; the synchronous acquisition unit ensures time alignment across channels; the preprocessing and quality management unit generates missing measurement masks and weights; the online identification unit outputs the transfer kernel and its confidence interval; and the constraint injection unit transforms the transfer kernel into jointly inverted measurement factors and manages the decay of weights over time. During operation, the excitation sequence, kernel version number, coverage period, and weight changes are recorded to ensure traceability and verifiability. Through this process, closed-loop updates obtain additional information consistent with the field dynamics, maintaining stable consistency in standard-state volume, mass, and density even under extreme liquid levels or slow disturbance scenarios.
[0163] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects.
[0164] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for automatically adjusting the temperature and density of liquid in a tank metering system, characterized in that, Includes the following steps: Collect and reconstruct cross-sectional area curves, pressure profiles, liquid level heights, temperature profiles, and sound velocity profiles to form the input dataset; Based on the input dataset and the relationship between hydrostatics and acoustic bulk modulus, a joint inversion model is established to obtain density profile, temperature profile and compressibility profile. The joint inversion model includes setting measurement constraints and prior constraints in the form of a factor graph. The measurement constraints include hydrostatic relation constraints and acoustic bulk modulus relation constraints. The prior constraints include material constitutive relation constraints and smoothness constraints. The hydrostatic relation constraints satisfy the following: , in, For pressure at height, Density at height position, For height coordinates, It is the acceleration due to gravity; The acoustic bulk modulus relationship constraint satisfies: , in, Bulk modulus The speed of sound at altitude. For compressibility; Density profile, temperature profile, and compressibility profile are obtained by nonlinear least squares solution; The nonlinear standard state projection based on mass conservation maps the field temperature and pressure to the standard state, and calculates the standard state volume, mass and density. A closed-loop update is performed using a projection consistency constraint feedback joint inversion model composed of standard state volume, mass, and standard state density, outputting the updated standard state volume, standard state density, and mass.
2. The method according to claim 1, characterized in that, The acquisition and reconstruction steps include: The wall profile was reconstructed by circumferential ultrasonic tomography and the cross-sectional area was calculated to obtain the cross-sectional area curve. The hydrostatic gradient is obtained after zero-point correction and smoothing of the pressure profile. Time synchronization and spatial alignment of temperature and sound velocity profiles; The tilt angle of the inertial measurement unit is used to correct the attitude of the cross-sectional area curve and the liquid level height to form the input dataset.
3. The method according to claim 1, characterized in that, Before performing the nonlinear least squares solution, the sensitivity matrix of the joint inversion model is orthogonalized to improve the numerical conditions, and then the nonlinear least squares solution is performed.
4. The method according to claim 1, characterized in that, The compressibility profile is decomposed into slow-varying components and fast-varying components. An alternating update strategy is used to process the smooth term and the sparse term respectively. The fast-varying component is obtained through threshold update, and the slow-varying component is used to participate in the calculation of the standard state projection.
5. The method according to claim 1, characterized in that, Standard state projection includes: A monotone invertible mapping is used to transform the coordinates of the field temperature and field pressure. The monotone invertible mapping is parameterized by a monotone spline function. The mapping parameters are solved by taking mass conservation and consistency of local volume change as constraints.
6. The method according to claim 5, characterized in that, The standard state volume is calculated by performing layered integration of the volume conversion coefficients of each layer with the cross-sectional area curve, and calculating the derivative of the standard state volume with respect to the liquid level height. This derivative is then used to verify the consistency of the cross-sectional area curve to form a shape consistency constraint for correcting the standard state projection.
7. The method according to claim 1, characterized in that, During the standard state projection and closed-loop update process, sensitivity-based error propagation is performed on the mass, standard state volume, and standard state density to obtain variance estimates. Piecewise monotonic calibration based on historical residuals generates end-region confidence intervals, which are used to output confidence information and set the weights for closed-loop updates.
8. The method according to claim 1, characterized in that, The projection consistency constraint is embedded in the objective function of the joint inversion model in the form of a weighted residual term. Through incremental nonlinear least squares update, the density profile, temperature profile, and compressibility profile are kept consistent with the standard state volume, mass, and density.
9. The method according to claim 1, characterized in that, Experimental design and online system identification are implemented during the closed-loop update process to improve identifiability. Small-amplitude flow pulses or recirculation fine-tuning are used as excitations. The transfer kernel between pressure and mass is identified based on the observed response, and the transfer kernel is used as an additional measurement constraint for the joint inversion model in subsequent updates.
Citation Information
Patent Citations
Gravity satellite groundwater storage variable vertical signal separation method based on physical model
CN120524062A
Tunnel multi-field coupling nonlinear deformation analysis method and system
CN120995765A