Skip to main content

A Small Data-Quality Gate for RO Operating Logs

Updated 3 min readMarkdown

A dashboard can calculate a precise trend from a bad row. In an RO operating log, the first software job is to preserve what was measured, reject unusable input and show the operator what needs checking. It should not infer membrane damage from one conductivity or flow value.

DuPont's FilmTec technical manual lists feed, concentrate and permeate pressures and flows, temperature and stream conductivity among useful operating records. Those are general examples of measurements needed to interpret a trend. The installed system's instrument layout and membrane documentation still define actual operating limits.

Use explicit units and timestamps

The object below uses bar and UScm in field names so a later reader does not have to guess the units. recordedAt requires a parseable ISO 8601 timestamp with an explicit time-zone offset. A real application should preserve the original instrument value, sample location, calibration status and any conversion separately. Do not silently turn an empty cell into zero.

function validateRoLog(row) {
  const errors = [];
  const warnings = [];
  const fields = [
    "feedPressureBar",
    "concentratePressureBar",
    "feedConductivityUScm",
    "permeateConductivityUScm",
  ];

  if (typeof row.recordedAt !== "string" ||
      !/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(Z|[+-]\d{2}:\d{2})$/.test(row.recordedAt) ||
      Number.isNaN(Date.parse(row.recordedAt))) {
    errors.push("recordedAt must include a parseable ISO timestamp and offset");
  }

  for (const field of fields) {
    if (typeof row[field] !== "number" || !Number.isFinite(row[field])) {
      errors.push(`${field} must be a finite number`);
    } else if (row[field] < 0) {
      errors.push(`${field} cannot be negative`);
    }
  }

  if (errors.length === 0 &&
      row.feedPressureBar < row.concentratePressureBar) {
    warnings.push("Check pressure locations or instrument readings");
  }

  return { ok: errors.length === 0, errors, warnings };
}

const sample = {
  recordedAt: "2026-11-13T09:00:00+08:00",
  feedPressureBar: 12,
  concentratePressureBar: 11,
  feedConductivityUScm: 1200,
  permeateConductivityUScm: 25,
};
console.log(validateRoLog(sample));

The sample values are placeholders for a software test. They are not a BOKAWATER membrane specification or field measurement. The validator checks types, finiteness, negative entries and a basic pressure-location warning. It does not set cleaning triggers, calculate rejection or assert that a membrane has failed.

Keep data quality separate from diagnosis

An operator may choose to investigate a pressure warning, but the code cannot know whether gauges refer to the same stage or whether a sensor is out of calibration. A production system should store both the warning and the operator's resolution. It should also require a stable baseline, paired stream samples and the selected equipment's operating instructions before any diagnostic recommendation.

One practical test is to remove a required reading from a sample row: the validator returns an error instead of plotting an apparent zero. Another is to swap two pressure readings: it returns a warning without deleting the row. That distinction keeps bad data visible and avoids turning a dashboard alert into an unsupported equipment decision.

Technical reference: DuPont, FilmTec Reverse Osmosis/Nanofiltration Membranes Technical Manual, record keeping and troubleshooting: https://www.dupont.com/content/dam/water/amer/us/en/water/public/documents/en/RO-NF-FilmTec-Manual-45-D01504-en.pdf

Disclosure: I work on BOKAWATER water-treatment content. It is a general software example, not a claim about BOKAWATER equipment or a solicitation.

No comments yet. Be the first to comment.