Method and apparatus for comparing spectra

Abstract: The multiple linear least squares regression method of determining the concentration of an analyte from a spectrum of an unknown mixture containing the analyte is improved. It is known to combine spectra of individual components of the mixture to derive a model which is then applied to the unknown spectrum. In accordance with this invention, first, and possibly higher, derivatives of the unknown spectrum are also generated and included in the derived model.

Description: Technical Field This invention relates to the comparing of spectra such as might be obtained from an atomic emission or infrared spectrometer. More specifically it relates to improved comparison when the unknown spectrum has undergone spectral shift. In particular, the invention relates to a multiple linear least squares regression method for determining the concentration of at least one selected analyte in an unknown sample mixture containing said analyte, comprising the steps of: generating an analyte spectrum of the selected analyte so as to form a matrix of model components, generating a sample spectrum comprising the spectral components of the unknown sample mixture; and computing a first derivative of the sample spectrum. Further, the invention relates to an apparatus for performing a multiple linear least squares regression method for determining the concentration of at least one selected analyte in an unknown sample mixture containing said analyte, comprising: means for generating an analyte spectrum of the selected analyte so as to form a matrix of model components; means for generating a sample spectrum comprising the spectral components of the unknown sample mixture; and means for computing a first derivative of the sample spectrum. Background Art It is often desired to isolate and determine the concentration of a particular element or species contained in an unknown sample. This is conventionally done for molecular species by a spectrometer operating, for example, in the infrared region of the spectrum. More recently, it might be accomplished for elements by an atomic emission spectrometer such as an inductively coupled plasma (ICP) spectrometer. One of the major problems in handling spectral data of this type arises from overlapped responses from various chemical species in the unknown mixture. Such responses may, for example, completely hide the response from the element or species which it is desired to measure. One prior art technique for solving this problem is to separately measure and record the spectral responses of components known or suspected to be in the unknown sample. Coefficients are then selected which are employed to multiply each of the preselected spectral patterns such that, when summed together, they will minimize the root mean square difference between such sum and the spectral data from the sample. For example, in an abstract "A Multiple Regression Procedure for Elemental Analysis at Low Concentrations" by Z. Mencik, P.L. Berneburg and M.A. Short, Advances in X-ray Analysis 18, 396-405 (1974), multiple regression is disclosed for relating x-ray intensities to calibration standards, whereby regression coefficients are used to solve for the contents of elements in unknown samples. Another prior art method is by use of the Kalman filter as disclosed in an article "Some Spectral Interference Studies Using Kalman filtering in Inductively Coupled Plasma-Atomic Emission Spectroscopy" by E.H. van Veen, F.J. Oukes and M.T.C. de Loos-Vollebregt, Spectrochimica Acta 45B, 1109-1120 (1990). This is an iterative process. A set of coefficients is estimated. These coefficients are employed to multiply each data point in the spectrum. The error between the results and each data point is computed. A derivative is then estimated that indicates the direction in which to shift the estimates of the coefficients. Accordingly, there is a successive refinement of the error which, after many iterations, converges. One of the problems with both of the aforementioned methods is that they are computational and time intensive. This becomes a particular problem in the case of ICP atomic emission spectra wherein there might be, for example, data points at 64 discrete frequencies and several unknowns. This would result in the need to solve simultaneously 64 different equations having, for example, 3 unknowns. Another problem with the prior art techniques arises from spectral wavelength shifts in the unknown sample. Such shifts cause the peaks of components in the unknown sample to appear to be at different wavelengths than the previously recorded peaks of the pure components. Such apparent shifts may occur, for example, between instruments and even, with time, in the same instrument. In dealing with this problem, the prior art approach has been to use interpolation. The spectral information is collected at discrete points. If a wavelength shift is required, it is necessary to know what the data is between such points. However, since the amount of interpolation is not known, it is required to successively check the error and iterate. This also is a mathematically and time intensive procedure. U.S. patent No. 5,023,804 (Hoult) discloses comparing spectral data with a standard spectrum by computing a normalized dot product of a sample spectrum and the standard spectrum. The two spectra are weighted by filtering to remove short and long periodicities, the filtering being effected with a triangular wave using a simplified algorithm. U.S. patent No. 4,997,280 (Norris) discloses a spectrophotometric instrument in which rapid scanning causes distortion of the spectrum. A first derivative is determined from the spectrum and multiplied by a constant selected to correct for the distortion. The resulting product values are added to the distorted spectrum to provide a set of corrected values for intensity. The selected constant is determined by comparing data acquired from operation of the instrument at a normally rapid speed and slowly to eliminate the distortion. In an article of Karstang et al. titled "Multivariate Prediction and Background Correction Using Local Modeling and Derivative Spectroscopy", Analytical Chemistry 1991, 63, 767-772, a method is described which uses the generated first derivative of the spectrum of an unknown mixture in order to estimate the background spectrum, i.e. the spectrum of the remaining components of the unkonwn mixture. Said estimated spectrum is then subtracted from the sample data in order to obtain corrected sample data. This corrected data is used to calculate the concentrations of the analytes under consideration by performing a multivariate regression analysis for a given matrix model. SUMMARY OF THE INVENTION According to the invention, a method of the above-mentioned type is characterised by the steps of deriving a matrix model that includes the matrix of model components, wherein the first derivative is added to the matrix of model components to form the matrix model; and applying the matrix model to the sample spectrum so as to yield a parameter representing concentration of the selected analyte in the unknown sample mixture. Further, according to the invention, an apparatus of the above-mentioned type is provided being characterised by means for deriving a matrix model that includes the matrix of model components, wherein the first derivative is added to the matrix of model components to form the matrix model; and means for applying the matrix model to the sample spectrum so as to yield a parameter representing concentration of the selected analyte in the unknown sample mixture. The present invention is based upon multiple linear least squares regression and is especially well-adapted for use with ICP atomic emission spectra. It serves to deconvolve overlapped responses from chemical species in mixtures. It provides improved determinations and lower detection limits. In cases of spectral overlap it also provides automatic background correction and automatic compensation for spectral shift of the unknown spectra. Shift compensation does not require the use of interpolation to correct the wavelength registration of the unknown spectrum. Instead shift compensation is built into the regression routine through the use of first and higher order derivatives of the unknown spectrum. The analyte spectrum is conveniently stored and reused in matrix models for subsequent sample spectra. Advantageously interference spectra are generated and included in the matrix model for each of a plurality of significant spectral interference that may be present in the sample spectrum. Also, "masking" may be employed to ignore or overlook selected regions of the emission spectrum to thereby avoid interfering spectral lines rather than modelling them. The invention also includes apparatus comprising means for effecting steps of the foregoing method. Brief Description of the Drawings Fig. 1 illustrates a modeled interferent in a spectrum simulation; Fig. 2 illustrates an unmodeled interferent in a spectrum simulation; Fig. 3 illustrates an unmodeled but masked interferent in a spectrum simulation; and Fig. 4 illustrates the performance of the method of this invention in a simulation involving both a hidden analyte peak and a shifted spectrum. Best Mode for Carrying Out the Invention Model spectra for individual components in the unknown mixture are collected and stored on magnetic disk for later computer retrieval. These empirical models, once collected, are reusable as long as their shapes accurately represent the spectra of the components to be fitted. The models are treated as vectors and become part of the model. The spectra of unknown mixtures are also collected and stored. The model is then applied to the unknown spectrum using multiple linear least squares regression. The value of each component of the model is adjusted to minimize the squared residual error. As with the Kalman filter, the flatness of the residuals plot of a least squares fit is an indicator of the validity of the model. A successful fit has a flat residuals plot with only the noise of the measurement superimposed. If a model is applied to an unknown spectrum containing a component not included in the model, the residuals plot will show structure instead of the expected flat line. This may be used as a flag which warns the experimenter to include the appropriate additional components in the model. The scalar RMS residual can also be used as a criterion of the quality of the fit. In accordance with the present invention, numerical derivatives of the unknown spectrum are included in the model to compensate for spectral shift of the unknown spectrum. The derivatives themselves act as models of the residual error incurred when spectral shift is present in the unknown spectrum. In other terms, a Taylor series expansion (a derivative series) of the shifted unknown can be used to model the desired unshifted unknown spectrum. The use of higher order derivatives in the model can improve the estimate of each analyte due to the greater tolerance of such a model to spectral shift. The model under consideration may be written in matrix notation as: Y=Xβ+E where Y is an (nx1) vector of observations (unknown spectrum); X is an (nxp) matrix of known form (model components); β is a (px1) vector of parameters (coefficients); E is an (nx1) vector of errors (residuals); n=number of wavelength positions; and p=number of components or unknowns. The least squares estimate of β is the (px1) vector b which, when substituted for β in equation (1), minimizes the error. The solution is given as: b=(X T X) -1 X T Y where the superscript T indicates the transpose operation and the superscript -1 indicates the inverse matrix operation. In this fashion, a first derivative component is added to the matrix X. If the shift correction technique is applied in cases where the analyte peak is free from interference, the 1st derivative alone is not sufficient to improve the estimate of the analyte contribution. This is because the 1st derivative of symmetrical gaussian-like peaks is orthogonal to the original profile and cannot contribute in the least-squares fit. However, in such a situation, the resulting coefficient of the first derivative may still be used to quantify the amount and direction of the shift. In unsymmetrical cases, such as in the occurrence of spectral overlap, the 1st derivative begins to contribute and improves the estimate of the analyte in the presence of shift. By including both the 1st and 2nd derivatives of the unknown spectrum in the model, shift compensation is achieved and the estimate of the analyte contribution is improved in both the symmetrical and unsymmetrical cases. Higher derivatives may provide even greater latitude. The technique of including the derivatives of the unknown spectrum in the model provides a determined compensation for the spectral drift as opposed to iterative interpolation which requires searching to find the minimum error. As mentioned above, this technique also allows the determination of the amount and direction of shift which may have occurred. This can also be used in a slightly different scheme which combines linear least-squares and interpolation. The spectral shift could be quantified by the derivative technique and corrected by a single iteration of interpolation of either the model components or the unknown spectra. This would avoid the many iterations required when interpolation alone is used. Included in the method of this invention is the technique of masking. Certain regions of the emission spectrum may contain unwanted spectral information such as the emission profile of an interferent. These areas may be masked out of the regression routine and consequently ignored. Thus, the spectral peak of an interferent can be ignored rather than having to include a component for the interferent in the model. In this manner, the number of components in the model may be reduced without sacrificing accuracy in the determination of the analyte concentration. As noted above, the 1st and 2nd derivatives of the unknown spectrum can be included in the model in order to compensate for a shift in the instrument wavelength scale. In principle, increasingly higher orders of derivatives can be included to improve the compensation still further. In practice, however, noise in the unknown spectrum will tend to dominate in these higher derivative spectra and at some point, dependent upon the instrument, inclusion of higher order derivatives will cease to be useful. The drawings comprise four examples of computer simulations of the type of spectra encountered in ICP emission spectroscopy. The spectral peaks are represented with gaussian profiles. Noise is included as white gaussian noise. Three sources of noise, similar to those in ICP instrumentation, were simulated. Shot noise is approximated as white noise in which the standard deviation is proportional to the square root of the signal observed at the detector. Detector dark current shot noise is approximated as white noise which is always present and is independent of any other variables in the system. Finally, flicker noise is approximated as white noise with a standard deviation which is 1% of the total signal. In real ICP signals, the flicker noise has a 1/f dependence in the noise power spectrum. This means that there is correlation between adjacent points in a real, sequentially scanned, spectrum. This correlation comes from the low frequency components in the flicker noise. For simplicity, this behavior has not been simulated. Also, the flicker noise is typically different for the background signal compared to the analytical signal. This, also, has not been modeled. In all simulations, a background level of 100 arbitrary units and a detector shot noise level of 10 units standard deviation is employed. Figure 1 illustrates a three component fit: an analyte profile including a peak 10 present in the center of a spectrum 12; an interferent peak 14 to the left; and background. They are modeled and fit using the least-squares algorithm. The best-fit spectrum 16 closely follows the unknown spectrum. The flat residuals plot 18 shows that the fit is accurate because it contains no structure other than noise. The analyte signal is at a level of 10 times the conventional detection limit and, for this spectrum, a recovery of 97% was found. Figure 2 illustrates the effect on the analyte recovery, the background estimate, and the residuals plot when the component for the interferent is left out of the model. The spectrum 20 is similar to that of Figure 1. However, the interferent peak 22 is not included in the best fit estimate model 24. The resulting residuals plot 26 shows structure 28 which warns the analyst of an incorrect model. Figure 3 shows how masking over a region 30 can be used to deal with this problem. The accuracy is as good with masking as when the interferent component is included in the model for this case. Masking makes it possible to avoid adding an unnecessary component. Figure 4 illustrates a difficult case where the spectrum 32 is complicated by the presence of two interferent peaks, one on each side of the analyte peak 34. Also tested in this example, is the ability of the method of this invention to deal with a spectral shift of +4 picometers. The model components include the analyte 34 and two interferents 36, 38. The 1st and 2nd derivatives of the unknown spectrum were included in the model. A mean recovery of 98% was obtained with a precision of 3.5% RSD. It is observed that accurate and precise measurements can be made in the presence of overlapping spectral interferences and spectral shift which rival the values obtained in the non-interfered cases. Wavelength shift is not the only kind of abscissa distortion which may occur in an instrument. For example, the abscissa may be slightly compressed or expanded, giving rise to a different effective abscissa interval in the data. This type of abscissa distortion can be expressed as a shift of the data which varies linearly across the spectrum. For example, a shift to the left at the left side varying to a zero shift at the center, all the way to a shift to the right at the right side of the spectrum, corresponds to an expansion of the abscissa scale. This kind of shift can be dealt with analogously to the simple shift described previously. For example, the simple 1st derivative spectrum used above is replaced by the 1st derivative spectrum multiplied by a straight line envelope function which varies from -1 at the left to +1 at the right. The inclusion of this modified derivative in the model will allow a scale expansion/compression with zero mean shift to be compensated. Clearly, the simple shift compensation and the expansion/compression compensation can be combined to compensate for a more general change of scale. The foregoing does not represent the limit of the possibilities of this invention. The effects of any complex distortion of the abscissa scale may be modeled by including higher orders of envelope function. A constant envelope function corresponds to a simple shift. A linear envelope function corresponds to a scale compression or expansion. A parabolic envelope function corresponds to compression in one half of the spectrum and expansion in the other half, and so on. In fact, the entire family of compensating functions consists of all the orders of derivative spectrum multiplied each in combination with one of the orders of envelope function. Naturally, a knowledge of likely causes of spectrum distortion will aid in the restriction of this set to manageable proportions. The significance of this ability to compensate for complex abscissa distortions becomes evident, not so much in the context of drift within a single instrument, as in the transfer of calibration models between instruments. In some instances involving analysis of complex chemical mixtures with highly overlapped spectra, the generation of the calibration model is almost prohibitively expensive. In these circumstances, the need to transfer calibration models between instruments becomes acute. Unfortunately, even instruments from the same manufacturer typically have subtle differences of abscissa scaling which prevent models from being transferred directly. Examples of such calibration transfer problems are to be found in UV-visible absorption spectra, NIR absorption spectra, particularly of hydrocarbon mixtures, and IR spectra of polymers and liquids. This invention provides a technique for dealing with wavelength registration drift in spectrometers. It is believed that the many advantages of this invention will now be apparent to those skilled in the art. It will also be apparent that a number of variations and modifications may be made in this invention with departing from its scope, as determined by the claims. Accordingly, the foregoing description is to be construed as illustrative only. This invention is limited only by the scope of the following claims.

