Biofuel Industry News

Innovative near-infrared analyzer to measure percentage of biodiesel in fuel oil

May 18 2021

Author: Dr. Raj Shah on behalf of Koehler Instrument Company

Free to read

This article has been unlocked and is ready to read.



Biodiesel analyzers are devices designed to measure the percent of biodiesel in fuel oil. There are three calibration ranges for percentage biodiesel as given in ASTM D7371: low biodiesel which contains less than 10% by volume biodiesel, high biodiesel which contains between 10 and 30% biodiesel by volume, and biodiesel from thirty to a hundred percent by volume. Koehler’s Biodiesel Analyzer provides readings for the low range of 1-11% by volume and the high range of 9-30% by volume using near-infrared (NIR) technology [1]. Other devices use a similar process, but instead focus on the mid-infrared wavelengths to find percent biodiesel by focusing on the fatty acid methyl esters (FAME) content. The main issue with NIR is that each device requires its own calibration, and calibration samples are not only expensive, but also limited in availability. One solution to this issue is to test the viability of creating calibration standards with the use of B-100 biofuel in conjunction with standard diesel. B-100 is pure biodiesel commonly used in mixtures of various rations [7]. The samples were prepared precisely and tested, using the results to model linear best fit lines that provide the constants needed for calibration.

Currently, biodiesel blends are becoming more common due to their large range of uses and applications in the field of diesel. With this increase in usage, the need to test and enforce regulations becomes more important [2, 8-11]. The testing must be quick and non-degrading to the samples to prevent waste and product loss.



Percent Biodiesel

Biodiesel is divided into different classes based on percentage: low-level blends in which the percent biodiesel by volume is under six percent and blends ranging from 6% (B6) to 20% (B20) biodiesel by volume. ASTM D7467- Standard Specification for Diesel Fuel Oil, Biodiesel Blend (B6 to B20) contains the specifications all biodiesels must meet to be used according to regulations for diesel engines. This standard also dictates that all acceptable testing methods for verifying regulations are met including biodiesel content, cetane index, and cetane number. ASTM D975 governs all biodiesel blends containing 5% (B5) or less biodiesel by volume and allows them to be considered diesel, since the concentration does not affect engine compression-ignition in light-duty or heavy-duty engines [6]. Brazil and a few other countries currently have regulations about the B5 or 5% biodiesel added to diesel blend, especially since this policy can be exploited [5].
The Need for and Application of Biodiesel Testing
NIR has already been a proven method to work on gasoline testing and verification at substation level, put in use to find non-compliance with spot and field testing [2, 3]. Brazil has been having a problem with adulteration resulting from cost cutting or incomplete conversion of oils [4]. To combat this, NIR devices have been tested to detect vegetable oil in diesel and biodiesel. A portable NIR and a microNIR were tested to perform quality control with blends and spot field testing in order to limit the prevalence of raw oils in diesel [4]. The device is portable, accurate, fast, and causes no degradation to samples, allowing for field testing to verify concentration as well as the safety of the content [4, 5]. The samples also do not require any pretreating or perorations, so the entire process can be conducted in the field with simply the handheld device and a sample. Although they found that the portable NIR has reduced spectrophotometric characteristics, it was still shown to be fast and precise, even more so then the microNIR, since FT-NIR has better resolution when a regression model is applied [4]. NIR also offers the convenience of being able to test gas, diesel, and biodiesel with the same portable device, minimizing equipment and allowing for faster and more frequent site inspections [1-5].  

Biodiesel in low quantities, between 2% and 5%, is currently being used in ultra-low sulfur diesel (ULSD) to act as a lubricant [7]. There are many other applications where biofuel and biodiesel are being used in new and unexpected ways. All of these applications, however, become dangerous if the biofuel is not properly monitored and regulated. Biodiesel has also seen an increase in use and creation in regions such as Mozambique and British Columbia [8, 10]. The growth in the US is also projected to be great due to current oil consumption trends and access to both ethanol and algae-based biofuels, which are currently being utilized [11]. The growth in many areas of the world coupled with the current problems of cutting corners on the biofuels to cut costs, has resulted in an increased need for monitoring [2, 9]. The testing method alone is no longer important, the real issue is putting the necessary regulations in place and establish adequate field monitoring to keep up with the growth of biofuels.

