Volume correction algorithm for displacement liquid storage tank

By obtaining the geometric parameters and tilt angle of the storage tank, the cross-sectional area and volume of the storage tank are calculated by piecewise integration, which solves the problem of inaccurate liquid level measurement when the storage tank is tilted and realizes high-precision volume correction.

CN121327283APending Publication Date: 2026-01-13QINGDAO AOPTEK AUTOMATION CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511525168.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-24
Publication Date
2026-01-13

AI Technical Summary

Technical Problem

Existing technology makes it difficult to accurately measure the liquid volume when the storage tank is tilted, thus failing to achieve precise management.

Method used

By obtaining the geometric parameters, tilt angle, and liquid level of the storage tank, the cross-sectional area and volume of the storage tank are calculated. The liquid level is corrected using a piecewise integration method, and the total liquid volume is calculated by combining the correction coefficient.

Benefits of technology

In most cases, the calculation error is controlled within 3%, the model has high accuracy, can accurately predict the volume of the storage tank, and provides a reliable volume calculation tool.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121327283A_ABST
    Figure CN121327283A_ABST
Patent Text Reader

Abstract

The invention discloses a volume correction algorithm for a displacement liquid storage tank, the liquid storage tank comprises a front seal head, a straight tube section, a transition bin and a rear seal head, and the algorithm comprises the following steps: acquiring parameters required for calculating the volume: geometric parameters of the liquid storage tank, a transverse inclination angle and a longitudinal inclination angle of the liquid storage tank, and corrected liquid level height values at different positions; the width and the height of the cross section of the liquid storage tank are adjustable; and calculating the liquid storage volume of the liquid storage tank: calculating the liquid storage volumes of the front end socket, the straight tube section, the transition bin and the rear end socket according to the corrected liquid level height value, and adding the liquid storage volumes of the front end socket, the straight tube section, the transition bin and the rear end socket to obtain the total liquid volume of the first bin. And a calculation result is compared with actual tank capacity table data. The maximum error between the predicted volume and the actual value under different liquid level heights is controlled to be about 3%, and the problem that the volume is not accurately calculated when the tank truck inclines transversely or longitudinally is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of metering technology, and in particular to a volume correction algorithm for displacement storage tanks. Background Technology

[0002] A liquid storage tank, also known simply as a liquid tank or storage tank, is a large container with a relatively regular shape used to store oil products.

[0003] A liquid level gauge is an automated instrument used to monitor the level, temperature, and other parameters of liquids (such as fuel oil, chemical raw materials, lubricants, etc.) in a liquid tank in real time. Based on the tank capacity table, it can calculate key parameters such as liquid volume and mass. It is widely used in gas stations, oil depots, chemical plants, and logistics transportation, and its core value lies in achieving visualization, precision, and safety in liquid tank management. The principle of a liquid level gauge is to detect the liquid height; the volume is determined by referring to the tank capacity table, which contains data actually measured after the tank leaves the factory or is installed. After measuring the height, the liquid level gauge converts the measured height into a volume value using a preset tank capacity table.

[0004] In actual production, it is necessary to monitor the volume of liquid in the storage tank in real time. A tank volume gauge is used to measure the liquid volume when the tank is horizontal, but in practical applications, the data from the tank volume gauge becomes inaccurate due to the tank's tilt. Based on this, this application proposes a volume correction algorithm for displaced storage tanks. Summary of the Invention

[0005] According to one aspect of this disclosure, a volume correction algorithm is provided for a displacement storage tank, the storage tank comprising a front end cap, a straight section, a transition chamber, and a rear end cap, the algorithm comprising: Obtain the parameters needed to calculate the volume, including: the geometric parameters of the storage tank, the lateral and longitudinal tilt angles of the storage tank, the corrected liquid level height values ​​at different locations, the width of the storage tank cross-section, and the height of the storage tank cross-section. Calculating the liquid storage volume of the storage tank based on the parameters includes: The expression for calculating the total cross-sectional area of ​​the straight section; the cross-sectional area of ​​the straight section at different liquid levels is calculated segment by segment. The liquid storage volume of the straight section is calculated based on the total cross-sectional area of ​​the straight section and the cross-sectional area of ​​the straight section at different liquid level heights. Calculate the cross-sectional area and storage volume of the liquid in the transition chamber; Calculate the liquid storage volume of the front and rear end caps; The volume is obtained by adding the liquid storage volumes of the front end cap, straight section, transition chamber, and rear end cap.

[0006] According to another aspect of this disclosure, a volume correction algorithm for a displacement storage tank is provided. The storage tank includes a first compartment and a second compartment. The first compartment includes a front end cap, a transition compartment, and a straight section. The second compartment includes a straight section and a rear end cap. The straight sections of the first compartment and the second compartment are adjacent to each other. The algorithm includes: Obtain the parameters required for calculating the volume, including: the geometric parameters of the storage tank, the lateral and longitudinal tilt angles of the storage tank, the corrected liquid level height values ​​at different locations in the first and second compartments, the width of the cross-sections of the first and second compartments, and the height of the cross-sections of the first and second compartments. The liquid volume of the first chamber is calculated based on the parameters, including: The expression for calculating the total cross-sectional area of ​​the straight section of the first chamber is given, and the cross-sectional area of ​​the straight section of the first chamber at different liquid levels is calculated segment by segment. The liquid storage volume of the straight section of the first chamber is calculated based on the total cross-sectional area of ​​the straight section of the first chamber and the cross-sectional area of ​​the straight section of the first chamber at different liquid level heights. Calculate the cross-sectional area and storage volume of the liquid in the transition chamber; Calculate the liquid storage volume of the front end cap; Calculating the liquid storage volume of the straight section of the second chamber includes: determining the formula for calculating the cross-sectional area of ​​the straight section of the second chamber at different liquid levels; determining the formula for calculating the cross-sectional area of ​​the straight section based on the current liquid level; and calculating the liquid storage volume of the straight section based on the determined cross-sectional area formula. Calculate the liquid storage volume of the rear end cap; The total liquid volume of the two chambers is obtained by adding the liquid storage volumes of the straight section, transition chamber, and front end cap of the first chamber to the liquid storage volumes of the straight section and rear end cap of the second chamber. The actual liquid storage volume is obtained by multiplying the total liquid volume of the two chambers by a correction factor, which is obtained based on experience.

[0007] In one possible implementation, the storage tank further includes at least one third compartment, the third compartment comprising a straight cylindrical section, the third compartment being adjacent to the first and second compartments; the algorithm further includes: The parameters required to calculate the volume also include: the geometric parameters of the third compartment of the storage tank, the lateral and longitudinal tilt angles of the storage tank, the corrected liquid level height values ​​at different locations in the third compartment, the width of the cross-section of the third compartment, and the height of the cross-section of the third compartment. Calculating the liquid storage volume of the straight section of the third compartment includes: determining the formula for calculating the cross-sectional area of ​​the straight section of the third compartment at different liquid levels; determining the formula for calculating the cross-sectional area of ​​the straight section based on the current liquid level; and calculating the liquid storage volume of the straight section based on the determined cross-sectional area formula. The total liquid volume of the three chambers is obtained by adding the liquid storage volumes of the straight section, transition chamber, and front end cap of the first chamber, the straight section and rear end cap of the second chamber, and the straight section of the third chamber.

[0008] In one possible implementation, correcting the liquid level in the first, second, or third compartment includes: Considering the longitudinal and lateral displacements of the storage tank, and denoted by h(l) at any lateral position l of the cross-section, the liquid level height h(l) used to calculate the cross-sectional area at any lateral position l can be expressed as: h(l)= hc cosβ— (l — dc)tanα— H The liquid level probe measures the vertical liquid level height at the reference position x = dc, which is hc. The tank body is tilted laterally at an angle of β and longitudinally at an angle of α, and the vertical distance from the center of the tank to the bottom is half H.

[0009] In one possible implementation, for the case consisting of only one straight section or the straight section of the first compartment, the cross-sectional area is calculated as follows: The expression for calculating the total cross-sectional area of ​​the straight section, and the calculation of the cross-sectional area of ​​the straight section at different liquid levels, including: A cross-sectional coordinate system is established with the center of the cross-section as the origin, the positive Y-axis perpendicular to the bottom of the tank upwards, and the positive X-axis parallel to the bottom of the tank to the right. The liquid tank is designed with an eight-segment circular arc cross-section. Due to symmetry, only the three segments in the second quadrant are considered here. The cross-section in the second quadrant consists of three tangent circular arc segments with radii R1, R2, and R3, namely the upper great arc: radius R1, center A (R... 1x , R 1y Left middle arc: radius R2, center B(R) 2x , R 2y There is also a small arc that smoothly connects R1 and R2: radius R3, center C (R 3x , R 3y ); P and Q are the points of tangency between the small arc and the middle arc, and the upper part of the large arc of the small arc, respectively. The coordinates C(R1, R2, R3) of the center of the small arc are calculated using the software program. 3x , R 3y ), and the coordinates of the tangent points P and Q, the equations of the three circles in the second quadrant, and the coordinates of the centers of the three circles; Determine the cross-sectional area of ​​the liquid in the low liquid level zone, where the liquid level height y is between 0 and P. Y When the straight section cross-section is between these points, the calculated area is denoted as S1: ; Where P Y R is the ordinate of the intersection point P. 2X It is the x-coordinate of the center of circle R2; Determine the cross-sectional area of ​​the liquid in the middle liquid level zone, where the liquid level height y is between P. y To Q y When the straight section cross-section is between these points, the calculated area is denoted as S2: ; Where Qy is the ordinate of point Q, and R3x and R3y are the x and y coordinates of the center of circle R3, respectively; Determine the cross-sectional area of ​​the liquid in the high liquid level region. When the liquid level height y is between Qy and H, calculate the area of ​​the cross-section of the straight cylinder section. The result is denoted as S3. ; Where H refers to the theoretical maximum value of the liquid level in the current coordinate system, and R... 1y It is the ordinate of circle R1; The expression for the total cross-sectional area of ​​the straight section is: S = 4 × (S1 + S2 + S3).

[0010] In one possible implementation, calculating the cross-sectional area of ​​the straight section or the first chamber straight section at different liquid level heights in claim 1 segmentally includes: The cross-sectional area of ​​the straight section at a given liquid level height h(l) is calculated in six cases: l represents the current x-axis coordinate value, l∈[[0, L]), and a rectangular coordinate system is established with the direction of the bottom axis of the tank as the positive x-axis and the center of the cross-section at the leftmost end of the tank as the origin. The local liquid level height h(l) is the vertical coordinate value at any position l. In the first case, when the current h(l) is greater than the highest value H of the liquid surface in the current coordinate system, h(l) = H, and the cross-sectional area f(h(l)) of the liquid surface at the current height is equal to the total cross-sectional area S. In the second case, when the current Qy ≤ h(l) < H, the cross-sectional area of ​​the liquid surface at the current height in the second quadrant is the area of ​​S1 + S2 plus the integral value of circle R1 from Qy to h(l) in the second quadrant. The total area can be obtained by using symmetry, as shown in the following formula: ; In the third case, when the current py ≤ h(l) < Qy, the cross-sectional area of ​​the liquid surface at the current height in the second quadrant is the area of ​​S1 plus the integral value of circle R3 from py to h(l) in the second quadrant. The total area can be obtained by using symmetry, as shown in the following formula: ; In the fourth case, when 0 ≤ h(l) < py, the cross-sectional area of ​​the current liquid level in the second quadrant is the integral of circle R2 from 0 to h(l) over the second quadrant. The total area can be obtained through symmetry, as shown in the following formula: ; In the fifth case, when —H ≤ h(l) < 0, due to symmetry, we know that: ; The sixth case is when h(l) <- H: f(h(l)) = 0; h(l) is the effective liquid level height obtained after correction at any position l in the liquid tank.

