DEV Community

Cover image for PLC-Based Fuel Consumption Measurement: Load Cell Integration and Compensation Algorithms
Robin | Mechanical Engineer
Robin | Mechanical Engineer

Posted on

PLC-Based Fuel Consumption Measurement: Load Cell Integration and Compensation Algorithms

Gravimetric fuel consumption measurement is conceptually simple — weigh the fuel before and after, divide by time. The engineering challenge is doing this accurately at the sub-percent level in a vibrating test cell environment, with temperature compensation applied in real time.

Here's the technical architecture.

Hardware Layer

Fuel Tank (150L stainless steel)
    |
    +-- 4x Load Cells (shear beam, rated capacity 200kg each)
            |
            +-- Signal Conditioner / Load Cell Amplifier
                    |
                    +-- PLC Analog Input (4-20mA or 0-10V)

RTD Sensors (PT100, 3-wire)
    |
    +-- RTD Transmitter (4-20mA output)
            |
            +-- PLC Analog Input
Enter fullscreen mode Exit fullscreen mode

Mass Measurement Accuracy

Load cell selection is critical. For a 150L tank of diesel (~130kg full):

  • Load cell rated capacity: 4x 50kg = 200kg total
  • Required accuracy: ±0.1% of reading
  • Choose load cells with linearity <= 0.02% FS, hysteresis <= 0.02% FS

Install on isolation mounts to reduce vibration coupling from the test cell engine. Sample at 10Hz minimum; average over 30-second windows to eliminate vibration noise.

Temperature Compensation Algorithm

ISO 3046 and SAE J1321 reference correction:

# Fuel density correction to 15°C reference
# For diesel fuel (approximate)
def correct_to_reference(mass_kg, temp_c, ref_temp=15.0):
    # Diesel volumetric expansion coefficient ~0.00085 per °C
    alpha = 0.00085
    correction_factor = 1 + alpha * (temp_c - ref_temp)
    corrected_mass = mass_kg / correction_factor
    return corrected_mass

# In the PLC, implement as:
# corrected_mass = raw_mass / (1 + 0.00085 * (fuel_temp - 15.0))
Enter fullscreen mode Exit fullscreen mode

For precise work, use the actual density-temperature relationship from ASTM D1250 petroleum measurement tables rather than a linear approximation.

PLC Scan Cycle and Data Logging

PLC Main Loop (100ms scan):
1. Read load cell ADC value -> convert to kg using calibration polynomial
2. Read RTD value -> convert to °C
3. Apply temperature compensation -> corrected_mass_kg
4. Calculate delta_mass = prev_corrected_mass - corrected_mass
5. Accumulate total_fuel_consumed
6. Calculate instantaneous_rate = delta_mass / scan_time (kg/s)
7. Log to historian: timestamp, raw_mass, temp, corrected_mass, rate

Every 1 second: write to HMI display tags
Every 10 seconds: write to data log file
At test end: generate structured report
Enter fullscreen mode Exit fullscreen mode

Calibration Procedure

Dead-weight calibration using OIML Class M1 weights:

  1. Zero the system with empty tank + known tare weight
  2. Apply 25%, 50%, 75%, 100% of rated load in 5kg increments
  3. Record ADC output vs applied mass
  4. Fit calibration polynomial (linear is sufficient for quality load cells)
  5. Record calibration date and certificate number in system config

Calibration must be traceable to national standards: NIST (USA), NPL (UK), PTB (Germany), NABL (India).

Structured Test Report Format

Generate reports with these mandatory fields for ISO/SAE compliance:

  • Test ID, date/time (UTC), operator
  • DUT engine serial number and model
  • Load cell calibration certificate references
  • RTD calibration certificate references
  • Raw data table: timestamp, raw_mass, fuel_temp, corrected_mass, cumulative_consumed
  • Calculated fuel economy: g/kWh, L/100km, or BTU/hp-hr as required
  • Temperature correction factors applied
  • Pass/fail vs specification

The Neometrix FCMS implements this architecture for locomotive and engine test bench applications.
https://neometrixgroup.com/products/fuel-consumption-measurement-system

Top comments (0)