Stop Losing NIR Accuracy in Sample Prep: A Grain and Feed Handler's Guide to Every Sample Type
Master NIR sample preparation for food and feed analysis. Learn how to handle solids, liquids, and powders for consistent, accurate NIR results.
Why NIR Sample Preparation Determines Your Results
Here's the thing — when I visit a plant and the NIR numbers don't line up, the first thing I look at isn't the instrument. It's not the calibration either. It's whoever prepped the last sample. Across dairy processors, oilseed crushers, feed mills, and grain elevators, the pattern repeats itself constantly: the instrument is fine, the calibration is fine, but nobody wrote down exactly how to fill that sample cup — and nobody's checking whether the morning shift does it the same way as the afternoon shift. That gap between what you intend to measure and what you actually present to the instrument is where accuracy is won or lost. Understanding where NIR spectroscopy succeeds and where it fails starts with recognizing that most prediction errors trace back to sample handling, not instrument performance.

What Inconsistent NIR Sample Prep Actually Costs You
At a milling and baking facility I worked with, the team was getting moisture predictions with a standard error they couldn't explain. The instrument was fine. The calibration was fine. The problem was that different operators were packing the sample cup differently — loose one time, dense the next. That inconsistency showed up directly in the data. It took three weeks to find because nobody thought to look at packing procedure first.
These errors compound fast. A moisture prediction off by 0.5% in a flour stream can mean overuse of conditioning water, failed bake tests, or product returned from a retail customer. In high-volume operations, that kind of recurring error costs thousands of dollars per week before anyone identifies the root cause. And that's before you factor in the lab time spent chasing a problem that was never about the instrument.
In grain receiving, the cost profile is different but equally painful. A protein prediction error of 0.3% in incoming wheat — caused by measuring a non-representative grab sample — can result in wrong segregation decisions across hundreds of tonnes of grain. At commercial protein premiums of $5–$10 per tonne, a single day of mis-sorted loads easily reaches five figures in avoidable loss. These aren't theoretical scenarios. They're the predictable outcome of treating sample preparation as an afterthought.

Present a representative, consistent, and reproducible sample to the instrument every time. That single discipline determines whether your results are trustworthy.
How to Handle Different Sample Types in NIR Analysis
Samples vary widely — granular feeds, whole grains, viscous oils, fine powders, liquid dairy streams. Each type requires a different approach. What works for a ground feed sample won't work for a fat measurement in a dairy process line. Think of it like tuning a radio: the signal is there, but if your antenna isn't positioned correctly for the frequency, you get static no matter how good the receiver is. The sections below cover the most common sample categories and the preparation steps that matter most for each one.

Solid Samples: Grinding, Cutting, and Pressing for Consistency
- Grinding: For bulk solids like grains and compound feeds, grinding reduces particle size and improves homogeneity. The NIR light interacts with a more uniform material. Avoid over-grinding — frictional heat changes moisture content and can alter the chemistry being measured.
- Cutting: For irregularly shaped materials — cuts of meat, pieces of fruit — precise cutting exposes a consistent surface and creates a manageable geometry for the instrument window.
- Pressing: For powders or ground material in diffuse reflectance mode, pressing into a pellet creates a smooth, uniform surface. It reduces scattering variation and improves scan-to-scan reproducibility.
Watch out: Over-grinding solid samples introduces frictional heat that changes moisture content and can alter the chemistry of the sample — corrupting results before anything is measured.
Grinding Standards That Actually Protect Your Data
Grinding is where the most silent errors enter a dataset. At feed mills, the same grinder used for sample preparation is often also used for production — meaning the screen size and grinder condition vary day to day. The consequences are direct: a 0.5 mm versus 1.0 mm grind screen produces samples with very different surface area, different light penetration depth, and different apparent absorbance, even when the underlying chemistry is identical. Your calibration was built on one particle size. Feed it a different one and it's comparing apples to oranges.

Best practice is to dedicate a laboratory grinder exclusively to sample preparation and to log screen size, grinding duration, and sample temperature after grinding as part of the sample record. For moist or high-fat materials such as wet distillers grains or full-fat soy, pre-dry to below 14% moisture before grinding to prevent caking and uneven particle size. Where pre-drying isn't feasible, the protocol should specify grinding in short bursts with a cooling interval to keep frictional heat below 40°C.
Particle size targets vary by application. For most ground feed materials, a 1 mm screen produces acceptable performance. For fine powders like wheat flour or skim milk powder, no additional grinding is needed — but monitor the baseline particle size of incoming material, because changes in upstream milling propagate directly into prediction error downstream. Your QC records should flag any shift in raw material grind before it becomes a calibration problem.
Liquid Samples: Path Length, Temperature, and Flow Cells
- Cuvettes and path lengths: Use the correct cuvette with a known, consistent path length. Even a small variation in path length shifts absorbance values directly. This isn't optional.
- Temperature control: Temperature affects viscosity, density, and hydrogen bonding — all of which shift the spectrum. In plants without temperature-controlled sample areas, the protocol must account for this explicitly.
- Flow cells: In processing environments — dairy lines, oilseed extraction, liquid feed systems — flow cells allow continuous, real-time measurement. A constant stream of sample passes through the beam, providing immediate process feedback without stopping the line.
Field tip: Always bring liquid samples to a consistent temperature before measuring. Even a 3–5°C difference can shift the spectrum enough to throw off a tightly calibrated model.
Liquid Sample Handling: What the Numbers Tell You
Temperature management in liquid measurement isn't a minor detail — it's a calibration variable. Water has strong NIR absorption bands near 1450 nm and 1940 nm, and the shape and position of those bands shift measurably with temperature. A dairy plant measuring fat and protein in whole milk at 20°C versus 25°C will see absorbance shifts large enough to produce prediction errors of 0.1–0.3% fat if temperature compensation isn't built into the calibration model or controlled in the protocol. That's a meaningful error when your fat spec has a tolerance of ±0.2%.

For at-line liquid measurements in a production environment, the most reliable approach is a temperature-controlled cuvette holder set to 20°C or 40°C, with the temperature logged for each sample run. Inline flow cell installations on dairy and oilseed processing lines largely eliminate this problem by measuring the product stream at process temperature — as long as the calibration was developed at matching temperatures. For facilities exploring inline measurement, the principles of real-time inline NIR monitoring in dairy processing show how flow cell geometry and temperature stability are engineered into the measurement point rather than managed manually.
Path length selection for liquids follows a straightforward rule: shorter path lengths for strongly absorbing materials like whole milk or high-fat emulsions, longer path lengths for dilute aqueous solutions or low-absorption liquids. A 0.1 mm path length cell is standard for whole milk fat measurement; a 1–2 mm path length is more appropriate for whey or skim fractions. Using the wrong path length doesn't just shift the signal — it can push the measurement outside the linear range of the calibration entirely. That's not a calibration problem. That's a protocol problem.
Powder Samples: Particle Size and Packing Density
Powders are where the most inconsistency appears at feed mills and flour operations. Different particle size fractions settle and separate, and how the sample cup is packed changes what the beam actually sees.
- Sieving and mixing: Achieve a consistent particle size distribution through sieving, then mix thoroughly before presenting to the instrument.
- Consistent packing: Loose packing versus dense packing changes light scattering and penetration depth. Define a standard packing procedure and follow it every time. Some instruments use spinning sample cups to average out remaining inhomogeneities during the scan — a practical workaround when particle size is variable.
Powder Measurement: Controlling the Variables That Shift Your Spectrum
For fine powders such as skim milk powder, soy protein isolate, or premix blends, the primary variables to control are particle size distribution, packing density, and surface smoothness. Of these, packing density is the one most frequently left to individual operator judgment — and the one with the most direct impact on repeatability. Quality managers often ask me why their repeat scans on the same sample drift. Nine times out of ten, someone re-packed the cup differently between runs.

A structured packing protocol should specify a defined sample mass — typically 15–25 g depending on cup geometry — a fixed number of taps or a tamping weight, and a leveling step to create a flat, reproducible surface. Document it with photos if you have to. If your lab has three operators and no written packing procedure, you effectively have three different sample prep methods running in parallel — and your calibration can only account for one of them. That inconsistency will show up in your prediction residuals long before anyone thinks to look at the sample cup.
One failure mode I see specifically in pet food and premix operations: operators scooping directly from the bag without homogenizing first. Fines settle to the bottom during transport. The top of the bag and the bottom of the bag are not the same material, spectrally speaking. Always mix the bulk sample before taking the sub-sample for the cup. It takes 30 seconds. The alternative is chasing unexplained prediction scatter for weeks.
NIR Sample Prep GuideSpectroScience students get access to the NIR Sample Prep Guide — particle size, moisture, temperature, and presentation requirements for consistent NIR results. Available as a free download in the student resource library.
Access the PDF libraryNIR Fundamentals Course — Lesson 25: Sample Preparation
This lesson focuses on the critical aspects of sample preparation, emphasizing the importance of consistent methods for different sample types. It provides practical guidance on how to establish and maintain protocols that ensure accurate and repeatable results in NIR analysis.
Explore Lesson 25 in the NIR Fundamentals courseWant to Master NIR Spectroscopy?
Our 32-lesson online course covers everything from Beer-Lambert Law to PLS calibration — built for food, grain, feed, and dairy professionals.
Continue learning: NIR Spectroscopy Training Online | NIR Fundamentals Course — 32 Lessons