Tracking Every Barrel From Terminal to Tank: The Tech Behind Modern Fuel Transport

Tracking Every Barrel From Terminal to Tank

Three numbers describe the same delivery and none of them agree. The bill of lading says 8,500 gallons left the rack. The driver’s ticket says 8,480 were dropped. The site’s gauge shows a rise equivalent to 8,455. Nobody has done anything wrong, and the operation still cannot tell whether it lost product or just measured it three different ways.

Reconciling that chain depends on instrumentation and data structure rather than on tighter procedures. Teams like the one at Wezom that work on distribution systems usually find that oil and gas transportation software projects turn on how volume is recorded at each handoff, because a volume stored without its measurement conditions cannot be reconciled against anything.

The chain has four measurement points and three handoffs between them. Each has its own instrumentation, error characteristics and opportunity for the record to diverge from physical reality.

Measurement Physics Before Measurement Systems

Any discussion of tracking volume has to start with the fact that the volume changes on its own.

Petroleum products expand and contract with temperature at rates varying by product. Gasoline has a higher coefficient of thermal expansion than diesel, so the same temperature swing produces a larger volume change. A load lifted at a warm terminal in the afternoon and delivered on a cold morning genuinely occupies less space while containing the same mass of hydrocarbon.

The industry handles this with a net volume: the volume the product would occupy at a reference temperature, 60 degrees Fahrenheit in United States practice, 15 degrees Celsius in most metric jurisdictions. Converting gross to net requires the observed temperature and the product’s density, with conversion factors from published standards tables rather than a simple linear formula.

For software, a volume figure is meaningless without three accompanying facts: whether it is gross or net, the temperature at measurement, and the density or grade used for correction. Systems storing a single numeric volume field, which is the natural first design, cannot reconcile across measurement points because they cannot tell whether a difference represents actual loss or a basis mismatch.

Comparisons must also happen on a consistent basis. Rack meters typically produce both gross and net on the bill of lading. Truck meters may produce one or both. Site tank gauges produce a level reading converted to gross volume through a strapping table, with temperature compensation available only where the gauge has temperature probes. Comparing a net rack figure to a gross gauge reading produces a discrepancy that is entirely artificial, and operations making this mistake spend investigation time on a difference that does not exist.

What Happens at the Rack

Loading is the most precisely instrumented point in the chain, which makes it the reference for everything downstream.

The rack meter is a custody transfer device subject to periodic calibration under weights and measures requirements, typically a positive displacement or Coriolis meter with temperature compensation. Loading is controlled by a terminal automation system that authenticates the driver and vehicle, verifies authorization for the product and quantity, controls the valves, meters the flow, and produces the bill of lading.

Several data elements originate here. The terminal control number identifies the facility for tax reporting. The product code identifies the grade, affecting both tax treatment and compatibility rules. The compartment assignment records which product went where. Gross and net volumes are recorded per product. Additive injection is recorded separately and affects both volume and product identity.

Getting this data into the distributor’s systems differs substantially between implementations. Some terminals provide electronic BOL feeds, direct or through industry data exchange services. Some produce printed documents only, so data enters through driver-carried paper, a scan, or manual entry. Bulk plants the distributor operates can be instrumented to whatever standard is chosen.

Feed latency determines what is possible downstream. A distributor receiving electronic BOLs within minutes can validate the load against the plan, update inventory position in real time and detect anomalies while the truck is still at the terminal. One receiving paper at end of shift reconciles a day later, and any discrepancy investigation begins with a cold trail.

Blending adds a wrinkle. Where a distributor blends at the rack, the resulting volume is not always the simple sum of components, and product identity for tax and quality purposes follows specific rules. Systems modelling a load as single-product compartments will misrepresent blended loads unless the recipe and its output are recorded explicitly.

In Transit: What the Truck Knows

Between the rack and the site, the record depends on what the vehicle reports and how that data reaches the back office.