[0011] In one possible implementation, the liquid storage volume of the straight section is calculated based on the total cross-sectional area of ​​the straight section and the cross-sectional area of ​​the straight section at different liquid level heights, including: Integrate the changing cross-sectional area f(h(l)) along the length L of the straight cylinder section to obtain the geometric volume of the straight cylinder section: .

[0012] In one possible implementation, the cross-sectional area and storage volume of the liquid in the transition chamber are calculated, including: In claim 1, the length of the straight section or the length of the straight section of the first compartment is L1, and the length of the transition compartment is m; The formula for calculating the similarity ratio k of the cross-sectional shapes at both ends of the transition chamber is as follows: ; The following are similarities in the cross-sectional areas of the liquid transition chamber at the middle and end points: ; Where f(h(L1)) is the cross-sectional area S1 of the starting section of the transition chamber, that is, the cross-sectional area of ​​the liquid at the beginning of the transition chamber, and S(h(L1+m)) is the cross-sectional area S2 of the ending section of the transition chamber. Intermediate cross-sectional area S0: ; The excessive storage volume is calculated as follows: .

[0013] In one possible implementation, the liquid storage volume of the front or rear end cap is calculated: ; D is the inner diameter of the elliptical head, which is replaced by the width of the tank cross-section in applications. The liquid level height is h.

[0014] In one possible implementation, Determine the formula for calculating the cross-sectional area of ​​the straight section of the second or third compartment at different liquid levels, including: With the center of the cross section as the origin, the positive Y-axis is perpendicular to the bottom of the tank and upward, and the positive X-axis is parallel to the bottom of the tank and to the right. The liquid tank is designed with an eight-segment circular arc tank cross section. Due to the left and right symmetry, the situation of five segments of circular arc in the second and third quadrants is considered. According to radius R ,1 R ,2 R ,3 R ,4 and R ,5 And the software program calculates the circle R ,1 , circle R ,3 , circle R ,5 The equation of R in the coordinate system ,2 and R ,4 The coordinates of the center of the circle, R ,2 With circle R ,1 The coordinates of the tangent point T, R ,2 With circle R ,3 The coordinates of the tangent point U, R ,4 With circle R ,3 The coordinates of the point of tangency W, R ,4 With circle R ,5 The coordinates of the tangent point M are used to obtain the equations of the five circular arcs. ; The first segment S'1 has an integration interval of [y]. t , H], where y t It is the ordinate of the boundary point T, and H is the theoretical maximum value of the liquid surface in the current coordinate system; ; The second segment s'2 has an integration interval of [yu, yt], where yu is the ordinate of the boundary point U and yt is the ordinate of the boundary point T. ; The third segment s'3 has an integration interval of [0, yu], where yu is the ordinate of the intersection point U, and 0 is the lower limit of integration. This area refers to the area of ​​the figure enclosed by the cross section of Cang 2 between the x-axis, y = yu, and the y-axis. ; The fourth segment s'4 has an integration interval of [yw, 0], where yw is the ordinate of the intersection point W, and 0 is the upper limit of integration. This area refers to the area of ​​the figure enclosed by the cross section of Cang 2 between the x-axis, y = yw, and the y-axis. ; The fifth segment s'5 has an integration interval of [ym, yw], where ym is the ordinate of the intersection point M and yw is the ordinate of the intersection point W. This area refers to the area of ​​the figure enclosed by the cross section of Cang 2 between the y-axis, y = ym, and y = yw. ; The sixth segment s'6 has an integration interval of [—H, ym], where —H is the theoretical minimum value of the liquid surface in the current coordinate system, ym is the ordinate of the intersection point M, and this area refers to the area of ​​the figure enclosed by the cross section of tank 2 between the y-axis and y = ym. The final formula for calculating the cross-sectional area under different liquid level heights is as follows: ; The general form of the integrand is: ; The range of i is 1-5, representing different arc segments. 1-5 represents circles R,1 to R,5.

[0015] In one possible implementation, the liquid storage volume of the straight section of the second or third compartment is calculated according to a predetermined cross-sectional area formula, including: The volume of the straight cylindrical section is obtained by integrating the cross-sectional area over the length L2: ; Where h'(l) is the effective liquid level height obtained after correction at any position l in the liquid tank.

[0016] Compared with the prior art, the beneficial effects of the present invention are: The volume calculation models for tanks 1 and 2 were analyzed and verified, and the calculation results were compared with actual tank capacity data. The maximum error between the predicted and actual volumes of the calculation models for tanks 1 and 2 at different liquid level heights was controlled at around 3%. This indicates that the models can approximate the actual volumes well in most cases, and the predicted values ​​are highly consistent with the actual values ​​at most liquid level heights, demonstrating the high accuracy and reliability of the models. Overall, this calculation scheme can effectively handle the volume calculation problem of tank trucks, providing a reliable tool for practical applications.