Claims: A multiple linear least squares regression method for determining the concentration of at least one selected analyte in an unknown sample mixture containing said analyte, comprising the steps of: generating an analyte spectrum of the selected analyte so as to form a matrix of model components; generating a sample spectrum comprising the spectral components (Y) of the unknown sample mixture; and computing a first derivative of the sample spectrum; characterized by deriving a matrix model that includes the matrix of model components, wherein the first derivative is added to the matrix of model components to form the matrix model (X); and applying the matrix model to the sample spectrum (Y) so as to yield a parameter representing concentration of the selected analyte in the unknown sample mixture. The method of claim 1 further comprising computing a second derivative of the sample spectrum, and including the second derivative in the matrix model. The method of claim 1 further comprising computing at least one higher derivative of the sample spectrum, and including the each such higher derivative in the matrix model. The method of claim 1 further comprising selecting a region in the sample spectrum containing undesirable spectral information, and masking the sample spectrum in the selected region prior to the steps of computing and deriving. The method of claim 1 further comprising generating at least one interference spectrum, and including each interference spectrum in the matrix model. An apparatus for performing a multiple linear least squares regression method for determining the concentration of at least one selected analyte in an unknown sample mixture containing said analyte, comprising: means for generating an analyte spectrum of the selected analyte so as to form a matrix of model components; means for generating a sample spectrum comprising the spectral components (Y) of the unknown sample mixture; and means for computing a first derivative of the sample spectrum; characterized by means for deriving a matrix model that includes the matrix of model components, wherein the first derivative is added to the matrix of model components to form the matrix model (X); and means for applying the matrix model to the sample spectrum (Y) so as to yield a parameter representing concentration of the selected analyte in the unknown sample mixture. The apparatus of claim 6 further comprising means for computing at least one higher derivative of the sample spectrum, and means for including each such higher derivative in the matrix model. The apparatus of claim 6 further comprising means for selecting a region in the sample spectrum containing undesirable spectral information, and means for masking the sample spectrum in the selected region prior to computing and deriving. The apparatus of claim 6 further comprising means for generating at least one interference spectrum, and means for including each interference spectrum in the matrix model. The apparatus of claim 6 further comprising means for storing the analyte spectrum for inclusion in subsequent matrix models.

Inventors: HOULT ROBERT, IVALDI JUAN, SPRAGG RICHARD, TRACY DAVID H, HOULT, ROBERT, IVALDI, JUAN, SPRAGG, RICHARD, TRACY, DAVID H., HOULT, ROBERT,C/O PERKIN-ELMER LTD.
Applicants: PERKIN ELMER CORP, THE PERKIN-ELMER CORPORATION
Application year: 1992
Main classification: G01J3
IPC codes: G01J3, G01N21