Near-Infrared Spectroscopy (NIR)
Near-infrared spectroscopy (NIR) operates in the wavelength range of 810 nm to 1045 nm. At these wavelengths, light is readily absorbed by the frequencies of molecular vibration [3]. This results in wide absorptions bands, which can overlap. Multivariable regression is then used on these bands to correlate spectral features since the bands prevent the accurate measurement of peak height [3]. In the case of biodiesel, there are several band overtones that are focused on: 1300 nm to 1400 nm and 1120 nm to 1250 nm for carbon to hydrogen bond stretching, 1160 nm for the carbon to oxygen double bond, and 900 nm for the low intensity carbon to hydrogen stretching [4]. Variable selection can also help improve predictive capability by allowing dedicated photometers with a low number of selected wavelengths [5]. This makes NIR an improvement over mid-infrared spectroscopy partial least squares (PLS) model in accordance with ASTM E1655 [5].


Materials and Methods

Device Specifications
The Koehler Biodiesel Analyzer, Figure 1, is a handheld field device, designed to take a 200 mL sample, contained in a glass sample holder, and test low and high biodiesel percentages, ranging from 1-30%. It is also pre-calibrated for the research octane number (RON), motor octane number (MON), diesel cetane index, and cetane number, but only biodiesel percent was recorded in this study. The device can also be calibrated to work with samples ranging in temperatures from 5˚C to 38˚C. For this experiment, room temperature of about 20˚C was maintained for consistent results. Near-infrared calibration is done on each device individually using calibrated lab standards. The device was further calibrated by using the readings for commonly available diesel fuel, unaltered, as a baseline test.

Biodiesel Samples

Samples were prepared using commonly available diesel fuel as the base and commonly available B-100 biofuel as the additive, for controlled biodiesel percentage readouts. Samples of 250 mL, in each 1%, 5%, 10%, 15%, 20%, 25%, and 30% by volume biodiesel concentrations, were created by adding the calculated volume of commonly available B-100 biofuel and diluting to the required volume with diesel fuel. The volumetric flasks used had a precision of 0.24 mL and the graduated pipettes had a precision of 0.03 mL, both at 20˚C.


Testing Procedure

The prepared samples were then individually poured into the sample holder of the Koehler Biodiesel Analyzer, filled to the line, and tested. Each test started with a measurement of the chamber empty, to act as a blank. Then the sample was loaded, run, turned 180˚, and rerun. The double run on each sample allowed for any deficiency or imperfection in the glassware to be negated. This procedure allows for a glass sample holder instead of something more accurate and expensive like a quartz sample holder. This makes the tester more practical, there is a risk for damage present in the field-testing environment, which makes a high-end type of sampler impractical. This double run acts as a substitute to high-end, but fragile equipment. Each test was repeated three times, switching the start position from the right side to left, with each iteration, and the digital readout recorded. The low biodiesel percent by volume was recorded for all concentrations and high biodiesel percent by volume was recorded for all concentrations above 9%. The discrepancy is due to the fact that the high biodiesel percent is designed for ranges from 9% to 30%. The Koehler Biodiesel Analyzer preformed the NIR analysis as well as the multi linear regression and can give results within three minutes of pouring the sample into the sample chamber.


Results & Discussion

The low and high percent biodiesel by volume were recorded for each of the three runs, shown in Figure 2. The average, range and standard deviation of each run set was also calculated. The data was then graphed to find the linear best fit line and the calibrated results were compared with the projected results applying the slope and bias. Then the percent error for the calculated percentage and the calibrated readings were calculated and assessed.



Near-infrared calibration is done on each device individually using calibrated lab standards. For this experiment the standards were created by hand rather than purchased. The made solutions should still allow for an accurate curve due to their precision, although they are only the readouts of the Koehler Biodiesel Analyzer, rather than the NIR spectrum, which can be saved and downloaded from the device for further analysis. The calibration is done using the linear best fit line or K-values, the standard error of calibration (SEC), and the correlation coefficient (CC) [1]. Figure 3 shows the equations for all of the possible best fit lines and their R2 values. The low biodiesel calibration was a simple linear line. This is the standard style for calibrating the slope and bias of a calibration curve. The R2 values indicates it is in the 98 percentile and should be accepted. The high biodiesel calibration had a lower R2 value for the linear best fit of only 81%. This is still the low end of acceptable, but for accuracy’s sake, other best fit lines were applied to the data, the most accurate being the exponential with an R2 of 0.8975 or almost 90%. The small ranges and low standard deviations from Figure 2, also illustrate the precision of the data set.


