Measurement & Control Measurement & Control
Connectivity & Communication Connectivity & Communication
Insights & Action Insights & Action
Collaboration & Support Collaboration & Support
{{title}}
Contact a Customer Care Representative

We’ll get back to you within 24 hours or the following business day.

Find a distributor
Our extensive global network of distributors is ready to serve you in your local language at your time zone.

We're here to help
Contact a Customer Care Representative

We’ll get back to you within 24 hours or the following business day.

Find a distributor
Our extensive global network of distributors is ready to serve you in your local language at your time zone.

January 1, 0001

Chemometrics Explained: The Hidden Intelligence Behind Water Quality Sensors

Over the past 25 years, online sensors that use the absorbance of light to test water have changed how we measure water quality. They give real-time readings for things like nitrate, dissolved organic carbon (DOC) and oxygen demand (e.g. COD and BOD). But the sensor’s optics only collect raw light data. The step that turns that data into a useful number is called chemometrics, and it’s where the real differences between sensors show up.
spectro-lyser sitting in front of fountain

What Chemometrics Does

A sensor like the spectro-lyser emits light through a water sample and measures how much of that light is absorbed at 256 different wavelengths at once. The result isn’t a nitrate reading. It’s more like a unique fingerprint that several substances have left on top of each other, and it looks very different from one body of water to the next (Figure 1).

Chemometrics is the math that separates those layered fingerprints. Scientists build a model by pairing sensor readings with results from real laboratory tests. The model learns to “translate” a fingerprint into actual concentrations.

Figure 1: Raw Absorbance Data Across Water Types

UV-Vis spectral fingerprints from nine water samples showing variations in spectral patterns across different water conditions.

Raw sensor readings from a selection of Austrian surface waters, from very clear to very cloudy. The shapes vary enormously from one water body to the next.

The Problem of Cloudy Water

The biggest complication is turbidity. Particles scatter light and add their own signal, which the sensor can mistake for the species we want to measure. This causes three problems:

  1. Overstated Readings: Lab tests filter the water first, so they measure only what has dissolved. A sensor that reads unfiltered water can mistake particles for the target parameter.
  2. Hidden Nitrate Signals: Nitrate absorbs light in the same range where particles scatter it most, so the two signals overlap.
  3. Signal Loss: Cloudy water can limit light transmission to the point that no signal can be recovered. That’s a physical limit, not a software flaw

Many instruments handle cloudiness with a simple shortcut. They subtract a single reference reading, using a fixed correction factor [1]. But the right correction isn’t fixed. It changes as the water gets cloudier and as the size of the particles changes [4, 5]. A factor that works in clear water will over- or under-correct when conditions shift.

The spectro-lyser looks at the entire fingerprint and adjusts continuously instead. In field tests, it matched lab results very closely for a common organic-matter measure (UV254), while a fixed-correction instrument at the same site read increasingly too high. (The full results are in our article on optimizing coagulant dosing [6].)

Why Calibration Expertise Matters Most

Getting the physics right isn’t enough. The model also has to be tuned to the kind of water it’s measuring, and a model built for one type of water doesn’t carry over well to another. Independent research found that once a method was tuned to a specific water source, even a simple one could perform well, while a one-size-fits-all setup consistently fell short [2].

Figure 2 shows this. We ran the same sensor data through two nitrate models. The one tuned to the right type of water matched lab results very well (R² = 0.98, where 1.0 is a perfect match). The one built for a different type of water gave poor, misleading results (R² = 0.59).

Figure 2: UV-Vis Nitrate Calibration Comparison (Water-Specific Model)

Nitrate calibration scatter plot showing strong correlation between sensor readings and laboratory results using a water-specific chemometric model, R squared equals 0.98. Nitrate calibration scatter plot showing weaker correlation between sensor readings and laboratory results using a model developed for a different water type, R squared equals 0.59.

Same sensor data, two models. Left: the model tuned to this water type. Right: a model built for a different water type.

Since 1999, s-can, now Badger Meter, has built and refined models for drinking water, wastewater, surface water and industrial sites around the world. This know-how is as important as the hardware. Once a sensor is installed, its model can be fine-tuned to the site in a simple, predictable way. We also avoid changing our models too often. A model that stays reliable across seasons and conditions is better than one that keeps chasing small improvements and ends up fitting short-term quirks rather than real patterns.