[0017] The volume correction algorithm in this application is applied to vehicle-mounted level gauges, which are intelligent devices specifically designed for automatic metering and real-time monitoring of oil products. It cleverly integrates intelligent hardware sensors, a high-performance microcontroller, and a cloud-based intelligent monitoring platform, forming a flawless, comprehensive monitoring ecosystem. The system uses advanced algorithms to deeply mine and analyze the collected information, achieving seamless monitoring of the loading and unloading process, dynamic tracking of liquid levels, instant feedback on valve status, and precise vehicle location, providing strong data support for customers' operational decisions. Attached Figure Description

[0018] Figure 1 A schematic diagram of compartment 1 and compartment 2 of the liquid tank of this disclosure is shown.

[0019] Figure 2 A schematic diagram of the cross-sectional shape (eight circular arcs) of the liquid tank disclosed herein is shown.

[0020] Figure 3 The diagram shows the cross-sectional areas S1-S3 of different sections of the disclosed warehouse 1 (the dashed lines represent a rectangular coordinate system, the dark blue lines represent large arcs, the red lines represent medium arcs, and the light blue lines represent small arcs (transition arcs)).

[0021] Figure 4 The diagram shows the arc segments and centers of the disclosed compartment 1 (the dashed lines represent a rectangular coordinate system, the dark blue lines represent large arcs, the red lines represent small arcs, the light blue lines represent small arcs (transition arcs), the center of the large arc is A, the center of the medium arc is B, the center of the small arc is C, and the tangent points are P and Q).

[0022] Figure 5 The diagram shows the cross-sectional areas S1-S6 of different sections of the liquid tank 2 of this disclosure (blue represents the top large circle, green represents the middle large circle, red represents the bottom large circle, purple represents the top transition circle, and yellow represents the bottom transition circle).

[0023] Figure 6 A schematic diagram of the longitudinal displacement of the liquid storage tank of this disclosure is shown.

[0024] Figure 7 A schematic diagram of the lateral displacement of the liquid storage tank of this disclosure is shown. (a represents the front cross-section without deflection or tilt, and b represents the front cross-section after lateral deflection or tilt).

[0025] Figure 8 This diagram shows the calculation results of this open warehouse 1 (comparison of actual values ​​and predicted values).

[0026] Figure 9 This diagram shows the calculation results of this open warehouse 2 (comparison of actual and predicted values). Detailed Implementation

[0027] Various exemplary embodiments, features, and aspects of this disclosure will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.

[0028] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.

[0029] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.

[0030] This paper verifies the calculation model of the "volume correction for displacement storage tanks" scheme through a specific case analysis. Based on the method described above, relevant data for tank 1 (first tank) and tank 2 (second tank) are calculated, the calculation results are presented, and the correction effect is analyzed. The following section first lists the parameter table used in the case study, followed by a detailed explanation of the calculation process.

[0031] Table 1. Explanation of Global Variable Symbols ; Table 2 Variable Descriptions ; Table 3 Data table for Warehouse 1 ; Table 4. Explanation of Local Variables ; Straight section cross-section: The cross-section of silo 1 is composed of 3 types of circular arcs ((R1, R2, R3)). Utilizing symmetry, only the area of ​​the three circular arcs in the second quadrant is calculated, and then multiplied by 2 to obtain the total area.

[0032] Coordinates of the center and tangent points of the transition circle: Based on the formula relationship between the center of the transition circle and the two tangent points P and Q, the solution obtained using software programming is as follows: R3 center C (-631.1855, 110.7369); tangent point P: (-1223.6301, 205.6542); tangent point Q: (-883.6596, 655.0317).

[0033] The results of solving the equations of the circles in the second quadrant: R1: x 2 + (y + 1250)2 = 21002 R2: (x — 60)2 + y 2 = 13002 R3: (x + 631. 185)2 + (y — 110.737)2 = 6002 Piecewise integral functions represent the cross-sectional area results for different intervals: First segment S1 (low liquid level zone): ; Where PY = 205.6542 is the ordinate of P, and R2X = 60 is the abscissa of the center of circle R2.

[0034] This part calculates the cross-sectional area of ​​tanker compartment 1 when the liquid level height y is between 0 and PY. The calculation result is S1 = 253891.873mm2.

[0035] Second segment S2 (middle liquid level zone): ; Where QY = 655.0317 is the ordinate of point Q, and R3X = -631.1855 and R3Y = 110.7369 are the x and y coordinates of the center of circle R3, respectively.

[0036] Part of the calculation involves the cross-sectional area of ​​tanker compartment 1 when the liquid level height y is between Py and Qy. The calculation result is S2 = 500205.2505 mm. 2 .

[0037] The third segment, S3 (high liquid level zone): ; Where H = 850mm refers to the theoretical maximum value of the liquid surface in the current coordinate system, and R1y = -1250 is the ordinate of circle R1.

[0038] The calculated result is S3 = 115968.3012 mm2.

[0039] The total cross-sectional area of ​​the final cylindrical section 1 is expressed as follows: S = 4 × (S1 + S2 + S3) The calculated result is 3480261.699 mm2.

[0040] In summary, the cross-sectional areas S1, S2, and S3 of the different liquid level intervals from low to high in the second quadrant are: S1 = 253891.873mm2 S2 = 500205.2505 mm2 S3 = 115968.3012 mm2 The final solution for the total cross-sectional area of ​​the straight section of compartment 1 is as follows: S = 4 × (S1 + S2 + S3) = 3480261. 699 mm2 The cross-section f(h(l)) at different liquid levels is a piecewise function: Where h(l) is the effective liquid level height in the coordinate system, which has been corrected for offset, and S is the total cross-sectional area. When h(l) ≥ 850, the liquid surface fills the entire cross-section, and the area is the total area S. Other intervals are calculated using a fixed area and integral term, with integration limits and parameters based on the coordinates of the tangent point and the center of the circle. Negative liquid level heights are handled using symmetry.

[0041] ; Then, the changing cross-sectional area f(h(l)) of the liquid surface is integrated along the length L1 of the straight cylindrical section of tank 1 to obtain the geometric volume of the straight cylindrical section of tank 1, as shown in the following formula: ; The volume of the transition chamber was calculated using Simpson's formula: 1. Geometric similarity ratio a) Similarity ratio Where f(h(L1)) is the cross-sectional area S1 of the starting section of the transition chamber, and S(h(L1+m)) is the cross-sectional area S2 of the ending section of the transition chamber.

[0042] b) Intermediate cross-sectional area: ; 2. Simpson's Formula: ; Volume of the front end cap of compartment 1: The head volume is based on the formula for elliptical heads: ; Where h is the actual liquid level inside the tank head, this function describes how the volume of liquid inside the head changes with the liquid level.

[0043] The volume of the final compartment 1 is: , ;

[0044] ; Table 6. Explanation of Local Variables ; Similar to the straight section of Warehouse 1, the straight section of Warehouse 2 has a cross-section with radius R1 in the second and third quadrants. 、 R,2 、 R,3 、 R,4 、 The five tangent circular arcs of radius R, 5 are composed of the following: First, calculate the position equations of the circles containing the three known circular arcs in the second and third quadrants: R,1: x2 + (y + 1615)2 = 6,250,000 R,3: (x — 775)2 + y 2 = 4,000,000 R,5: x2 + (y — 1615)2 = 6,250,000 Next, calculate the coordinates of the two center points and the four tangent points: R ,2 Calculation results: Center of the circle: (-612.9327, 183.4197), point of tangency with the first great circle: T (-806.4904, 751.3417); point of tangency with the second great circle: U (-1207.7610, 262.0282).

[0045] R ,4 Calculation results: Center of the circle: (-790.4846, -330.5421), point of tangency with the first great circle: W(-1181.8557, -413.1777), point of tangency with the second great circle: M(-941.0530, -701.1216).

[0046] We can obtain the position equations of the circles containing the five arcs in the second and third quadrants: R,1: x2 + (y + 1615)2 = 6,250,000 R,2: (x + 612.933)2 + (y — 183.420)2 = 360,000 R,3: (x — 775)2 + y 2 = 4,000,000 R,4: (x + 790.485)2 + (y + 330.547)2 = 160,000 R,5: x2 + (y — 1615)2 = 6,250,000 Then, in descending order of liquid level, calculate the fixed cross-sectional areas S and i corresponding to each liquid level height range, in mm²: S,1 = 72255.746 S,2 = 531480.155 S,3 = 319481.208 S,4 = 500266.824 S,5 = 317485.532 S,6 = 116235.305 Where S,3 and S,4 are the fixed cross-sectional areas of the left-side great circular arc of the middle section within the corresponding intervals above and below the X-axis, thus there are a total of 6 fixed cross-sectional areas. Considering symmetry, the total cross-sectional area of ​​the straight section of chamber 2 is calculated as follows: Stotal = 2(S,1 + S,2 + S,3 + S,4 + S,5 + S,6) = 3714329.54 mm2 Cross-sectional area calculation at different liquid levels: The cross-sectional area S(h) is calculated as a piecewise function containing five different intervals, each interval corresponding to a different arc segment of the tank's cross-section. The formula includes a fixed area term (e.g., S,1, S,2, S,3, S,4, S,5, S,6) and the integral term, which is used to calculate the area contributed by the arc as the liquid level changes.

[0047] 1. When 751.341 < h ≤ 885: ; ; When the liquid level is within this range, the cross-sectional area includes all the lower fixed area terms, as well as the additional area generated by the liquid in the uppermost arc segment within the range [751.341,h].

[0048] 2. When 262.028 < h ≤ 751.341: ; in Corresponding to the upper left transition arc segment, since the liquid level is already below the highest threshold of the transition arc segment, the fixed area term S,2 is no longer included.

[0049] 3. When -413.178 ≤ h ≤ 262.028: ; in The left great circle segment within this height range is defined. Only S6 and S5 contribute as fixed area terms, and the integral covers the left great circle segment of this interval.

[0050] 4. When -701.122 ≤ h ≤ -413.178: ; in The lower left transition arc segment is defined. Only S,6 is retained as a fixed area term, and the area from the bottom arc segment is calculated by integration.

[0051] 5. When -885 ≤ h ≤ -701.122: ; in This is the parameter for the lowest arc segment. Since the liquid level is in the lowest arc segment, this range does not contain any fixed area terms.

[0052] In addition, considering the special cases of h > 885 and h < 0, and summarizing the different liquid level heights above, we obtain the final formula by substituting the area data: ;

[0053] 1. The volume of the straight cylindrical section is equal to the result of integrating the cross-sectional area function along the axial direction: ; 2. Rear head volume: ; Where h' is the actual liquid level height inside the rear head of tank 2, and D' is the width of tank 2, this function describes how the volume of liquid inside the rear head changes with the liquid level height.

[0054] Total volume: The total volume of liquid in compartment 2 is equal to the sum of the volumes of liquid in the straight section and the rear end cap.

[0055] ; Displacement calculation: Longitudinal displacement: When the tank is tilted, the liquid level remains horizontal, while the bottom of the tank is inclined. Therefore, the vertical distance from the liquid level to the bottom of the tank (i.e., the local liquid level height) varies along the lateral axis of the tank. This means that the liquid area along the cross-section of the tank is no longer a constant, but a linear function of the lateral position. Calculating the total volume requires integrating these varying cross-sectional areas along the length of the tank.

[0056] Define the horizontal coordinate x and the local liquid level height h(l), (where l represents the current x-axis coordinate value, l ∈ [0, L]). Establish a rectangular coordinate system with the direction of the tank bottom axis as the positive x-axis and the center of the leftmost section of the tank as the origin. The local liquid level height h(l) is the vertical coordinate value at any position l. hc is the vertical height from the horizontal liquid surface to the bottom of the tank at the liquid level probe position x = dc. Referring to the height hc at dc, a linear function of the liquid level height h(l) at any point and the probe measurement value hc can be obtained: h(l) = hc —(l — dc )tanα— H Where H is half the vertical distance from the center of the tank to the bottom of the tank, which is the theoretical maximum value of the liquid level height in the current coordinate system. This offset is used to adjust the reference zero point of the entire height parameter. In this way, the effective liquid level height parameter h(l) at different positions l along the tank axis in the displacement storage tank is obtained.

[0057] Lateral displacement + longitudinal displacement: Unlike longitudinal displacement, lateral tilt primarily affects the shape of the liquid on the cross-section of the tank. Because the lateral tilt is uniform, the lateral change in liquid shape and area is the same on every cross-section of the tank along its axis.

[0058] Considering lateral displacement, the liquid level height measured by the level probe at the reference position dc, perpendicular to the bottom of the tank, is: Because the tank is tilted laterally (at an angle of β), the liquid surface remains horizontal. Therefore, the measured hc is not perpendicular to the liquid surface and cannot be considered an effective height. To correct this discrepancy, considering that the tank's cross-section is symmetrical and the β angle is small, hc is projected onto a vertical line to obtain ho, which is then used as the effective height parameter for calculating the cross-sectional liquid area. ho = hc cosβ Considering longitudinal displacement, let the liquid level height at any cross-section l be h(l). Then, at any lateral position l, the liquid level height h(l) used to calculate the cross-sectional area can be expressed as: h(l) = hc cosβ- (l - dc)tanα- H Here, h(l) is the effective height parameter of the liquid area of ​​the cross section at position l, taking into account the lateral and longitudinal tilt. It is calculated from ho Cosβ (height change caused by lateral displacement), —(l — dc )tanα (height change caused by longitudinal displacement) and H (offset caused by the establishment of the cross section center).

[0059] Where hc is the liquid level height measured by the level probe, α and β are the longitudinal and lateral deflection angles (acquired by the sensor's tilt angle signal), and dc is the position of the level probe, i.e., the distance from the level probe to the left end of the tank. Substitute the data... For warehouse 1, there are: h(l) = hccosβ-(l-5100)tanα-850 = hc-850 For warehouse 2, there are: h′(l)=h′ccosβ-(l′-1210)tanα-885 = h′c-885 The total volume of the liquid tank is the sum of the volumes of compartment 1 and compartment 2: Vtotal = V1 + V2 This formula is used to calculate the total liquid volume Vtotal of a dual-compartment tank truck. The volume of this variable cross-section body consists of two main parts: compartment 1 (straight section, transition section, and end cap) and compartment 2 (straight section and end cap).

[0060] The volume calculation models for tanks 1 and 2 were analyzed and verified, and the calculation results were compared with actual tank capacity data. The maximum error between the predicted and actual volumes of the calculation models for tanks 1 and 2 at different liquid levels was controlled at around 3%. This indicates that the models can approximate the actual volumes well in most cases, and the predicted values ​​are highly consistent with the actual values ​​at the vast majority of liquid levels, demonstrating the high accuracy and reliability of the models. Overall, this calculation scheme can effectively handle the volume calculation problem of tank trucks, providing a reliable tool for practical applications.

[0061] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A volume correction algorithm for displacement storage tanks, characterized in that, The liquid storage tank includes a front end cap, a straight section, a transition chamber, and a rear end cap. The algorithm includes: Obtain the parameters needed to calculate the volume, including: the geometric parameters of the storage tank, the lateral and longitudinal tilt angles of the storage tank, the corrected liquid level height values ​​at different locations, the width of the storage tank cross-section, and the height of the storage tank cross-section. Calculating the liquid storage volume of the storage tank based on the parameters includes: The expression for calculating the total cross-sectional area of ​​the straight section; the cross-sectional area of ​​the straight section at different liquid levels is calculated segment by segment. The liquid storage volume of the straight section is calculated based on the total cross-sectional area of ​​the straight section and the cross-sectional area of ​​the straight section at different liquid level heights. Calculate the cross-sectional area and storage volume of the liquid in the transition chamber; Calculate the liquid storage volume of the front and rear end caps; The volume is obtained by adding the liquid storage volumes of the front end cap, straight section, transition chamber, and rear end cap.

2. A volume correction algorithm for displacement storage tanks, characterized in that, The storage tank includes a first compartment and a second compartment. The first compartment includes a front end cap, a transition compartment, and a straight section. The second compartment includes a straight section and a rear end cap. The straight sections of the first compartment and the second compartment are adjacent to each other. The algorithm includes: Obtain the parameters required for calculating the volume, including: the geometric parameters of the storage tank, the lateral and longitudinal tilt angles of the storage tank, the corrected liquid level height values ​​at different locations in the first and second compartments, the width of the cross-sections of the first and second compartments, and the height of the cross-sections of the first and second compartments. The liquid volume of the first chamber is calculated based on the parameters, including: The expression for calculating the total cross-sectional area of ​​the straight section of the first chamber is given, and the cross-sectional area of ​​the straight section of the first chamber at different liquid levels is calculated segment by segment. The liquid storage volume of the straight section of the first chamber is calculated based on the total cross-sectional area of ​​the straight section of the first chamber and the cross-sectional area of ​​the straight section of the first chamber at different liquid level heights. Calculate the cross-sectional area and storage volume of the liquid in the transition chamber; Calculate the liquid storage volume of the front end cap; Calculating the liquid storage volume of the straight section of the second chamber includes: determining the formula for calculating the cross-sectional area of ​​the straight section of the second chamber at different liquid levels; determining the formula for calculating the cross-sectional area of ​​the straight section based on the current liquid level; and calculating the liquid storage volume of the straight section based on the determined cross-sectional area formula. Calculate the liquid storage volume of the rear end cap; The total liquid volume of the two chambers is obtained by adding the liquid storage volumes of the straight section, transition chamber, and front end cap of the first chamber to the liquid storage volumes of the straight section and rear end cap of the second chamber. The actual liquid storage volume is obtained by multiplying the total liquid volume of the two chambers by a correction factor, which is obtained based on experience.

3. The volume correction algorithm for a displacement storage tank according to claim 2, characterized in that, The storage tank also includes at least one third compartment, which comprises a straight cylindrical section and is adjacent to the first and second compartments; the algorithm further includes: The parameters required to calculate the volume also include: the geometric parameters of the third compartment of the storage tank, the lateral and longitudinal tilt angles of the storage tank, the corrected liquid level height values ​​at different locations in the third compartment, the width of the cross-section of the third compartment, and the height of the cross-section of the third compartment. Calculating the liquid storage volume of the straight section of the third compartment includes: determining the formula for calculating the cross-sectional area of ​​the straight section of the third compartment at different liquid levels; determining the formula for calculating the cross-sectional area of ​​the straight section based on the current liquid level; and calculating the liquid storage volume of the straight section based on the determined cross-sectional area formula. The total liquid volume of the three chambers is obtained by adding the liquid storage volumes of the straight section, transition chamber, and front end cap of the first chamber, the straight section and rear end cap of the second chamber, and the straight section of the third chamber.

4. A volume correction algorithm for a displacement storage tank according to any one of claims 1-3, characterized in that, Correcting the liquid level in the first, second, or third compartment includes: Considering the longitudinal and lateral displacements of the storage tank, and denoted by h(l) at any lateral position l of the cross-section, the liquid level height h(l) used to calculate the cross-sectional area at any lateral position l can be expressed as: h(l)= hc cosβ— (l — dc)tanα— H The liquid level probe measures the vertical liquid level height at the reference position x = dc, which is hc. The tank body is tilted laterally at an angle of β and longitudinally at an angle of α, and the vertical distance from the center of the tank to the bottom is half H.

5. A volume correction algorithm for a displacement storage tank according to claim 1 or 2, characterized in that, For the straight section or the straight section of the first compartment in claim 1, the cross-sectional area is calculated as follows: The expression for calculating the total cross-sectional area of ​​the straight section, and the calculation of the cross-sectional area of ​​the straight section at different liquid levels, including: A cross-sectional coordinate system is established with the center of the cross-section as the origin, the positive Y-axis perpendicular to the bottom of the tank upwards, and the positive X-axis parallel to the bottom of the tank to the right. The liquid tank is designed with an eight-segment circular arc cross-section. Due to symmetry, only the three segments in the second quadrant are considered here. The cross-section in the second quadrant consists of three tangent circular arc segments with radii R1, R2, and R3, namely the upper great arc: radius R1, center A (R... 1x , R 1y Left middle arc: radius R2, center B(R) 2x , R 2y There is also a small arc that smoothly connects R1 and R2: radius R3, center C (R 3x , R 3y ); P and Q are the points of tangency between the small arc and the middle arc, and the upper part of the large arc of the small arc, respectively. The coordinates C(R1, R2, R3) of the center of the small arc are calculated using the software program. 3x , R 3y ), and the coordinates of the tangent points P and Q, the equations of the three circles in the second quadrant, and the coordinates of the centers of the three circles; Determine the cross-sectional area of ​​the liquid in the low liquid level zone, where the liquid level height y is between 0 and P. Y When the straight section cross-section is between these points, the calculated area is denoted as S1: ; Where P Y R is the ordinate of the intersection point P. 2X It is the x-coordinate of the center of circle R2; Determine the cross-sectional area of ​​the liquid in the middle liquid level zone, where the liquid level height y is between P. y To Q y When the straight section cross-section is between these points, the calculated area is denoted as S2: ; Where Qy is the ordinate of point Q, and R3x and R3y are the x and y coordinates of the center of circle R3, respectively; Determine the cross-sectional area of ​​the liquid in the high liquid level region. When the liquid level height y is between Qy and H, calculate the area of ​​the cross-section of the straight cylinder section. The result is denoted as S3. ; Where H refers to the theoretical maximum value of the liquid level in the current coordinate system, and R... 1y It is the ordinate of circle R1; The expression for the total cross-sectional area of ​​the straight section is: S = 4 × (S1 + S2 + S3).

6. The volume correction algorithm for a displacement storage tank according to claim 5, characterized in that, Calculating the cross-sectional area of ​​the straight section or the first chamber straight section at different liquid level heights in claim 1 in segments includes: The cross-sectional area of ​​the straight section at a given liquid level height h(l) is calculated in six cases: l represents the current x-axis coordinate value, l∈[[0, L]), and a rectangular coordinate system is established with the direction of the bottom axis of the tank as the positive x-axis and the center of the cross-section at the leftmost end of the tank as the origin. The local liquid level height h(l) is the vertical coordinate value at any position l. In the first case, when the current h(l) is greater than the highest value H of the liquid surface in the current coordinate system, h(l) = H, and the cross-sectional area f(h(l)) of the liquid surface at the current height is equal to the total cross-sectional area S. In the second case, when the current Qy ≤ h(l) < H, the cross-sectional area of ​​the liquid surface at the current height in the second quadrant is the area of ​​S1 + S2 plus the integral value of circle R1 from Qy to h(l) in the second quadrant. The total area can be obtained by using symmetry, as shown in the following formula: ; In the third case, when the current py ≤ h(l) < Qy, the cross-sectional area of ​​the liquid surface at the current height in the second quadrant is the area of ​​S1 plus the integral value of circle R3 from py to h(l) in the second quadrant. The total area can be obtained by using symmetry, as shown in the following formula: ; In the fourth case, when 0 ≤ h(l) < py, the cross-sectional area of ​​the current liquid level in the second quadrant is the integral of circle R2 from 0 to h(l) over the second quadrant. The total area can be obtained through symmetry, as shown in the following formula: ; In the fifth case, when —H ≤ h(l) < 0, due to symmetry, we know that: ; The sixth case is when h(l) <- H: f(h(l)) = 0; h(l) is the effective liquid level height obtained after correction at any position l in the liquid tank.

7. The volume correction algorithm for a displacement storage tank according to claim 6, characterized in that, The liquid storage volume of the straight section is calculated based on the total cross-sectional area of ​​the straight section and the cross-sectional area of ​​the straight section at different liquid level heights, including: Integrate the changing cross-sectional area f(h(l)) along the length L of the straight cylinder section to obtain the geometric volume of the straight cylinder section: 。 8. A volume correction algorithm for a displacement storage tank according to claim 1 or 2, characterized in that, Calculate the cross-sectional area and storage volume of the liquid in the transition chamber, including: In claim 1, the length of the straight section or the length of the straight section of the first compartment is L1, and the length of the transition compartment is m; The formula for calculating the similarity ratio k of the cross-sectional shapes at both ends of the transition chamber is as follows: ; The following are similarities in the cross-sectional areas of the liquid transition chamber at the middle and end points: ; Where f(h(L1)) is the cross-sectional area S1 of the starting section of the transition chamber, that is, the cross-sectional area of ​​the liquid at the beginning of the transition chamber, and S(h(L1+m)) is the cross-sectional area S2 of the ending section of the transition chamber. Intermediate cross-sectional area S0: ; The excessive storage volume is calculated as follows: 。 9. A volume correction algorithm for a displacement storage tank according to claim 1 or 2, characterized in that, Calculate the liquid storage volume of the front or rear end cap: ; D is the inner diameter of the elliptical head, which is replaced by the width of the tank cross-section in applications. The liquid level height is h.

10. A volume correction algorithm for a displacement storage tank according to claim 2 or 3, characterized in that, Determine the formula for calculating the cross-sectional area of ​​the straight section of the second or third compartment at different liquid levels, including: With the center of the cross section as the origin, the positive Y-axis is perpendicular to the bottom of the tank and upward, and the positive X-axis is parallel to the bottom of the tank and to the right. The liquid tank is designed with an eight-segment circular arc tank cross section. Due to the left and right symmetry, the situation of five segments of circular arc in the second and third quadrants is considered. According to radius R ,1 R ,2 R ,3 R ,4 and R ,5 And the software program calculates the circle R ,1 , circle R ,3 , circle R ,5 The equation of R in the coordinate system ,2 and R ,4 The coordinates of the center of the circle, R ,2 With circle R ,1 The coordinates of the tangent point T, R ,2 With circle R ,3 The coordinates of the tangent point U, R ,4 With circle R ,3 The coordinates of the point of tangency W, R ,4 With circle R ,5 The coordinates of the tangent point M are used to obtain the equations of the five circular arcs. ; The first segment S'1 has an integration interval of [y]. t , H], where y t It is the ordinate of the boundary point T, and H is the theoretical maximum value of the liquid surface in the current coordinate system; ; The second segment s'2 has an integration interval of [yu, yt], where yu is the ordinate of the boundary point U and yt is the ordinate of the boundary point T. ; The third segment s'3 has an integration interval of [0, yu], where yu is the ordinate of the intersection point U, and 0 is the lower limit of integration. This area refers to the area of ​​the figure enclosed by the cross section of Cang 2 between the x-axis, y = yu, and the y-axis. ; The fourth segment s'4 has an integration interval of [yw, 0], where yw is the ordinate of the intersection point W, and 0 is the upper limit of integration. This area refers to the area of ​​the figure enclosed by the cross section of Cang 2 between the x-axis, y = yw, and the y-axis. ; The fifth segment s'5 has an integration interval of [ym, yw], where ym is the ordinate of the intersection point M and yw is the ordinate of the intersection point W. This area refers to the area of ​​the figure enclosed by the cross section of Cang 2 between the y-axis, y = ym, and y = yw. ; The sixth segment s'6 has an integration interval of [—H, ym], where —H is the theoretical minimum value of the liquid surface in the current coordinate system, ym is the ordinate of the intersection point M, and this area refers to the area of ​​the figure enclosed by the cross section of tank 2 between the y-axis and y = ym. The final formula for calculating the cross-sectional area under different liquid level heights is as follows: ; The general form of the integrand is: ; The range of i is 1-5, representing different arc segments. 1-5 represents circles R,1 to R,5.

11. The volume correction algorithm for a displacement storage tank according to claim 10, characterized in that, Calculate the liquid storage volume of the straight section of the second or third compartment according to the established cross-sectional area formula, including: The volume of the straight cylindrical section is obtained by integrating the cross-sectional area over the length L2: ; Where h'(l) is the effective liquid level height obtained after correction at any position l in the liquid tank.