Available in xls and ods formats. Click to see larger graphic

[Assumptions] [Download] [Background] [Student Handout] [Frequently Asked Questions]

The purpose of this simulation is to compare three methods of least-squares curve fitting to absorption spectrophotometry calibration curves with varying degrees of non-linearity due to polychromaticity and unabsorbed stray light (see Background information, below). The operation is similar to "Instrumental Deviation from Beer's Law"; it computes the measured absorbance and plots the analytical curve (absorbance vs concentration) for a simulated series of absorber concentrations measured in a simulated absorption spectrophotometer with variable spectral bandpass and unabsorbed stray light. You control the maximum absorptivity, path length, half-width of the absorber, the slit width of the monochromator, and the percent stray light. (Number wheels below each of these parameters allow you to change the values quickly without typing. The analytical curves change dynamically as the variables are changed). The calibration curve is fit using three different least-squares methods, shown from left to right:

- A first-order (straight line) fit of measured absorbance A (y-axis) vs concentration C (x-axis). The model equation is A = slope * C + intercept. The is the most common and straightforward method, but it obviously can not compensate for non-linearity. This fit is performed using the SLOPE and INTERCEPT functions (on Sheet2 of the spreadsheet, in cells G51, G52, and G53). The concentration of unknown samples is given by (A - intercept) / slope where A is the measured absorbance and slope and intercept from the first-order fit. If you would like to use this method of calibration for your own data, download a fill-in-the-blanks worksheet, in Excel or OpenOffice Calc format.
- A quadratic fit of
measured absorbance A (y-axis) vs concentration C (x-axis). The
model equation is A = a*C
^{2}+ b*C + c. This fit is performed using the LINEST function (on Sheet2 in cells E57-G57). The concentration of unknown samples is calculated by solving this equation for C using the classical "quadratic formula", namely C = (-*b*+SQRT(*b*^{2}-4*a*(*c*-A)))/(2**a*), in cells E58:N58, where A = measured absorbance, and a, b, and c are the three coefficients from the quadratic fit. If you would like to use this method of calibration for your own data, download in Excel or OpenOffice Calc format. - A reversed cubic fit
of concentration C (y-axis) vs measured absorbance A
(x-axis). The model equation is C = a*A
^{3}+ b*A^{2}+ c*A + d. This method reverses the usual order of axes in order to avoid the need to solve a cubic equation when the calibration equation is solved for C and used to convert the measured signals of the unknowns into concentration. (This sort of short-cut is commonly done in least-squares curve fitting, at least by non-statisticians, to avoid mathematical messiness). This fit is performed using the LINEST function (on Sheet2 in cells E73-H73). The concentration of unknown samples is calculated directly by a*A^{3}+b*A^{2}+c*A+d, where A is the measured absorbance, and a, b, c, and d are the four coefficients from the cubic fit. If you would like to use this method of calibration for your own data, download in Excel or OpenOffice Calc format.

View
Equations (.pdf)

Download Version 1: in
OpenOffice format (.ods); in Excel format (.xls)

Download Version 2 (includes selection of absorbance or
transmission) : in OpenOffice
format (.ods); in Excel format (.xls)

Other related spreadsheets:

Worksheets for linear
and non-linear calibration curves for your own data

Instrumental Deviation from Beer's Law

Signal-to-noise ratio of absorption
spectrophotometry

Effect of Slit Width on
Signal-to-Noise Ratio in Absorption Spectroscopy

Error propagation in Analytical
Calibration

The Transmission
Fitting (TFit) Method applies curve fitting to the spectra
rather than the calibration data.

Curve
fitting multiple overlapping peaks

Interactive
Peak Fitter

In absorption spectroscopy, the intensity I of light passing through an absorbing sample is given by the Beer-Lambert Law:

I = I_{o}*10^{-(alpha*L*c)}

where “I_{o}” is the intensity of the light incident on
the sample, “alpha” is
the absorption coefficient of the absorber, “L” is the distance
that the light travels through the material (the path length), and
“c” is the concentration of absorber in the sample. The variables
I, I_{o}, and alpha
are all functions of wavelength; L and c are scalar. In
conventional applications, measured values of I and I_{o}
are used to compute the absorbance,
defined as

A = log(I_{o}/I)

Ideally, absorbance defined in this way is proportional to
concentration, which simplifies analytical calibration. A plot of A
vs C is called the analytical
curve or the calibration
curve.It's important to understand that the "deviations" from the Beer-Lambert Law discussed here are not actually failures of this law but rather apparent deviations caused by failures of the measuring instrument to adhere to the conditions under which the law is derived. The fundamental requirement under which then Beer-Lambert Law is derived is that every photon of light striking the detector must have an equal chance of absorption. Thus, every photon must have the same absorption coefficient alpha, must pass through the same absorption path length, L, and must experience the same absorber concentration, c. Anything that violates these conditions will lead to an apparent deviation from the law.

For example, any real spectrometer has a finite spectral resolution, meaning that the intensity reading at one wavelength setting is actually an average over a small spectral interval. Specifically, what is actually measured is a convolution of the true spectrum of the absorber and the instrument function (or "slit function"). If the absorption coefficient alpha varies over that interval, then the calculated absorbance will no longer be linearly proportional to concentration. This is called the “polychromicity” error and it results in a gradual concave-down curvature of the analytical curve.

Another source of instrumental non-ideality is stray light, which is any light striking the detector whose wavelength is outside the spectral bandpass of the monochromator or which has not passed through the sample. Since in most cases the wavelength setting of the monochromator is the peak absorption wavelength of the analyte, it therefore follows that any light outside this spectral range is less absorbed. The most serious effect is caused by stray light that is not absorbed by the analyte at all; this is called unabsorbed stray light. This effect also leads to a concave-down curvature of the analytical curve, but the effect is relatively minor at low absorbances and increases quickly at high absorbances. Ultimately, unabsorbed stray light results in a flat plateau in the analytical curve at an absorbance of -log(fsl), where fsl is the fractional stray light.

There are two other potential sources of deviation that are actually not so serious in laboratory applications of absorption spectrophotometry, because they are relatively easily avoided: those are unequal light path lengths and unequal absorber concentration across the light beam. In most laboratory applications, the samples are measured in square cuvettes to insure a constant path length for all photons. (When round test-tube sample cells are used, the light beam passing through the sample is restricted to the central region of the sample tube in order to minimize this effect). Solution samples are carefully mixed before measurement to insure homogeneity.

The simulation here includes the polychromaticity and unabsorbed stray light errors (but not the path length and sample inhomogeneity errors, because they are seldom important in laboratory practice). The simulation operates like any numerical integration, by slicing up the spectral range viewed by the detector into a large number of small slices and assuming that the Beer-Lambert Law applies over each small slice separately. The sample absorption is represented in this simulation by a single absorption band of either Gaussian or Lorentzian shape (selectable by the user) and adjustable width. The spectral bandpass of the monochromator is represented by a triangular function of adjustable width. Then all the separate slices are summed up to represent the incident and transmitted light signal measured by the detector. As it turns out, one does not need to use very many slices to obtain a good model of the operation of a typical absorption spectrophotometric measurement.

Student handout. Note: Instructors are encouraged to copy, paste, and edit this material as needed to customize for their own terminology and instructional aims.

In the quadratic method, the measured absorbance A (y-axis) vs concentration C (x-axis) is fit to a quadratic model, A = aC

In the "reversed cubic" fit, the measured absorbances of the standard solutions are treated as the independent variable and the concentrations of the standard solutions are treated as the dependent variable. Then the calibration data set is fitted to a cubic equation, C = aA

The purpose of this simulation is to discover which of these methods is best able to fit the kind of non-linearity that results from the polychromatic and stray light errors in absorption spectroscopy. Moreover, the simulation can demonstrate how the use of a curvilinear fitting methods can influence the optimum choice of slit width and spectral bandpass.

1. Start the experiment with a nearly ideal case. Set wavelength = 500 nm, spectral bandpass = 10 nm, absorber width = 200 nm, maximum absorptivity = 4, path length = 1 cm, unabsorbed stray light = 0; maximum concentration = 10, no photon or detector noise (both boxes unchecked) and Gaussian peak shape. You can see that the ideal absorbances (red line), the measured absorbances (blue dots), and the least-squares fit (blue line) are essentially identical, even at the highest concentrations (where the absorbance is 4), showing that the instrument readings follow Beer's Law. The concentration prediction error plots below each calibration curve show almost no error due to curve-fitting and the "σ of errors" is zero in all cases. In this case the linear curve-fit methods works perfectly, so you really don't need to use more complicated methods.