Basic telematics provides position, speed and engine data. More valuable for fuel transport are signals about the tank itself: compartment level sensors where fitted, valve position indicating whether a compartment has been opened, and on metered trucks, the delivery meter reading. Vapour recovery status and overfill protection interlocks may also report.

Compartment monitoring matters for a reason rarely stated directly: it is the only way to detect an unauthorized discharge between the terminal and the delivery point. A load departing full and arriving short, with no recorded delivery between, is either a measurement problem or a loss. Compartment sensors with a valve-open event and a position stamp distinguish the two definitively. Operations without this instrumentation rely on end-to-end reconciliation, which detects loss in aggregate over time rather than at the event.

Connectivity shapes the architecture. Fuel routes pass through areas with intermittent cellular coverage, and terminals themselves are sometimes poor for signal. Any design assuming continuous connectivity will lose data. The pattern that works stores events locally with sequence numbers and timestamps, transmits when connectivity permits, and handles out-of-order arrival at the server. Events must be idempotent, because the same event will be transmitted more than once when acknowledgements are lost.

Time synchronization needs deliberate handling. The terminal automation system, vehicle telematics, driver’s device and site tank gauge each keep their own clock. Correlating a valve-open event with a gauge rise requires those clocks to be within a known offset, and recording the source clock alongside a normalized timestamp preserves the ability to investigate later when offsets turn out to have drifted.

Delivery: Where the Record Usually Weakens

The drop is the least instrumented handoff in most operations, and where the largest share of unexplained variance originates.

Physically, a delivery is either metered or gauged. A metered truck measures what it discharges, producing a volume at the truck’s meter with its own calibration history and temperature compensation status. A gauged delivery relies on the difference between compartment level before and after, which is inherently less precise. Some deliveries are full compartment drops, where the volume is taken as the loaded volume, accurate only if the compartment was genuinely emptied.

The receiving side has its own measurement. Underground tanks at retail sites are typically monitored by automatic tank gauges reporting level, and with probes fitted, temperature and water level. The gauge converts level to volume through a strapping table specific to that tank’s geometry, and its accuracy depends on the table being correct, which it is not always, particularly after a tank has been replaced or relined without the table being updated.

Reconciling truck-reported delivery against gauge rise is the closest thing to a definitive check, and it is subject to several confounders. Product in the drop line and fill pipe is not yet in the tank when the gauge reads. Deliveries made while dispensing continues produce a rise net of sales. Thermal effects are significant, since underground tanks sit at a stable ground temperature well below a summer afternoon. Water ingress affects level without representing product.

Handling this properly means the system needs the gauge reading before delivery, the reading after a settling period rather than immediately, dispensing volume during the delivery window if the site was operating, and temperature at both ends. Operations comparing a single post-delivery reading to the truck ticket will see variance on every delivery and eventually stop looking, which removes the signal along with the noise.

Delivery confirmation capture is a mobile problem with field constraints. Drivers wear gloves, work in poor light, operate where signal is weak, and are under time pressure. The interface needs large targets, minimal typing, offline capability and a workflow following the physical sequence of the delivery rather than a form layout convenient for the back office. Signature capture where required, and photo documentation of the gauge reading or site condition, provide evidence for later disputes.

Retains, Short Drops and the Records They Create

A short drop occurs when the tank cannot accept the planned volume. The remainder stays in the compartment as a retain, which is still the distributor’s inventory, sitting on a truck. That retain must be tracked: which product, how much, in which compartment, on which vehicle, since when. It will be delivered somewhere, returned to the terminal, or carried forward, and each has different inventory and tax implications.

Operations not tracking retains at compartment level lose visibility of real product. The volume shows as delivered or as unexplained loss, and the next load for that vehicle is planned against a compartment assumed empty. Load planning ignoring existing retains produces plans that cannot be executed, and drivers work around them, reintroducing the manual judgement the system was meant to remove.

Cross-contamination risk makes retain tracking a quality matter as well. A compartment holding a diesel retain cannot take gasoline without handling, and the permissible sequences are product and supplier specific. Encoding those rules where the load is planned prevents a class of incident that is expensive to remediate once product reaches a customer’s tank.

