Calibration of Tanks and Ships ’ Tanks for Storage and Transportation of Liquids by Laser Scanning

The goal of the research is to improve the accuracy of measurement the volume and mass of oil and oil products by the stationary measuring tanks and ships ’ tanks. It is possible to achieving this goal only by using the laser scanning at tanks calibration. Metrological and other technical requirements for laser scanners have been developed. It is proved by the results of mathematical modeling that only the compliance of scanners with the developed requirements makes it possible to achieve the set goal. It has been developed methods of measurements by laser scanners that allow to achieve an increase in the accuracy of determination the interval capacities of all types of the tanks. Methods, formulae and algorithms for interval capacities of tanks calculation are very complicated. Therefore, the interlaboratory comparisons for the interval capacities, calculated by laboratories own software developed for processing the results of the specified calibration are proposed. It is concluded that the developed requirements, methods and algorithms will allow, in several times, to increase the accuracy of determining the interval capacities of the tanks with a significant reduction in time for measurements and processing of their results.


Introduction
High speed laser scanners (to 2 million points per second) in automatic mode measure horizontal and vertical angles and distances to any visible point of the tank in non-reflective (non-contact) mode.According to the measurement results, the coordinates x i , y i , z i of the points on the surface with a standard uncertainty of 2-3 mm are immediately calculated and entered into a file in the device's memory.Many laboratories apply manual electronic and scanning total stations, but in speed of measurement, they significantly yield to scanners.
Measurements can be performed at a wide range of temperatures and in strong winds with modern scanning devices, and with some types of instruments, even in the rain.
The scanner scans everything that is around within its line of sight except for a small "dead" zone under the device, and when working "upside down", above the device.
One of the ways to increase accuracy of volume and mass measurement of liquids stored in vertical and horizontal cylindrical, and spherical tanks and ships' tanks is a laser scanning of their surface in the process of their calibration.This significantly increases the productivity of the measurement process.Without special software it is impossible to fulfill rather complicated calculations for accurate estimation of the interval capacities of tank and their uncertainties.Correct use of the scanners for coordinate measuring, preparation of tank's 3D model, development and use of special software for tank capacity calculation and its uncertainty calculation is impossible without clear definition of those processes and algorithms.The crude errors and unproven methodic of laser scanning cause crude errors in measurement of a tanks' capacity up to 1-5%.The nonconformity of laser scanners to set requirements causes errors in measurement of the tank's capacity up to 0,5-2%.

The main goal and tasks of the research
The main goal of these research are the development of the laser scanners measurement methods and calculations of the tank's interval capacities methods, which provide an increase in the accuracy of measuring the capacity of tanks in relation to the requirements of OIML R71 [1].
Simultaneously, the task of shortening the measurement time using laser scanners and shortening the processing time and creation of a tank capacity table based on laser scanning data using special software is being solved.
The internal capacities of the tank are entered into the capacity table.It sets up a correspondence between absolute height of the level of liquid in the tank and its capacity.So, the interval capacity is the value of the tank capacity on the pointed out in the capacity table absolute height of the liquid level.
Many methodical details concerning correct use of the laser scanners for tanks calibration exist.These details, as a rule, are absent in the valid standards that provide application electro-optic method for measurement at tanks' calibration [2][3][4][5][6][7][8][9][10].The standards [11][12][13] can be considered the most complete but they are dated and need to be revised taking into account the latest calibration experience.
This publication is aimed to present clear formulation of important technical requirements concerning the correct usage of scanners in order to ensure fulfillment of the main goal.According to the existing data crude errors and unproven methodic of laser scanning cause crude errors in measurement of tanks capacity up to 1-5%.
Not all types of the laser scanners are appropriate for measurements in the process of tanks' calibration or they have certain constraints for calibration of particular tanks types.Ensuring fulfillment of the main goal should include clear metrological and technical requirements to the laser scanners.Laboratory experience proves that nonconformity of the laser scanners to set requirements causes errors in the measurement of the tank's capacity up to 0,5-2%.
Shortening of the measurement time, i.e., fulfillment of the task of shortening the measurement time is provided almost by any scanner, but its use is appropriate only in case, if it conforms to the set requirements and is used correctly for appropriate tank types.
Previous processing of number of points, which coordinates are measured by laser scanner on the surface of the tank walls (files with approximate size from 50 to 200 MB) has a great importance for fulfillment of the main goal and tasks.The result of such previous processing is a 3D tank model, applicable for further calculation of its interval capacities and their uncertainties.This procedure and requirements to it should also be clearly formulated.
Methods, formulae and algorithms for calculation interval capacities of tanks are very complicated.Fulfillment of the main goal depends on accuracy of methods, formulae and algorithms for calculation of interval capacities of tank.Moreover, they should provide calculation for tanks scanned internally and externally, for all complicated cases of spatial position, for example, huge tank axis tilt, big deformations of tank walls and structural features of tank, etc.To fulfill the main goal and of the task of shortening the processing time and creation of a tank capacity table, it is necessary that they should be clearly and definitely formulated in the new standards.This will help to develop special software and test it for fulfillment of the main goal and decision the tasks.
For final fulfillment of the task of shortening the processing time and creation of a tank capacity table, it is necessary that special software automatically formulate calibration certificate including tank capacity table with interval capacity uncertainties and other important data.Form of the measurement report and certificate should be clearly formulated.
To fulfill the task of shortening the processing time and creation of a tank capacity table, it is necessary to develop special software.Calibrating laboratories have no economical or technical possibilities to develop the mentioned software.
There are examples of software development for processing calibration results of tanks by laser scanners manufacturers.Thus, having no experience in calibration of tanks and clear requirements, these attempts cannot be called successful [14].
Fulfillment of the main goal will allow to provide: • accurate bills calculations for shipped liquids in the process of commercial and tax operations, including fraud protection; • accuracy increase of internal accounting of liquids quantity on the enterprises and organizations, which should shorten nonproductive loses of liquids and improve internal financial reporting indices; • accuracy increase of liquids batching in the process of technological operations of mixing or preparing solutions, etc.
Fulfillment of the task of shortening the measurement time will allow to: • save by enterprises and organizations owing to substantial shortening of nonproductive using of tanks and connected to it technical equipment.For example, calibration of 4-5 tanks on the filling station by laser scanning method taking 40-60 minutes, while using volumetric method according to ISO 4269:2001 [15] takes from 1 to 3 days.
Fulfillment of the task of shortening the processing time and creation of a tank capacity table will allow: • organizations concerned to develop software for processing calibration results more applicable for fulfillment of the main goal; • calibration laboratories to get software, which will shorten processing of measurement results time and will form calibration certificate of tanks and their capacities tables; • accuracy increase of liquid volume measurement in the process of commercial, tax and technical operations, also internal accounting of liquids circulation, for example, oil and gas.
• complete cancelation of calibration of tanks using ISO 4269: This will help to save on large volume of dirty water filtering, which was used for tank calibration.Besides, accuracy of capacity measurement will remain the same or increase.
• clear recommendations will allow to shorten substantially crude and systematic errors quantity in the process of tanks calibration and calculation of their capacity by calibrating laboratories.
OIML R 71 [1] does not contain requirements to field measurement methods, tank capacity calculations and software.In the tank calibration it refers to the international standards [2][3][4][5].
In the standards [2][3][4][5][6][7][8][9][10] the tank is not considered as single spatially closed surface of a geometrically regular or free form where spatial coordinates of each point are known in a single spatial coordinate system.
According to the standards [2][3][4][5][6][7][8][9][10] the radius of the cylindrical tank is calculated from coordinates approximation in separate unconnected plane sections.As a result, part of the significant information about shape and size of the tank is not used.It causes latent (almost impossible to estimate) increase in the uncertainty of the interval capacities calculation.Determination of the axis tilt of a vertical tank to a plumb line or of a horizontal tank to horizon in these standards is performed by some separate measurements.Tilt definition is not associated with mentioned sections.The axis tilt uncertainty is unsatisfactory.In [12,13,16] the axis tilt and its uncertainty are estimated strictly by the least square method (LSM) for all points of the 3D model.
To achieve the goal spatial coordinates must be used to calculate parameters and capacities of the tanks.This is implemented in the standards [11-13], as well as [16,17].Though these standards also require substantial revision taking into account the experience received in recent years.
All listed standards do not contain sufficient information as to requirements to optical-electronic devices for tanks' calibration.A minimum of metrological characteristics and parameters of devices is listed.
So called verification of total stations, described in ISO 7507-4 [3] and ISO 12917-2 [5], is incorrect and harmful procedure for determination suitability of the devices for tank calibration.It is necessary to calibrate scanners with setting specific metrological characteristics and parameters that affect the uncertainty of capacity calculation by point coordinates on the tank walls surface.
For many years, researches have been carried out on metrological and other technical characteristics and parameters of scanners.However, the research of their influence on uncertainty in calculating tank' interval capacities has not been carried out.Therefore, references on multiple sources regarding scanners research are not provided.
In the standards ISO 12917-2 [5], GOST Р 8.994 [7] and GOST 8.659 [13] it is proposed to use total stations for calibration horizontal cylindrical tanks.Many years of experience show that the use of the total stations has no prospect for the calibration of such tanks.Most of them are small in size.The diameter ranges from 1 to 3,5 m.The total stations have range in measurement distances in non-reflective mode 1,2-1,5 m what makes their usage very difficult in tight working space inside the tank.Labor productivity at calibration of such tanks by total station according to ISO 12917-2 [5], GOST Р 8.994 [7] and GOST 8.659 [13] does not stand up to criticism.It can last 3-8 hours versus 10-15 minutes required for scanning the tank from inside and 15-30 minutes from outside.Using a total station during 3-8 hours the number of points on the tank wall surface is not enough to calculate interval capacities with uncertainty better than 0,5-1%.
Attempts to apply method of capacity calculation by areas of separate horizontal sections to spherical tanks [18] have no prospects at all.Only in GOST 8.655 [11,17] mathematically strict approach is used when an approximation by spatial geometrical figure is applied to coordinates of all point on the surface.Then, the capacity of the spatial figure segment is calculated below the specified horizontal plane.A correction for the relief of the real surface is added relative to the approximated one with the using all points of the segment.In this case uncertainty is estimated mathematically strict.A similar approach is used in GOST 8.656 [12], GOST 8.659 [13,16].
A special place among scanners is occupied by highly specialized scanning systems [19,20].Their clear advantage is in explosion-proof design.It is very attractive for tank owners that no cleaning and degassing of the tank is required.Scanning is carried out through a relatively small hole in the tank hatch.Duration of scanning is 2 hours [20].But apart from small horizontal tanks from the inside, they cannot scan anything else.There are big doubts about the declared accuracy [20] (the declared accuracy is absent in [19]).The reasons for these doubts will be stated below.Scanner calibration certificates and any materials of comparative tests of the described technology stated in [19,20] are not accompanied.

Requirements to devices for measuring coordinates on the tank walls 4.1 The main geometrical conditions of the devices for measuring coordinates on the tank walls
Let us briefly recall some important geometrical conditions that must be met for any scanner or total station used for tank calibration.
Rotation axis of the device must be vertical.It is often called the vertical rotation axis, although it is never exactly vertical.The device must measure tilt of the rotation axis of the device and transform the measurement results and calculated coordinates so that axis z of the spatial coordinate system is vertical and the plane xy is horizontal.
Rotation axis of the scanner mirror or the telescope of the total station must be perpendicular to rotation axis of the device.It is often called horizontal rotation axis although it is only approximately horizontal.The point of intersection of the rotation axes of the device and the mirror or tube can be called the reference point of the device, since the zero of the system of measured spatial coordinates is placed exactly in it.
The laser beam axis of the scanner distance meter, which is directed to the tank for measuring the distance, must be perpendicular to the axis of rotation of the mirror or tube.The distance to the tank wall should be measured from the reference point of the device.In reality, it is measured from some other point located on the laser beam axis.The distance from this point to the reference point of the device is called the additive constant of the distance meter of the device [21,22].
All devices measure cylindrical coordinateshorizontal and vertical angles and slope distance α, v, D with subsequent transformation into a spatial rectangular coordinate system.The zero of these systems is located at the reference point of the device.