2. Unabsorbed stray light limit only. Leave the settings as they were, except increase the unabsorbed stray light to 0.1%. Now you can see some serious non-linearity at high absorbances, caused by the stray light, as the absorbance approaches the plateau at 3.0 absorbance. Right away, you can see that the straight-line fit fails badly, and that the quadratic and cubic fits are a little better but not perfect. The "σ of errors" number at the bottom provides a quick single-number comparison: the curvilinear methods do a little better than the straight-line fit, but even the cubic fit does not do a very good job if fitting the curvature in this case.

3. Effect of spectral bandpass. Leave the settings as they were in #2, except reduce the absorber width to 100 nm. Then increase the spectral bandpass step-by-step and watch what happens. You can see the slope of the analytical curve decreases slightly as spectral bandpass increases. Why? This is caused by the polychromatic light effect, as the increasingly wide spectral bandpass includes wavelengths where the analyte's absorptivity is lower.

4. Effect of random noise. But there is another reason why the best results in absorption spectroscopy are not always obtained at the smallest slit width: noise. This aspect is explored in more detail in the simulations "Effect of Slit Width on Signal-to-Noise Ratio in Absorption Spectroscopy" and "Signal-to-noise ratio of absorption spectrophotometry". The present simulation includes two of the most commonly-encountered types of noise: photon noise and detector noise. Photon noise (often the limiting noise in instruments that use photomultiplier detectors) is proportional to the square root of light intensity. Detector noise (often the limiting noise in instruments that use solid-state array detectors such as CCD and CID detectors) is independent of the light intensity. These sources of noise can be introduced into the simulation by clicking the check boxes under "Random Noise". When either of these types of noise is included in the simulation, these noises will be added to the incident and transmitted intensities (Izero and I, respectively) from which the absorbances are computed, resulting in some random variation in the measured absorbances within one calibration curve and between recalculations of the spreadsheet (press f9 to recalculate). The relative effect of the noise depends strongly on the slit width and the spectral bandpass: at small slit widths, the values of Izero and I are both low, resulting in poor signal-to-noise ratio and a high random variation in measured absorbance. As the slit width increases, the intensities increase and the signal-to-noise ratio improves, resulting in less random variation in measured absorbance, but also the slope of the analytical curve decreases, which reduces the effect of stray light but increases the effect of polychromatic light. The net effect is that there is an optimum range of slit widths that is the best trade-off between poor signal-to-noise ratio at the low end and unacceptable non-linearity at the high end. This optimum slit width usually corresponds to a spectral bandpass roughly equal to the width of the absorption peak, depending upon the type of noise and the curve fitting method used.

The effect of noise can be dramatically demonstrated by setting wavelength = 500 nm, spectral bandpass = 10 nm, absorber width = 80 nm, maximum absorptivity = 4, path length = 1 cm, unabsorbed stray light = 0.1%; maximum concentration = 10, and checking the boxes for both photon and detector noise. The calibration curve now shows a substantial degree of random noise in the absorbances, especially at high absorbance where the transmitted intensity (I) is therefore the signal-to-noise ratio is very low. The "σ of errors" number is high for all three curve fitting methods. Now, increase the spectral bandpass and watch what happens. The random noise gradually decreases (because the intensities I and Izero are both increased) and the concentration prediction errors begins to drop. Eventually as the spectral bandpass approaches the absorber width, the calibration curve becomes smoothly non-linear, but its shape is easily modeled by the cubic curve fit. The result is that the concentration prediction error for the straight-line fit starts to go back up at high spectral bandpass, but for the cubic fit, it continues to drop down to near 0.1%.

Conclusion: The most common sources of deviation from Beer's Law, stray light and polychromatic radiation, lead to concave-down non-linearity in the calibration curves, which can be fit approximately (but not exactly) using quadratic or cubic least-squares fits. In most cases, the cubic fit is better that the quadratic. In the case of an extreme unabsorbed stray light plateau, neither method works well.

The theoretical requirement for adherence to the Beer-Lambert Law is that the incident light be monochromatic, which implies that the smallest possible slit width and spectral bandpass be used. Nevertheless, this simulation shows that, in the presence of stray light and random photon or detector noise, a larger slit width and spectral bandpass will give better signal-to-noise ratio and concentration prediction error, especially if a curvilinear least-squares method (such as the reversed cubic method) is used to fit the calibration data.

(c) 1991, 2015. This page is part of Interactive Computer Models for Analytical Chemistry Instruction, created and maintained by Prof. Tom O'Haver , Professor Emeritus, The University of Maryland at College Park. Comments, suggestions and questions should be directed to Prof. O'Haver at toh@umd.edu.

Number of unique visits since May 17, 2008: