January 1, 0001
Chemometrics Explained: The Hidden Intelligence Behind Water Quality Sensors
The Insider Blog / 9 min read
Find a distributor
Our extensive global network of distributors is ready to serve you in your local language at your time zone.
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
The Insider Blog / 9 min read
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.
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:
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].)
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).
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.
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.
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.
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.
[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.
Find a distributor
Our extensive global network of distributors is ready to serve you in your local language at your time zone.