High Biodiesel Percent Best Fit Lines

The models applied to the high biodiesel percent in Figure 3 were the linear, exponential, logarithmic, and polynomial best fit lines. Each of these styles was chosen because their R2 values were higher than the linear method and very close together all sitting in the 89% range. Traditionally linear curves are used because they are much easier to calculate and can be programed into the device using both a slope and a bias or y-intercept numbers. The Koehler biodiesel Analyzer has a custom setting where these numbers can be input to allow for auto adjustment on future readouts. Using any other model requires an added program or hand/computer computation to apply. This is the reason that the linear result is used, provided that it is close enough to “acceptable”. The slightly large range indicates that the precision of the sets also slightly fluctuates, but the low standard deviations show that this is not by a large amount of the total volume for each set. Overall, the precision could be higher for the high biodiesel percent readings, but it is acceptable. This could be caused by the higher percentage of biofuel slightly separating over time as the samples sat between testing. There was no mixing after the initial combination and rotation of the volumetric flask. Considering that both biofuel and diesel have different densities, it is possible that the suspension started to separate effecting the NIR readings. Further examination of the NIR spectrum and testing on mixtures is needed to evaluate if this is an issue.


Percent Error of Calibrations

The calculated percentage of biodiesel by volume and calibrated reading with percent errors rely on the linear equation in Figure 3,
y = 65.826x + 3.8239

where y represents the calibrated reading and x the concentration percentage in decimal format. Using the average reading on the device, for y, the percentage, x, can also be calculated, and compared to the calibrated reading. Figure 4 shows the results. The percent error was calculated using the absolute value of the difference between the calculated/calibrated and the known divided by the known/calibrated. The percent error is considerable higher for the low concentrations since a slight deviation in a lower concertation makes a much larger difference in percent error calculations. The same process was applied to each of the best fit lines for the high readings.

The equation of the high liner best fit line was
y = 62.514x + 23.627

the high exponential best fit line was
y = 59.224x0.2922

the high logarithmic best fit line was
y = 9.2065 ln(x) + 52.154

and the high polynomial best fit line was
y = -265x2 + 155.26x + 17.443

where y represents the calibrated reading and x the concentration percentage in decimal format, as seen in Figure 3. Applying each of these formulas to find the calculated percentage of biodiesel per volume and the calibrated reading, the percent error can then be calculated. Unlike the low biodiesel percent readings, all of the high biodiesel readings fluctuate in their percent error, with no discernable pattern or standardization, Figure 5. This indicated that none of these best fit lines is a very accurate solution. However, the lack of patterning also shows that although the exponential, logarithmic and polynomial have slightly higher R2 values, they are not a much more reliable source. This means that the slightly higher R2 values is not enough to justify calculating each percentage by hand or computer. It would be much more time consuming for only a slight bit of improvement in some instances. The idea of designing a custom program and programming the device so that the equations could be plugged in for calibration is also much too costly and time consuming. Especially if the time-value of money is compared to the slight gain in accuracy and precision.



Creating biodiesel sample standards from commonly available B-100 biofuel and commonly available diesel, was surprisingly effective. The precision afforded by volumetric flasks and graduated pipettes, allowed for accurate reading and ratios. This is evident by the almost perfect linear best fit line for the low percentage biodiesel by volume. The low percentage exhibits both precision, of the range and standard deviation, and accuracy, in the percent error. The high percentage biodiesel by volume, using the linear best fit line, does not show either the same precision or accuracy, however, it is still within an acceptable range. It is also acceptable since the other models that should be marginally better show no discernable pattern in the range, standard deviation, or percent error calculations, making them a better substitute for the linear model. The better solution may actually be to use the low percentage biodiesel by volume setting for all reading up to 30%, since the range, standard deviation, and percent error reading for the linear best fit line are consistent through 30%. The high percent biodiesel by volume may need further study and evaluation.


Future: A Standard Test Method

The ability to have an accurate calibration for Koehler Biodiesel Analyzer from handmade standards proves that it can be an effective NIR testing method, with each device easily custom calibrated. The low percent biodiesel by volume reading has proved be to accurate, precise, and easily calibrated. There are currently no American Society of Testing and Materials (ASTM) standards for NIR in regards to calculating/reading percent biodiesel by volume.  The Standard Test Methods for determining biodiesel center around Fatty Acid Methyl Esters (FAME) content testing done by mid-Infrared Spectroscopy, such as ASTM D7861-Standard Test Method for Determination of Fatty Acid Methyl Esters (FAME) in Diesel Fuel by Linear Variable Filter (LVF) Array Based Mid-Infrared Spectroscopy and ASTM D7371-Standard Test Method for Determination of Biodiesel (Fatty Acid Methyl Esters) Content in Diesel Fuel Oil Using Mid Infrared Spectroscopy (FTIR-ATR-PLS Method). After careful consideration of current standard methods, they cannot be fully adapted to the NIR device since the difference of both crystal usage and wavelength range render the method analyses incompatible. The goal, as with any new style of testing, is to create a new Standard Test Method for NIR Percent Biodiesel in Diesel Fuel. The process has already been started but can take years to become a viable standard, with precision, bias, repeatability and reproducibility equations.



[1] Shah, Raj, et al. “Use of NIR for Quantitative Analysis of Percent Biodiesel in Diesel Fuel.” Labcompare, 9 Sept. 2019,
[2] Rosenthal, Todd. “Portable Near Infrared Octane Analyzer Use by State Agencies for Checking Compliance at the Service Station Level.” 2 Sept. 1993.
[3] Merberg, Glenn. Evaluation of the ZX101™ Octane Analyzer.
[4] Paiva, Eduardo Maia, et al. “Quantification of Biodiesel and Adulteration with Vegetable Oils in Diesel/Biodiesel Blends Using Portable Near-Infrared Spectrometer.” Fuel, vol. 160, 2015, pp. 57–63., doi:10.1016/j.fuel.2015.07.067.
[5] Fernandes, David Douglas, et al. “Determination of Biodiesel Content in Biodiesel/Diesel Blends Using NIR and Visible Spectroscopy with Variable Selection.” Talanta, vol. 87, 2011, pp. 30–34., doi:10.1016/j.talanta.2011.09.025.
[6] “Biodiesel Blends.” Alternative Fuels Data Center: Biodiesel Blends,
[7] Schmidt, Charles W. “Biodiesel: Cultivating Alternative Fuels.” Environmental Health Perspectives, National Institute of Environmental Health Sciences, Feb. 2007,
[8] Arndt, Channing, et al. “Biofuels, Poverty, and Growth: a Computable General Equilibrium Analysis of Mozambique: Environment and Development Economics.” Cambridge Core, Cambridge University Press, 16 June 2009,
[9] Hausmann, Ricardo. “Biofuels Can Match Oil Production.” Financial Times, Financial Times, 6 Nov. 2007,
[10] Boyd, M, et al. “Biodiesel in British Columbia - Feasibility Study Report.” Biodiesel in British Columbia - Feasibility Study Report | BC Climate Action Toolkit, 5 Mar. 2004,
[11] S. G. Bantz and M. L. Deaton, “Understanding U.S. Biodiesel Industry Growth using System Dynamics Modeling,” 2006 IEEE Systems and Information Engineering Design Symposium, Charlottesville, VA, USA, 2006, pp. 156-161, doi: 10.1109/SIEDS.2006.278731
[] “ASTM D7467 - 20a.” ASTM International - Standards Worldwide,
[] “ASTM D975 - 20c.” ASTM International - Standards Worldwide,
[] “ASTM E1655 - 17.” ASTM International - Standards Worldwide,
[] “ASTM D7861 - 14(2019).” ASTM International - Standards Worldwide,
[] “ASTM D7371 - 14.” ASTM International - Standards Worldwide,


Free to read

This article has been unlocked and is ready to read.


Digital Edition

PIN 25.3 June/July

June 2024

Analytical Instrumentation - Recent Advances In Various Bench Scale Accelerated Oxidative Testing Methods For Fuels - Petrochemical Industry: Anton Paar Solutions Streamline Processes, Reduce H...

View all digital editions


InaLab 2024

Jul 30 2024 Jakarta, Indonesia

Chemical Indonesia

Jul 30 2024 Jakarta, Indonesia

China Energy Summit & Exhibition

Jul 31 2024 Beijing, China


Jul 31 2024 Chengdu, China


Aug 05 2024 Moon Township, PA, USA

View all events