Requirements to scanners depending on the capacity of the calibrated tank
If calibration laboratory has scanners with the metrological characteristics and parameters that are recommended in Table 1 it does not guarantee the achievement of the set tasks for reducing the uncertainty of interval capacities.However, the lack of scanners with such metrological characteristics and parameters makes achievement of the main goal very difficult.
The expansion coefficient is equal to 2 for the expanded uncertainty in Some comments to items of Table 1.
1.In the first line of Table 1 it is given the most probable range of distances in which the scanner has to work at calibrating a tank of the specified capacity.It should be noted that not all types of scanners provide the minimum measurement range.
2. If you scan a smooth surface, at the scan it will not look smooth, but will have some roughness.It is characterized by a standard deviation.
3. The additive constant of the scanner distance meter should be zero, but this is never the case.It is recommended that it does not exceed the values given in Table 1.Unfortunately, it can have slightly different values at different subranges of the measured distances.This should also be investigated and taken into account when introducing amendments.
4. Special attention should be paid to the measurement of the additive constant of the distance meter, as it should be used to introduce corrections to each point coordinate on the surface of the tank walls.Its uncertainty directly affects the uncertainty in determining the size of the tank, and, consequently, the uncertainty in determining its capacity.For example, it is highly desirable that for horizontal tanks with a nominal capacity of 5 to 50 m 3 , the expanded uncertainty of the mean radius does not exceed 0,2-0,5 mm, and the average length does not exceed 1-2 mm.
5. It is difficult to position quickly and accurately the rotation axis of the scanner in a vertical position when it is upside down.Therefore, it is very important to have a wide measurement range of the tilt of the scanner's rotation axis in an inverted state (Figure 1).If the scanner is used only in a normal vertical position, then the measurement range of the rotation axis tilt can be AE (5 0 -15 0 ).In this case, the rotation axis tilt of the scanner inside vertical tanks can be significantly affected by the instability of its bottom.
6. Uncertainty in measuring the tilt of the scanner rotation axis is a very important characteristic, since the random and systematic components of the tilt measurement are directly contributed into the uncertainty of the axis tilt of the cylindrical tank.
7. Theoretically, the zero of the devices for measuring vertical angles should coincide with the rotation axis of the device, but this is not always the case.The angle between the rotation axis, which must be vertical and the zero of the devices, is called the index error.
8. Collimation errordeviation from the perpendicularity of the laser beam axis and tube rotation for total station should not exceed 0,5 0 .9. Deviation from the perpendicularity of tube rotation axis and the total stations rotation axis is should not exceed 0,5 0 .
10.This item refers to the use of the scanner at tank calibration.The absolute height of the scanner reference point relative to the tank reference point should be determined before and/or immediately after scanning the tank with the recommended uncertainty.
Based on the above information, the scanners described in [19,20] should be subjected to rigorous metrological testing.For them, the requirements of items 2, 4, 6-10 must be met.Otherwise, it is impossible to talk about the achievement of the set goal regarding the uncertainty of interval capacities less than 0,2%.It should be noted that some requirements for such a design of scanners should be formulated somewhat differently.

Modeling the influence of systematic measurement errors and deviations of the device's parameters from the nominal values on the calculated interval capacities
To demonstrate the influence of systematic measurement errors and deviations of the device's parameters from the nominal values on the calculated interval capacities, a simulation was performed when the coordinates of points on the tank surface were deliberately distorted by errors and deviations.
A horizontal cylindrical tank with flat bottoms with a nominal capacity of 29 m 3 was chosen as a model (Figure 2).Its length is approximately 4,78 m, and its diameter is 2,78 m.The prepared 3D model consists of 50 thousand coordinates of points.
The following formulas were applied to distort the 3D model.Along with the formulas, the values of errors and deviations that were used to distort the 3D model are also given.
1. Measurement error Δ D of the additive constant of the distance meter during its calibration: Scanning of the horizontal cylindrical underground tank through its hatch.
2. Measurement error Δ γ by scanner its rotation axis tilt if the tilt error is directed along axes x: 3. Index error (of a zenith point) ν 0 at measurement of the vertical angles: 4. Deviation from the perpendicularity of the laser beam axis from the rotation axis of the mirror or tube (collimation error) C α : 5. Deviation from the perpendicularity of the rotation axis of the mirror or tube from rotation axis of the laser scanner C β : 6. Measurement error of the absolute height of the reference point of the scanner relative to the reference point of the tank Δz 0 : In formulas ( 1)-( 6) the x i , y i , z i are not distort coordinates, the x 0 i , y 0 i , z 0 i are distort coordinates, the D i is slope distance, the S i is horizontal distance.
The interval capacities obtained for the distorted model were compared with the original-initial, undistorted model.The results of this comparison are shown in Figure 3. in a graphical form.
Deviations from perpendicularity in accordance with clauses 4 and 5 did not have any effect on the change in interval capacities, therefore they are absent in Figure 3.However, if the tank was scanned from the outside and measurements were taken from several stations, then their influence can be significant.