How Accurate is “Accurate”? Even the Lab Results Vary

It’s tempting to treat a lab result as the exact truth and judge a sensor by how closely it matches. But labs disagree with each other too, and international standards exist precisely because of this [3].

To test this, we had two independent, accredited labs measure nitrate in the same stored water samples on the same day. These were samples our model had never seen before. The two labs agreed only moderately (R² = 0.80). Poor sample handling is an unlikely cause. More likely, the two labs use different methods; for example, one may use ion chromatography (IC) and the other colorimetry.

We can’t be sure of the exact cause, but the lesson holds either way. Part of the gap between a sensor and “the lab value” may not be the sensor’s error at all. It may just reflect how much labs differ from one another. Building and checking models with that in mind, rather than chasing a perfect match to one lab, is part of what 25 years of experience teaches.

Figure 3: Comparing Laboratory Nitrate Measurement Results

Scatter plot comparing nitrate measurements from two independent laboratories, showing moderate agreement between results, R squared equals 0.80.

Agreement between two independent laboratories measuring nitrate in the same samples.

Where Chemometrics Reaches Its Limit

Some substances can’t be measured with this kind of sensor, and it’s important to say so. Nitrate and organic matter absorb light directly, so the sensor has a real signal to work with. Phosphate and ammonium don’t absorb light in this range at all.

A sensor that reports these two isn’t really measuring them. It’s estimating based on other substances in the water that happen to rise and fall alongside them at that particular site. These guesses can look convincing at first, but they fall apart when the pollution source, the season or the treatment process changes, often with no warning. For that reason, Badger Meter doesn’t offer phosphate or ammonium readings from these sensors. A measurement the sensor can’t physically make shouldn’t be presented as one.

Three Questions to Ask Any Sensor Vendor

  1. How does the instrument handle cloudy water? Does it use one fixed correction, or does it use the whole fingerprint? A fixed correction assumes particles always behave the same way, which isn’t true in practice.
  2. Is the model generic, or tuned to my type of water? A model that works well on the vendor’s test water may not work on yours. A calibration based on wet standard solutions, isn’t really ensuring that the sensor matches lab results in the real sample. Ask how recalibration works and how they developed their calibrations.
  3. For each reading, is the sensor measuring something real or relying on a correlation? Nitrate and organic matter can be measured directly. Phosphate and ammonium can’t, so any reading for them is an educated guess that won’t hold up if your water changes.

The Bottom Line

The optics collect the light, and chemometrics makes sense of it. What makes the results trustworthy is 25 years of experience tuning models to real water and an honest view of what “accurate” can mean. That’s what Badger Meter offers: correction for cloudy water across the whole spectrum, models tuned to each site, clear limits on what can be measured and the expertise to tell a real measurement from a statistical coincidence.

Sources

[1] DIN 38404-3. German standard methods for the examination of water, wastewater and sludge. Physical and physico-chemical parameters (group C), Part 3: Determination of absorption in the range of the ultraviolet radiation, spectral absorption coefficient.

[2] Shi, Z., Chow, C.W.K., Fabris, R., Liu, J., Jin, B. (2020). Alternative particle compensation techniques for online water quality monitoring using UV–Vis spectrophotometer. Chemometrics and Intelligent Laboratory Systems, 204, 104074.

[3] ISO 5725-2. Accuracy (trueness and precision) of measurement methods and results, Part 2: Basic method for the determination of repeatability and reproducibility of a standard measurement method.

[4] Huber, E., Frost, M. (1998). Light scattering by small particles. J Water SRT – Aqua, 47(2), 87–94.

[5] Mie, G. (1908). Beiträge zur Optik trüber Medien, speziell kolloidaler Metallösungen. Annalen der Physik, 25, 377–445.

[6] Badger Meter (7 July 2025). Optimize Coagulant Dosing with Accurate UV254 and Color Measurement. The Insider Blog.

Read More

We're here to help
Contact a Customer Care Representative

We’ll get back to you within 24 hours or the following business day.

Find a distributor
Our extensive global network of distributors is ready to serve you in your local language at your time zone.

All Chats Close
Ask a Question
Previous Chats
Your previous chats will be saved here.
    Start a new chat: