How to Develop NIR Property Models that Work

By Ara Barsamian

Today's blending environment could be a nightmare from the point of view of blend calculations.

Because the above situation is quite common, and most users of NIR analyzers do not properly prepare the property prediction model, most NIR analyzers are not in use primarily because the models are not robust and "act up" by providing erroneous readings.

So how do you get robust property prediction models for the NIR (or NMR or Raman) analyzer which work no matter what crude feed diet you run, or upsets that occur at the process units, and with opportunistic purchases of blend components?

The Solution?  Extreme Recipe Modeling to Cover the Property Envelope.

What that means is that you have to make HAND BLENDS for EACH GRADE of gasoline (applies equally to other fuels, such as diesel), for each seasonal grade, including transitions, and using "Extreme" recipes (e.g., one with and one without butane, or with and without MTBE, large changes in use of reformate, etc.).  You can get these from the recent (one year) historical blend data.  If you anticipate ethanol blends, do hand blends and include the spectra in the model.

These hand blends are done so that we don't have to wait for months to get to the right season to get samples to build the model.  The hand blends are used to build the initial NIR property prediction models, so this work must be done before the installation, start up and commissioning of the field NIR analyzer (using a lab NIR).

So, let's take an example.

Assume we make three conventional gasolines (i.e., regular, mid-grade, premium), covering three seasonal changes (Summer, Winter, transition), and we have a total of six extreme recipes/grades.  Thus, we need to make 3 x 3 x (6 x 3) = 54 hand blends.

These 54 hand blends get divided into three equal parts:  one is analyzed by the refinery lab using ASTM methods and also taking the sample NIR spectra with the lab NIR, and the other two are analyzed by two independent labs using the conventional ASTM test to insure that we have two out of three matches in analysis results (we pick the results that are within one ASTM reproducibility).  This assumes that all three labs are members of a recognized round-robin proficiency testing group, and that their performance is in the upper third.  If the results are far off, we have to worry about the quality assurance procedures at the three independent labs!

If we frequently buy a blendstock (e.g., LCN or reformate), if its critical properties are within 3-5% of the refinery equivalent, we can get away without a hand blend; otherwise, we have to go through the additional work.

Blendstock component tanks are analyzed infrequently (e.g., once a week, if at all).  Most of these component tanks are "running" tanks that are filling with rundowns at the same time that they feed the in-line blender.  If you analyzed the tanks a week ago, the components measured are long gone, and you are "guessing" that the data is the same ... which, for many reasons, (e.g., feed changes, unit problems, purchased feedstock, temperature variations, stratification, rain or snow, etc.) is not.  If the process unit operators take a rundown sample once a shift and the results are entered in the LIMS system, you have enough data to determine if the variability will be a problem.  If the numbers show that, then you might want to consider measuring the blend component properties in the piping from tanks to the in-line blender.  The most suitable and economical way to measure blendstock component properties (once every 30 minutes to once an hour) is by using a multiplexed fiber optic channel NIR analyzer.

Finally, a new type of Chemometric property modeling software uses additional math tricks like cluster analysis and spectral topological analysis to increase the "robustness" of the predition, but only if the initial model covers a reasonable property envelope.

How do you know if the model is in trouble?  Use a "Delta" chart plotting the difference between NIR reading against the lab analysis when you certify a finished blend.  This is not extra work; the sample comes either from the finished product tank or an automatic composite sampler.

The "Delta" chart upper and lower control limits are the ASTM reproducibility limits (providing 95% confidence limits, or not more than one outlier out of 20).  If there is one outlier in 20 successive measurements, the model is OK; if there are two or more "outlier" readings in a string of 20 successive measurements, the model needs updating.

In the same manner, you need to calculate potential biases in the model, i.e., making sure you don't have roughly either successive identical delta values.


1.  ASTM D2885 "Standard Test Method for RON and MON Rating Using On-line Analyzers."

2.  ASTM Dxxxx D02 Committee Workgroup draft of "Standard Guide for Establishing and Validating the Relationship Between Analyzer and Primary Test Method Results Using Relevant ASTM Standards Practices."