Tanks scanning features
Particular attention should be paid to the cleanliness of the optical surfaces of the scanner before tanks calibration and scanning.According to our research, even a small amount of dust or liquid's condensate on optical surfaces can cause a significant change in the additive constant of the distance meter.
If the tank has been hydro-tested or washed with water, then the wet walls of the tank are not an obstacle to high-quality scanning.If high humidity is inside the tank, condensation of water vapor on the optical surfaces of the scanner is not allowed.The presence of water in the bottom or in the lower part of the tank is not desirable.Water can interfere with measurements or give a large number of false points that will interfere with the preparation of a good 3D model of the tank.Measurements through the water, if they succeed, significantly distort the coordinates.
The presence of even a small amount of diesel fuel on the walls of the tank has an extremely negative effect on the results of scanning.The standard deviation of coordinate measurements (point 2, Table 1) can increase in 10, 20 or more times.Especially if the beam falls on the contaminated surface at an acute angle.It is very difficult or impossible to distinguish exactly where the actual surface of the tank wall is, and where is the noise from distortions by the diesel fuel slick on the tank wall.
Measurements with fuel vapors in the tank are not only hazardous to life and health.They do not provide an opportunity to make qualitative measurements.When fuel and air vapors are mixed, strong turbulence arises that is almost opaque to the laser beam.If the measurements could be carried out, then the coordinate errors can reach tens of millimeters.Such measurements must be prohibited.For these reasons, the authors of this publication are extremely skeptical about tanks scanning in accordance with [19,20], without cleaning and degassing them.It is impossible to confirm or deny this before comprehensive comparative tests are carried out.
Definitely it is necessary to use the current additive constant to correct the coordinates on the tank wall, which is recommended to be determined independently at least once every 1-3 months.
The scanner must be calibrated at least once a year.In this case, it is recommended to determine all the characteristics and parameters of the scanner, given in Table 1.At least once every twothree years, it is necessary to carry out maintenance of the scanner and adjust all its parameters in the manufacturer's service center.Only the manufacturer has the opportunity to investigate in his laboratory all the characteristics and parameters of each scanner, make the necessary adjustments and settings.

Measurement methods of scanners during tank calibration and
uncertainty sources connected with it

Features that influence the choice of the measurement method
The scanning methods for different types, sizes and purposes of tanks has a lot in common, but there are some features.Taking into account these features depend on whether the goal set in Section 2 will be achieved or not.These features include: • locationaboveground or underground location of the tank; • operation capabilitythe tank is calibrated from inside at the plant right after its production, the new one at the place of exploitations, decommissioned.The tank is calibrated from inside in case of its exploitation; • scopethe tank is used for storage oil, oil product, liquefied gas or another liquid, for example, ammonia; • typea horizontal or vertical cylindrical, spherical, arbitrary geometrical.
At scanning an important condition to achieve goal set in the Section 2 is to fulfill simple but very significant rules connected with described above features.

Features of scanning through the hatch of new or decommissioned tanks
The measurement made inside the tank from a tripod is more preferable from the point of view of measurement accuracy than upside down through the hatch, as shown in Figure 1.On a tripod the scanner is placed almost in the center of the tank, and asymmetrically when measuring through the hatch.But to place the scanner in the center of the tank, you need to get in it, and these are additional risks to life and health.Moreover, it is extra spent time.If the characteristics and parameters of the scanner meet the recommendations given in Table 1, in our experience, scanning through the hatch does not lead to a significant loss of accuracy of capacity measurement.This is confirmed by the above simulations described in 4.2.
If the tank has many internal structures and equipment than many "shadows" appear on its surface (Figure 4).To significantly reduce their number, it is recommended to make two scans, displacing the scanner inside the hatch as much as possible.The "stitching" of two scans with the complete software for the scanner by characteristic points gives a good result.

Direct procedure for linking automatic level gauge readings to the calibration table when scanning the tank from inside
It is impossible to measure the volume and to estimate the measurement uncertainty of the liquid volume in a tank correctly, if we do not consider the pair of measuring devices "level gaugetank" as a whole.The level gauge must be set up so that it measures the absolute height of the liquid level in the tank relative to the reference point.In other words, so that the zero of its readings coincides with the zero of the tank calibration table.
During measurements, the zero of the scanner coordinate system coincides with its reference pointthe point of intersection of its horizontal and vertical axes (Section 4).During processing, it is necessary to transform the coordinates measured in the scanner coordinate system into the tank coordinate system.That is, the horizontal plane of the new coordinate system must pass through the tank reference point.It is very easy to do this with modern software if the measurements are made from the inside and the reference point is marked and clearly visible on the 3D model.
To achieve the high accuracy of measurements of the tank capacity, it is necessary that the standard uncertainty of such a link does not exceed the values given in clause 10 of Table 1.
Figure 5 shows a panoramic photo of the tank made by the scanner from the measuring point.Due to the fact that the scanner was installed upside down, similar to Figure 1, the bottom is at the top of the figure, and the roof is at the bottom.In the center of the tank, it is clearly seen the central square pipe, which supports the roof (in the photoon the left).To the right of the pipe is a thin dark line with a dark rectangle at the end.This is a dip-tape hanging through a dip-hatch.The dipweight of the tape touches the bottom at the dipping reference point.A horizontal plane xy passes through the bottom of the dip-weight, the absolute height of which is equal zero.The capacity table starts from this plane.Therefore, offset between dipping reference point (dip-point) and calibration datum point is equal zero.After the first filling of the tank the absolute height of the level is measured by dip-tape or another material measure.This value is entered into the level gauge.Direct procedure of linking the values of the automatic level gauge to capacity table is completed.According to OIML R 85 [23], the difference between the absolute height of the level measured by the material measure and the readings of the automatic level gauge must be within AE4 mm over the entire range of level measurement for any type of tank.This value includes not only the deformation of the bottom, roof and walls of the tank, but also the uncertainty of the binding.In our opinion, this indicator for horizontal cylindrical tanks should be within AE2 mm.

Indirect procedure for linking the automatic level gauge readings to the calibration table when scanning from the inside through the tank hatch
During the repair of horizontal cylindrical tanks, remove the lid with a pipe (Figure 1, left), which directs the material measure to the reference point.On the inner wall of the tank, this point is almost always unmarked and it is not known exactly where it is.Without precise localization of this point, it is impossible to bind to it with the uncertainty given in item 10 of Table 1.
To solve this problem, it was proposed method of binding by laser level and tape.A photo of the binding procedure is shown in Figure 1.
The scanner is mounted on one side of the rod and the laser level (crossline) on the other.The distance from the reference point of the scanner to the end of the rod is known from metrological measurement.After tank scanning the laser beam is counted on the tape.
Further, the hatch is closed and a gage pipe is installed, which directs the material measure to the reference point.The reference height of the tank as the distance from the dipping reference point to the top of the gage pipe is measure by a material measure.A level is installed on the gage pipe (Figure 1, right) and the counting is carried out using a laser beam on a tape.
The absolute height of the scanner reference point in relation to the tank reference point is calculated by formula: where B is a reference height of the tankvertical distance from the dipping reference point of the tank to the top of the gage pipe; d is distance from the reference point of scanner to the end of the rod (Figure 1, left); r 1 is reading by the laser beam of the level on a tape when it is at the end of the rod (Figure 1, right); r 2 is reading by the laser beam of the level on a tape when it is at the end of the gage pipe; c D is the additive constant of the scanner distance meter in accordance with items 3 and 4 of Table 1 Section 3.
The signs r 1 and r 2 in the formula are given for the case when zero of the tape is in the top (Figure 1).If the zero is in the bottom, it is necessary to change the signs to the opposite.
The value z 0 is added to each coordinate z i .It is easy to complete by software bundled with the scanner during preliminary processing of the measurement results.
Before start-up a horizontal cylindrical tank with a capacity of up to 50 m 3 after its calibration, it is recommended to check the correctness of measuring the absolute height of the scanner's reference point relative to the tank's reference point.To do this, it is necessary to pour a known volume of fuel into an empty tank through a standard batch meter or fuel dispenser in accordance with ISO 4269 [15], for example, for a horizontal tank, 100 or 200 liters, and measure the level of fuel in the tank using a material measure.The measured level must correspond to one in the capacity table within limits pointed out in the item 10 of Table 1.In justified cases, it is recommended to shift the table so that the measured level in it coincides with the poured controlled volume of the liquid.

An indirect procedure for linking the automatic level gauge readings to the capacity table when scanning the tank from the outside
An indirect procedure is used to calibrate tanks for liquefied gas that are operated under pressure and for some other tanks that are operated at atmospheric pressure.Link to the reference point is fulfilled by the tank edge where the automatic level gauge is mounted.As a rule, for such tanks measurements by the material measure are not provided even if the tank is not out of service.The zero of the level gauges reading during calibration must align with the stock on the level gauge that connects it to the stock on the tank, taking into account the thickness of the gasket.Before scanning, the stock must be marked with the brand recommended by the scanner manufacturer.
In GOST 8.655 [11,17] for spherical tanks it was proposed to take the lowest point of the approximating sphere as the reference point of the tank.The absolute height of the stock above the reference point is the sum of the radius of the tank and the distance from the stock to the center of the tank, which are calculated from the results of the approximation (Section 7).This makes it possible to indirectly link the capacity table to the readings of the level gauge with the uncertainty given in the clause 10 of Table 1.

Preparation of a 3D model of a tank to calculate its capacity: unprepared and prepared 3D model
In general, the operations of preparation to calculate the capacity of different types of tanks coincide, but may differ somewhat depending on the features given in subsection 5.1.
If the tank was scanned from one point (station), then this is an unprepared 3D model of the tank (Figure 4).If the tank was scanned from several points (stations), then several scans are combined into a single unprepared 3D model of the tank by the software bundled with the scanner.It is impossible to use such a model to calculate interval capacities.It must be properly prepared.
A prepared 3D model of the tank (Figure 2) is a file of spatial coordinates of points on its surface available for visualization and editing with special software, as well as other calculations, for example, approximation, triangulation, calculation of capacity.
To create a prepared for calculation 3D model the following procedures should be carried out: 1. Separate scans should be combined into one unprepared 3D model (Figure 4).The empty spaces that are closed for measurement by internal constructions of the tank are visible on such model.The constructions that do not belong to the tank walls are also visible; 2. The point coordinates should be corrected by amendment that takes in account the additive constant of the scanner distance meter; 3. During internal measurements the 3D model should be turned over if scanning was performed "head down" by the scanner (Figure 1).During external measurement this option is absent; 4. Align the horizontal plane xy with the reference point of the tank (subsection 5.4) and check the alignment of the axis z with the plumb line; 5. Change over the axеs x and y, if the program will be used that have another axes orientation; 6.To measure geometrical sizes and the absolute height z, in a new coordinate system, internal constructions and equipment.During external measurements it is possible to use materials of the previous calibration or drafts of the tank; 7. Delete from a 3D model all points that do not belong to tank walls including internal constructions and equipment; 8. Using the special function of the software reduce the number of points on the tank wall so that remained from 40 to 100 thousand, but they should evenly cover the walls; 9. To open 3D model so as necessary for calculation a tank capacity, for example, at approximation of the horizontal tanks the axis x is oriented in a horizontal plane LSM approximately parallel to the tank axes; 10.If it is supposed to use triangulation method for capacity calculation (Section 7), then special software generates points where they are absent (Figure 2).For LSM approximation method (Section 7) it is useless.
The internal constructions and equipment are presented as simple geometrical shapesparallelepiped or cylindrical.For each shape directly on the 3D model it is measured: • geometrical sizeslength, width and height or length and diameter; • axis tilt of the parallelepiped or cylinder to the plumb line; • the absolute height of the lowest and the highest point; • for the vertical tanks it is measured the absolute height of the courses; • for the vertical tanks by the floating roof or pontoon it is measured their geometrical sizes and the absolute height of their lowest part.
These data are sufficient to compose a capacity table for each such geometric shape from the minimum to the maximum absolute height, as described in [11-13].These local capacity tables of constructions and equipment are added as corrections to the main tank capacity table.
For tanks with a floating roof or pontoon the correction is calculated from the absolute height at the moment the liquid touches them to the absolute height of their emersion.

Estimation of the interval capacities of the tanks and their uncertainty 7.1 Evaluation of the interval capacities by the results of approximation and triangulation
A tank should be considered as a single spatial surface where a spatial coordinates of each point of the prepared 3D model are known with a required uncertainty in a single spatial coordinate system.Methods of calculation of the interval capacity can be considered as strict if they mathematically correct use all the points of the prepared 3D model.In the standards [2][3][4][5][6][7][8][9][10] it is applied non-strict models where separate sections are used to measure tank radius.As a result, some of the valuable information about the shape and size of the tank is not used.This leads to a latent (it is almost impossible to estimate) increase in the calculation in the interval capacities uncertainty.
In our opinion, at the moment, two strict methods have been developed to calculate the interval capacities of tanks by the coordinates of points obtained by the laser scanning method.One is based on the approximation of a spatial surface of a regular geometric shape, and the other is on the triangulation of the surface.Each of them consists of two stages.
The approximation of the surface by the least square method.At the first stage, the geometrical parameters of the tank are calculated from the coordinates of all points on the surfacethe mean radius of the spherical tank GOST 8.655 [11,17] or the mean radius and the axis tilt of the vertical cylindrical tank GOST 8.656 [12,16] the mean radius, the axis tilt and the length of the horizontal cylindrical tank GOST 8.659 [13].The radial deviations of the real surface of the tank relative to the approximating one are also calculated.
At the second stage, the volume of the segments of such an approximating surface is calculated below the specified horizontal planes.This capacity comprises correction for relief based on the calculated radial deviations.The evaluation of the uncertainty of interval capacities should be based on the fundamental documents JCGM 100 [24] and JCGM 102 [25].The process of evaluation the interval capacities and their uncertainties by this method is described in [11-13, 16, 17] and improved in subsection 7.2.
The triangulation of the tank surface by the Delone's method [26] is fulfilled at the first stage.We did not consider it is necessary to refer to a big number of sources on this topic except the first publication of the author.Delone's method is not the topic to discuss in this publication.
At the second stage, the area of a closed polygon is calculated, which lies at the intersection of the horizontal plane and the plane of the triangles that it crossed.At the intersection of the sides of each triangle and the horizontal plane, the coordinates of the points are calculated.As a result, these coordinates are used to calculate the area of a closed polygon.The complexity of this algorithm is that the program must subtract from the area of this polygon (conditionally "sea") the area of all "islands".But add the area of all the "lakes" on the "islands".Then, subtract the areas of all the "islands" on the "lakes", etc.
The interval capacity is calculated from the areas of two polygons and the increment in height between the areas.
Both of these two strict methods have their own advantages and disadvantages.So, for the approximation method the uniform coverage of the entire surface by points is useless, simply they must be quite enough.Part of the surface may not be covered by points at all.Even a small number of points (for example 3 000) evenly spaced on the cylindrical surface of the vertical tank give an acceptable capacity uncertainty.However, this method is not applicable to arbitrary geometrical shape tanks, for example ships' tanks.
The triangulation method allows to calculate tank capacity of any arbitrary shape, however, point on the tank surface should be many (not less than 30-50 thousand).They must be placed evenly otherwise the program will not connect them in triangles.
It is impossible to calculate the interval capacities of the tank reliably if part of its surface is not covered by triangles (Figure 4).It is necessary to generate on these sections the additional points by the special program (Figure 2).This increases the uncertainty of a capacity calculation.The triangles should be not elongated and/or large as they will not follow the real shape of the surface.It is good if the program adds on the points on the bending lines, for example, on the line, where the flat bottom is linked up the cylindrical part.If this is not done, then the real sharp bend line will be smoothed out.It negatively affects on the uncertainty of the interval capacities.
The advantages and disadvantages of these methods are not limited to those mentioned above, however, they have clear advantages over non-strict methods.Theoretically, the capacity of the same tank for which the same 3D model is used, processed by different programs based on strict methods, should coincide.However, in practice this is not the case.
Preliminary results of comparisons of tanks capacity calculated by different software are described in [14].

Evaluation of the geometrical parameters and capacity of spherical
and cylindrical surfaces and their uncertainties

Identifying the problem
The problem is that at approximation it is necessary to determine spatial position and orientation of the tank surface toward horizontal plane xy, mentioned above, otherwise, it is impossible to calculate the interval capacities correctly.The spatial position of the spherical surface identifies by 3D coordinates of its center, and the cylindrical surface by the coordinates of the point on its axis.The spatial orientation of the cylindrical surface of the vertical tank is identified by the tilt of its axis to the plumb line in the coordinate planes xz and yz.The spatial orientation of the cylindrical surface of the horizontal tank is identified by the tilt of its axis to horizontal plane xy and rotation to the plane xz.

Evaluation of a spherical and cylindrical surface geometrical parameters
The measurement models binding points coordinates on the surfaces and their geometrical parameters are given by Eq. (8): For spherical surface the measurement model ( 8) is: For vertical and horizontal cylindrical surface the measurement model ( 8) are: where: x i , y i , z i are the horizontal coordinates and the absolute height of the points on the surface (where i ¼ 1 … n), which are measured by the 3-D instruments; τ 1 … τ k are the defined geometrical parameters; R is the mid radius of the spherical or cylindrical surface; x o , y o , z o are the coordinates of center for the spherical surface; x o , y o are the horizontal coordinates of the point on the surface's axis if z o ¼ 0 for the vertical cylindrical surface; z o , y o are the absolute height the and horizontal coordinate of the point on the surface's axis if x o ¼ 0 for the horizontal cylindrical surface; where β x , β y , β z are the tilt of the cylindrical surface axisthe angles in the plane projection coordinates xz, yz and xy; k is the quantity of the determined geometrical parameters of the spherical or cylindrical surfaces; n is the quantity of points at the spherical or cylindrical surfaces at which the coordinates are determined.
For surfaces the absolute height is the vertical distance from any horizontal flatness to the point with number i.
Due to surface roughness and coordinate measurement uncertainties, Eq. ( 8), (9), ( 10) and ( 11) is not fulfilled.That is why, to evaluate the determined geometrical parameters of the spherical, cylindrical and other surfaces, it is necessary to establish equations of corrections, which we obtain by the partial derivation of the measurement model ( 8) by the measured coordinates and defined parameters: where: v x i , v y i , v z i are corrections to the measured coordinates of the point with number i on the surface; ϑ i is the radial deviation of the real surface perpendicular to the approximating surface; δτ 1 , δτ j , δτ k are corrections to the initial values of the defined parameters of the surface is the constant term of the equation of corrections.In the matrix, the parametric equation of the corrections system (13) gives: where: A is the matrix of the partial derivatives from the measurement model ( 8) by the measured coordinate points; V is the correction matrix to the measured coordinate points; ϑ is the diagonal matrix of the radial deviation of the real surface from the approximation; B is the partial derivative matrix from the measurement model ( 8) by the determined geometrical parameters; δτ is the correction vector to the initial values of the determined parameters; l is the constant terms vector of the correction equation.Then, Eq. ( 13) for spherical surfaces are given by: where: where: o are the initial values of the defined geometrical parameters of the spherical surface; g is the number of approximation.Eq. (13) for vertical cylindrical surfaces are given by: ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi The dual weight of the radial deviation ϑ i and the radial deviation weight are given by: where: q x i , q y i , q z i are the dual weights of the defined coordinates; K x i y i , K x i z i , K y i x i , K y i z i , K z i x i , K z i y i are the covariance (correlation) moments; q i xyz is the covariance (correlation) coordinate matrix; A i ¼ a i1 a i2 a i3 j jis the partial derivative matrix of Eq. ( 8) by the measured coordinates (see Eqs. ( 13) and ( 14)).
Taking into account that the parametric equations of corrections (13) (for spherical surfaces (15), for vertical cylindrical surfaces (18)) are much greater than the determined geometrical parameters, one may build a normal equation system, which in the matrix, taking into account that B T Á W Á ϑ ¼ 0, gives: Corrections to the initial values of the geometrical parameters determined in the matrix are obtained by solving the system of linear Eq. ( 23) by the formula: where: N À1 ¼ Q is the inverse matrix to the normal equation matrix.
The evaluation by the least square method using the covariance matrix point coordinates at the surface is fulfilled under the following conditions: where w i are the weights of the radial deviations.The standard radial deviation σ ϑ of the real surface from the approximation is calculated by the formula: The adjusted (defined) parameters, their covariance matrix and the standard uncertainties (standard deviation) of the main defined surface geometrical parametermid internal radius and center coordinatesare: where: Q 11 , Q 22 , Q 33 and Q 44 are the diagonal components of the inverse matrix to the normal equation matrix.
The standard radial deviation σ ϑ , calculated by formula (26), comprises not only measurement uncertainties.It also comprises real surface deviations from the mathematically correct shape.They appear when the surface is manufactured and due to deformations caused by its use.Based on their experience in calibration, the author wishes to state that the second component exceeds the first for tanks surface by 5-10 times.

Measurement model for the spherical and cylindrical surface total and interval capacities
The adjusted spherical, cylindrical or other surfaces' interval capacity below absolute height H f is: where V H f is the interval capacity for surface that was calculated by adjusted parameters of surface; ΔV H f is the terrain corrections to capacity below height H f .The measurement model of the total and interval capacities of the spherical surface is: and of the vertical cylindrical surface is: where: H f is the absolute height of the horizontal plane (for example, liquid) relative the bottom point of the approximation spherical surface or reference plane for cylindrical surface; R is the adjusted radius of the spherical or cylindrical surface; f is current number for which the interval capacity is calculated; π= 3.1415926 ….
Taking into account a large number of points whose coordinates are determined by the method of laser scanning on the surface, it is proposed to calculate the terrain corrections ΔV H f using formulas (33) and (34): where for the spherical surface for the vertical cylindrical surface where: S H f is the surface's area below height H f ; ϑ H f is the mid radial deviation of the surface's wall below height H f (ϑ i is calculated by (15) or ( 18)); n H f is the number of points on the surface below height H f , the coordinates of which were determined.

Evaluation of the total and interval capacities uncertainty of the spherical and cylindrical surfaces
The evaluation of the standard deviation (A-type standard uncertainty) unimproved by the spherical surface interval capacity below height H f is calculated considering correlation by formula (36): where for the spherical surface: is the partial derivatives vector from function (31) by the spherical surface's geometrical parameters R and z o .
For the cylindrical surface: is the partial derivatives vector from function (32) by the cylindrical surface's geometrical parameters R, η x and η y .
Formula (36) excludes correlation for spherical surface gives: Formula (36) excludes correlation for vertical cylindrical surface gives: The evaluation of the standard deviation (A-type standard uncertainty) of the spherical and vertical cylindrical surfaces' area below height H f is calculated considering correlation by formula (41): where for the spherical surface: is the partial derivatives vector from function (31) by the spherical surface's geometrical parameters R and z o .
For the cylindrical surface: is the partial derivatives vector from function (32) by the vertical cylindrical surface's geometrical parameters R, η x and η y .
Formula (41) excluding correlation for spherical surface gives: Formula (41) excluding correlation for cylindrical surface gives: The standard deviation of the mid radial deviation of the surface's wall below height H f , which is given in first formula (33), is calculated by formula (46): The standard deviation (A-type uncertainty) of the terrain correction ΔV H f is calculated for all type of surfaces by formula (47): The A-type uncertainty of the adjusted surface interval capacity below height H f is calculated using formula (48): Thus, it has been developed a method for evaluation the geometrical parameters and interval capacities of spherical, vertical and horizontal cylindrical tanks, as well as evaluation of their uncertainty.It provides adequate comparable results regardless of the size and shape of the surface, deformation of its surface, measurement accuracy, as well as the location and number of points which coordinates were determined on the surface.

Corrections to the tank capacity: uncorrected and corrected capacity
For accurate measurement of the liquid level during commercial and tax operations, the internal accounting and inventory it is very important to insert corrections to the tank capacity properly.These are small values, but they are systematic and can significantly contribute to the uncertainty of a liquid volume measurement.
Corrections are inserted for all types of tanks: • for bringing the interval capacity of the tank to a temperature 15°С; • for presence the internal constructions and equipment.
If the tank was calibrated from outside then corrections are inserted for tank wall and paint thickness.
For tanks that are operated under an atmospheric pressure, corrections are inserted for: • hydrostatic pressure of the liquid in the tank during calibration; • hydrostatic pressure of the liquid on walls of the tank at its operation; • For sealed tanks that are operated under excess pressure, instead of corrections for hydrostatic pressure it is inserted the corrections for: • the excess pressure that was in the tank at its calibration; • the excess pressure that will be in the tank at its operation.
For example, liquefied gas tanks are operated under pressure.Therefore, the radius of the tank must be corrected for the pressure inside the tank at calibration and the average pressure in the tank at its operation.
Tanks are used not only for commercial operations but also for internal account and inventory.For such operations, it is important to know as accurately as possible the entire volume of liquid in the tank.Therefore, for vertical cylindrical tanks it is inserted corrections for: • volume of liquid replaced by the floating roof or pontoon; • "deadwood" volume in the lower part of the tank.
For each tank, the absolute height of the liquid level must be established, below which the commercial operations are not recommended, since the uncertainty of the capacity there is greater than the standardized one.For example, the capacity of a vertical cylindrical tank below a drain pipe or below the height of a floating roof or pontoon.
Mentioned above corrections should not be inserted manually.Their introduction should be carried out by carefully tested software for calculation the interval capacities.

Comparison of the interval capacities of the tanks calculated by the laboratories' own software
The best way to prepare a laboratory for an accreditation according to ISO/IEC 17025 [27] is to test qualification of the laboratory in accordance with ISO/IEC 17043 [28] and EA-2/14 [29].Processing of the test results to fulfill taking into account the requirements of ISO 13528 [30].This will help to solve the problem of identifying sources of errors made by laboratories.
Taking into account many sources of generation the internal capacities' uncertainty and difficulties in organization such kind of work it is proposed to fulfill it in four stagesfrom simple to complex: Organization of the first three stages will not be too difficult and expensive to the provider and the laboratories.Only after formation of group of laboratories that have successfully pass the first three stages, it will be reasonably to carry out the fourth stage that is relatively expansive.
2. Significantly shortening of measurement time using laser scanning of tanks: • vertical and horizontal cylindrical and spherical is up to 10-40 minutes for internal and external measurements correspondingly; • irregular geometrical shape is up to 30-120 minutes for internal measurements.
3. Significantly shortening the time of processing and creating of calibrating table of tank based on laser scanning data using special software: • vertical and horizontal cylindrical and spherical is up to 20-60 minutes for internal and external measurements correspondingly; • irregular geometrical shape is up to 60-180 minutes for the internal measurements.
4. To achieve the target goal the calibration laboratory must: • have a device that conform to the target goals and keep it in a good technical condition; • strictly follow the measurement procedure during the tanks' scanning; • have special software based on the rigorous mathematical methods.It must pass the comprehensive tests against the target goal; • strictly obey the procedure of processing the scanning results and calculation of the interval capacities and evaluation of their uncertainty; • take part in the interlaboratory comparisons of the results of the capacity calculation of the same 3D model of the tanks.
5. The proposed comparisons are needed to the laboratories in order to identify not only errors included in the mathematical model of calculations and/or made at programming, but also to test the ability to prepare a 3D model for calculations correctly and to calculate the capacity of the existing program correctly.Participation of the laboratories in comparisons can be considered as a process of validation of calculation methods and software.
6.There is a need to create new international standards that describe the entire calibration process for all types of tanks based on the principles described in this publication

Figure 1 .
Figure 1.Scanning of the horizontal cylindrical underground tank through its hatch.

Figure 2 .
Figure 2. Visualization of a prepared 3D model of a horizontal tank RHS-25.

Figure 3 .
Figure 3. Errors of the interval capacities caused by distortions of coordinates of the 3D model.

Figure 4 .
Figure 4. Visualization of an unprepared 3D model of the horizontal tank RHS-25.

Figure 5 .
Figure 5. Recognition of the reference point of the tank on its unprepared 3D model.
a.The participants calculate the interval capacities of the prepared by the provider 3D model of the tank without inserting any corrections; b.The participants calculate the interval capacities of the prepared by the provider 3D model of the tank with inserting corrections in accordance with the provider's protocol; c.The participants prepare 3D model of the tank that was scanned by the provider with the subsequent calculation of the interval capacities according to (a) and/or (b); d.Scanning of the tank prepared by the provider with its own scanner with the subsequent calculation of the interval capacities according to (a), (b) and (c).

Table 1
at a confidence level of 0.95 and a normal distribution law.

Table 1 .
Recommended metrological characteristics and parameters of scanners depending on capacities of the calibrated tanks.
6Applied Aspects of Modern Metrology