The present disclosure relates generally to curve integration and, in particular, to integration methods that use relative, as opposed to absolute, integration parameters.
A common operation in signal processing is signal integration. Such an operation may be depicted by a plot in which the x-axis represents either time or a parameter which affects the signal intensity, which may be referred to as the y-axis response, as shown in
Another approach to integration is through the use of curve fitting. In this method, as depicted in
The trapezoidal rule method is somewhat simpler to implement for digitized signals when the desired signal is isolated because no assumptions are made concerning the underlying mathematical functions that describe the peak. In such a case, baseline points are defined such as to be outside the signal boundaries, and signal summation is carried out at points equal to or internal to a baseline region, as shown in
In certain signal processing applications, however, it is possible for peak positions associated with measured quantities to shift slightly. Such a shift may be caused by environmental temperature change over time that change the physical position of components within a spectrometer. Specific to Raman spectroscopy, the excitation laser wavelength (i.e., wavenumber) may drift over time. Aside from these instrumental effects, the molecular nature of Raman spectroscopy may cause peaks to shift due to composition changes in a mixture and/or temperature changes of the sample. In conventional signal integration, the baseline and integration limits remain constant, but the peak may shift relative to the integration limits to such an extent that the integration limits are no longer optimal, resulting in errors in determining a concentration of a constituent of a sample under test. Accordingly, there exists a need for curve integration techniques that do not rely on absolute parameters.
The present disclosure is broadly directed to alternatives to trapezoidal rule integration for determining constituent concentration using spectroscopy. In one aspect of the present disclosure, a method of improving the accuracy of a Raman spectrometer comprises providing a Raman spectrometer including: an optical grating operative to separate a Raman signal received from a sample into a Raman spectrum including at least one peak representative of a molecular constituent present in the sample; an optical detector having a plurality of detector elements configured to receive the Raman spectrum; and a processor operative to receive an electrical signal representative of the Raman spectrum from the optical detector in the form of a curve, the curve including the at least one peak having x- and y-coordinates, wherein the processor is configured to integrate the at least one peak. The method further comprises using the spectrometer to perform the following operations: receiving data representative of a standard Raman spectrum for the molecular constituent including a nominal peak maximum y-value and an x-coordinate associated with the nominal peak maximum y-value; specifying a window relative to an x-axis that includes the x-coordinate of the nominal peak maximum y-value; defining a baseline start point on the x-axis as an x-coordinate of a peak less a first predetermined offset; defining a baseline stop point on the x-axis as the x-coordinate of the peak plus the first predetermined offset; defining an integration start point on the x-axis as the x-coordinate of the peak less a second predetermined offset; defining an integration stop point on the x-axis as the x-coordinate of the peak plus the second predetermined offset; receiving data representative of a sample Raman spectrum from the spectrometer, wherein the sample spectrum includes at least one sample peak associated with the molecular constituent present in the sample, and wherein the sample peak may have a relative shift of the x-axis with respect to the detector elements compared to the standard spectrum; determining an actual maximum y-value of the at least one sample peak of the sample spectrum and an x-coordinate associated with the actual maximum y-value; computing the baseline start point, the baseline stop point, the integration start point and the integration stop point for the sample spectrum for integrating the sample peak by subtracting and adding the first and second predetermined offsets as defined; computing a y-value of the curve including the sample peak and a y-value of a baseline at each of a plurality of points between the integration start point and the integration stop point; subtracting the baseline y-values from the y-values of the curve computed at each of the plurality of points between the integration start point and the integration stop point; and adding the results of the baseline subtractions to compute a net peak area representative of the molecular constituent present in the sample.
In an embodiment, the nominal peak maximum y-value and the x-coordinate associated with the nominal peak maximum y-value are based upon previously obtained data. In another embodiment, the step of computing the actual maximum y-value of the at least one sample peak includes determining an absolute maximum. In an alternative embodiment, the step of computing the actual maximum y-value includes using a cubic spline or other curve-fitting method. In an alternative embodiment, the step of computing the actual maximum y-value includes using a center-of-gravity method.
In another aspect of the present disclosure, an improved Raman spectrometer, comprises an input for receiving an optical Raman signal from a sample; an optical grating operative to separate the Raman signal into a sample Raman spectrum including at least one peak representative of a molecular constituent present in the sample; an optical detector having a plurality of detector elements configured to receive the sample spectrum; and a processor configured to receive an electrical signal representative of the sample spectrum from the optical detector in the form of a curve including the at least one peak having x- and y-coordinates. In such an embodiment, the processor is further configured to integrate the at least one peak by performing the method. The processor is further configured to receive data representative of a standard Raman spectrum including a nominal peak maximum y-value for the molecular constituent and the x-coordinate associated with the nominal peak maximum y-value; specify a window relative to an x-axis that includes the x-coordinate of the nominal peak maximum y-value; define a baseline start point on the x-axis as an x-coordinate of a peak less a first predetermined offset; define a baseline stop point on the x-axis as the x-coordinate of the peak plus the first predetermined offset; define an integration start point on the x-axis as the x-coordinate of the peak less a second predetermined offset; define an integration stop point on the x-axis as the x-coordinate of the peak plus the second predetermined offset; receive an electrical signal representative of the sample spectrum of the sample including the at least one peak for the molecular constituent, which may have a relative shift of the x-axis compared to the standard spectrum; determine an actual maximum y-value of the at least one peak and an x-coordinate associated with the actual maximum y-value; determine the baseline start point, the baseline stop point, the integration start point and the integration stop point for the sample spectrum for integrating the at least one peak by subtracting and adding the first and second predetermined offsets as defined; determine a y-value of the curve including the at least one peak and a y-value of a baseline at each of a plurality of points between the integration start point and the integration stop point; subtracting the baseline y-values from the y-values of the curve determined at each of the plurality of points between the integration start point and the integration stop point; and adding the results of the baseline subtractions to determine a net peak area representative of the molecular constituent present in the sample.
In an embodiment, the data representative of the standard spectrum including the nominal peak maximum y-value for the molecular constituent and the x-coordinate associated with the nominal peak maximum y-value are based upon previously obtained data. In another embodiment, the actual maximum y-value of the at least one peak is an absolute maximum. In a further embodiment, the processor is further configured to determine the actual maximum y-value using a cubic spline or other curve-fitting method. In an alternative embodiment, the processor is further configured to determine the actual maximum y-value of the peak using a center-of-gravity method.
The present disclosure resides in variations of the conventional trapezoidal rule used for signal integration for determining constituent concentration using spectroscopy. In one aspect of the present disclosure, rather than specify the baseline and integration parameters as absolute positions on the x-axis (e.g., fixed and predefined by predetermined wavenumbers), the baseline and integration parameters are specified as offsets from an actual peak maximum within a window of data. With the approach of the present disclosure, where a constituent peak shifts over time, for example, the baseline and integration parameters are adapted and remain appropriate at least with respect to integration. While the present disclosure is applicable to a wide variety of time-varying signal integration problems, the disclosed methods find particular utility in spectroscopy wherein, in the case of Raman spectroscopy, for example, specific wavenumber shift locations may drift over time, leading to inaccurate determination of constituent concentration when based upon conventional absolute integration parameters. The apparatus and methods of the present disclosure find utility in spectroscopic analysis, wherein collected spectra may experience a relative shift of the x-axis compared to a standard spectrum.
In accordance with the present disclosure, a window of wavelengths or wavenumbers is specified with respect to a data curve that includes a peak maximum value of a constituent within a sample under test. In an embodiment, an initial peak maximum value may be determined based upon previous experience or results. Start and stop baseline values are specified as a set of offsets relative to the peak maximum value, and integration start and stop values are specified as a different set of offsets relative to the peak maximum value.
The integration start and stop values may be less than the baseline values such that the integration window is within the baseline start and stop values. An actual peak maximum is determined using one of several suitable methods including, but not limited to, absolute maximum, cubic spline fit, center-of-gravity, and so forth.
Optimum baseline and peak start and stop points are computed, and a signal of interest is summed from integration start to integration stop. A baseline level is determined at each point of summation, and a value of the signal below the baseline level is subtracted from the summed signal, resulting in a net peak area under the curve. In an embodiment, the net peak area may be representative of a concentration of a constituent of the sample.
An alternative embodiment uses four parameters to specify the baseline start and stop points. In such an embodiment, the baseline start point is defined by two start parameters, and the baseline stop point is defined by two stop parameters. In an embodiment, the two start parameters may be defined as the corresponding offset relative to the peak maximum value plus and minus a first parameter offset. In such an embodiment, the two stop parameters may be defined as the corresponding offset plus and minus a second parameter value. The use of two parameters for each of the baseline start and stop points enable the baseline level to be calculated more precisely, using one of several possible methods including, but not limited to, an average of a region between each set of baseline points, a minimum of the region, a clipped average of the region, and so forth.
Application to Spectroscopy
Spectroscopy involves generating raw data, or inputs, as individual points consisting of some measure of light intensity relative to wavelength. For example, in absorbance spectroscopy, the light intensity is expressed as the log of the percent transmittance of light through a sample, and the wavelengths may be expressed in nanometers in the near-infrared range or in inverse centimeters, also called wavenumbers, for the mid-infrared range. For types of spectroscopy involving scattered light, such as Raman spectroscopy, the light intensity is measured as raw counts from the digitization of a detector signal. The wavelength is expressed as a wavenumber shift from an incident light source of a given wavelength that stimulated the Raman scattering. An example Raman spectrum is shown in
Enlarging a small region of the example spectrum of
A conventional method for resolving a peak specific to spectroscopy involves the following steps. First, for a given peak, a nominal maximum is assumed for a particular molecular constituent. For example, for a methane peak, a nominal maximum of 2917 cm−1 could be assumed. For this peak, nominal baseline parameters at absolute wavenumber positions are chosen on either side of the peak (e.g., 2910 cm−1 and 2924 cm−1). Nominal integration parameters, selected where the signal starts deviating from the baseline, are also chosen on either side of the peak (e.g., 2911 cm−1 to 2923 cm−1). Given these specified parameters, the signal is summed from the integration start to the integration stop points, and the baseline level is determined at each signal point. The summations below the baseline are subtracted from the signal values and the result is the net integration for that peak.
Occasionally in spectroscopy, however, more than one type of molecule may result in a peak at similar locations. In such circumstances, the peak is said to be unresolved, and precise baseline and integration points are necessary to properly assess peak area for an individual molecular effect.
In many spectrometers, and especially in Raman spectrometers, a fixed grating and lens system is used to separate a mixture of different wavelengths of light into its component wavelengths, and these wavelengths are projected onto a detector element array, as depicted in
The methods of the present disclosure may be described using an exemplary chemical species. The following example illustrates an embodiment of the method with respect to the relative integration of a methane peak. Nonetheless, the methods of the present disclosure are not limited in terms of target material to methane. In such an embodiment, the method includes:
1. Specifying parameters:
2. Determining peak maximum using one of several known methods;
3. Calculating optimum baseline and peak parameters in absolute cm−1;
4. Summing signal from integration start to integration stop;
5. Determining baseline level at each signal point; and
6. Determining a net peak area by subtracting a signal portion that is below the baseline at each signal point.
An alternative embodiment uses four baseline parameters as described herein.
Experimental Results
An experiment was designed that synthetically combined pure component spectra into mixtures. One set of 30 spectra was saved unaltered. The same set was shifted 1 cm−1 to the high end of the spectrum and saved. The original set was also shifted 1 cm−1 to the low end of the spectrum and saved. Consequently, 90 spectra total were produced, 30 each with peak positions at 2917 cm−1 (unaltered), 2916 cm−1 and 2918 cm−1. A conventional algorithm and the relative algorithm, according to the present disclosure described herein, were both used to integrate the peak areas, yielding two sets of areas. A linear regression (univariate) was done on each set of areas, and a plot of the error (true-predicted) was made for each linear regression.
While various embodiments of methods relative signal integration have been described in considerable detail herein, the embodiments are merely offered by way of non-limiting examples of the disclosure described herein. It will therefore be understood that various changes and modifications may be made, and equivalents may be substituted for elements thereof, without departing from the scope of the disclosure. Indeed, this disclosure is not intended to be exhaustive or to limit the scope of the disclosure.
Further, in describing representative embodiments, the disclosure may have presented a method and/or process as a particular sequence of steps. However, to the extent that the method or process does not rely on the particular order of steps set forth herein, the method or process should not be limited to the particular sequence of steps described. Other sequences of steps may be possible and still remain within the scope of the present disclosure.