Product returns to the terminal create their own documentation requirement, since the movement reverses the direction assumed by tax and inventory logic. Systems designed around one-way flow handle returns as negative deliveries, producing correct arithmetic and incorrect tax reporting.

Making the Reconciliation Actually Run

An engine comparing the four measurement points per load, applying temperature correction consistently and producing a variance figure, is straightforward to describe and demanding to operate.

The variance tolerance should reflect the measurement uncertainty of the instruments involved rather than being a round number. A gauged delivery to a tank with an older gauge carries more uncertainty than a metered delivery to a monitored site, and applying the same tolerance to both produces either false alarms on one or missed signals on the other.

What makes the engine useful is aggregation. A variance appearing random per load may show a clear pattern by driver, vehicle, terminal, site or product. Consistent negative variance on loads from one terminal suggests a rack meter drifting. A pattern on one vehicle suggests a truck meter needing calibration or a compartment leak. A pattern at one site suggests a strapping table no longer matching the tank. A pattern by driver, after equipment explanations are eliminated, suggests procedure or something more serious.

Investigation workflow matters as much as detection. A variance flagged three weeks later cannot be investigated, because the physical evidence is gone and nobody remembers the delivery. Flagging within hours, routed to someone with authority to check the equipment and speak to the driver, is what converts detection into recovery. Oil and gas transportation software producing a monthly variance report without a routing mechanism will produce a report nobody acts on.

Calibration tracking closes the loop. Rack meters, truck meters and tank gauges all have calibration intervals, and correlating variance patterns against calibration dates frequently explains what looked like operational drift.

Instrumentation Decisions and What They Buy

Not every site or vehicle justifies full instrumentation, and the decision turns on transaction value and variance exposure rather than a uniform standard.

Automatic tank gauges at customer sites give inventory visibility for replenishment planning and delivery verification together. At a high-volume retail site the case is easy. At a small commercial account taking occasional deliveries, hardware and connectivity cost may exceed the value, and consumption modelling from delivery history serves adequately.

Truck meters versus full-compartment delivery is a similar trade. Metered delivery gives precise volume per drop and enables multi-site loads with partial drops, at the cost of equipment to calibrate and maintain. Operations delivering full compartments to a small number of large sites may not need it.

Compartment level monitoring is the instrumentation most often deferred and the one most directly supporting custody assurance. Its value scales with route length, number of stops and the difficulty of supervising the operation, so it earns its cost faster on long rural routes than on short urban ones.

Connectivity at sites decides several of these. A tank gauge with no communications path reports to nobody. Cellular is the default, with coverage gaps at rural and industrial locations, and the alternatives involve customer network access that customers are frequently unwilling to grant.

Designing the Data Model First

For any distributor commissioning work here, the decisions that constrain everything else are made in the data model, and they are difficult to revise once an archive exists.

Volume needs storing with its basis, measurement temperature, density basis and the instrument that produced it. A single volume column guarantees future reconciliation problems.

The chain of custody needs to be a sequence of measurement events linked to a movement, not a set of fields on a delivery record. That structure accommodates the cases that break simpler models: a load serving several sites, a partial drop with a retain, a return to terminal, a transfer between vehicles.

Identifiers need reconciling across systems from the start. The terminal control number, the gauge vendor’s site identifier, the back office customer account and the telematics vehicle identifier all describe entities the reconciliation must link. Establishing those mappings during implementation is work; establishing them retroactively across three years of history is a project.

Time needs a normalized representation with the source clock preserved, because clock drift is discovered during investigations and investigations happen after the fact.

An oil and gas transportation software implementation built on these foundations can answer the question that started this: which of the three numbers was wrong, by how much, and why. One built without them produces three numbers, a discrepancy, and an aggregate loss figure at month end that nobody can decompose. The instrumentation is the visible investment. The data structure underneath it determines whether the instrumentation produces answers.