None.
1. Field of the Invention
The present invention relates to a system and method for measuring the amount of black powder in a gas pipeline.
2. Brief Description Of The Related Art
Black powder is a general term used for solid contaminants, which can be found in a gas or fluid pipeline. The black powder occurs from various and many unknown reasons. The black powder has numerous forms and may be wet or/and or have a tar-like appearance. It comprises very fine particles (often sub micrometer in size) of iron sulfide, iron oxide, and iron carbonate (see Sherik and Davis “Thermodynamic analysis of formation of black powder in sales gas pipelines, Saudi Aramco J. Technol., Vol. 1, pp 17-23, March 2009). As these fine particles flow in the gas pipeline, the particles of the black power can accumulate around the control valves, compressors, and other equipment, which may create a severe pressure drop and in some cases lead to an entire shutdown of the pipeline and thus of the production. The problems may extend further to the utilities companies connected to the actual network pipeline (e.g. electricity companies) in which their various pieces of equipment are damaged and electricity production declines.
These issues have led to gas production companies to implement measures for mitigating the propagation of black powder in their gas pipelines, as reported in Trifilieff et al “Black power removal from transmission pipelines: Diagnostics and solution”, presented at the Pipeline Rehabilitation Maintenance Conference, Gulf Int. Convention Center, Manama, Bahrain, January 2009, pp 1-12. Despite all separation techniques applied currently to the gas pipelines to eliminate the black powder (e.g., filtering, cyclones, and pigging), the problem is still current. The difficulties in resolving the issue can be at least partly explained by the fact that the size of black powder particles are in the order of sub micrometers and are thus hard to extract from the flowing gas in the gas pipeline. Consequently, new strategies are being now investigated.
One approach is to monitor propagation of the black powder at different points of the pipeline network, which helps in taking more effective preventive actions against the buildup of the black powder. Currently, there is no existing system for inline measurement of the black powder, within either natural gas or petroleum continuous phases.
In other different industrial applications optical-based techniques such as NIR, MIR and Raman spectroscopy have been used for monitoring fluid conditions. These prior art methods usually comprise the scanning of the target fluid over a large range of wavelengths in either the transmission or reflection mode.
The following patents illustrate the use of such optical-based techniques.
U.S. Pat. No. 8,379,205 B2 issued February, 2013 suggests an arrangement for determining the concentration of substances in a fluid. The system comprises a light source and a light source splitter (consisting of fiber Bragg grating), which generates a relatively small number of secondary light beams (e.g. around three light beams) at different wavelengths. The secondary light beams impact the fluid in a time-multiplexed manner and a number of photosensitive detectors, corresponding to the number of light beams (e.g. around 3 detectors), generate a plurality of electrical signals that are proportional to the composition and the concentration of the substance in the measured fluid.
The apparatus of US '205 is not suitable for black powder detection in oil or gas pipelines for several reasons. The analysis of the light intensity of the transmitted light beams through the fluid for a relatively small number of wavelengths (in this case three) will not be effective because of the complex wavelength spectrum that is obtained for various concentrations of black powder, especially when present within different continuous phases.
U.S. Pat. No. 5,742,064 issued Apr. 21, 1998 suggests a method to determine the amount of dirt and water in oil when a target oil is passing through a given section of the pipeline. The apparatus of US '064 comprises a tunable laser light which emits coherent light towards the target oil. A photomultiplier or a spectrometer are present to sense the received light from the target oil. This received light is proportional to the amount of dirt and water existing in the target oil. The application addressed in this '064 patent is different from the teachings of the current disclosure. The algorithm disclosed in the '064 patent is based around a simple search for the best match of the spectrum of the received light within a database of existing spectra and may not be always effective due to the high complexity and sensitivity of the wavelength spectrum from the target oil. More complex algorithms (e.g. pattern recognition algorithms) are usually required in practice.
U.S. Pat. No. 5,418,614 issued May 23, 1995 suggests a method for on-line analysis of online fluids streams. The invention uses a general-purpose optical photometer in the ultraviolet, visible and near infrared spectral ranges. The light source generates light signals, which are carried via optical fiber cables between a central photometric console and remote analysis sites in which the captured signals are compared with a reference signal. Although the disclosure in this patent application shares some similarities with the current disclosure by using optical light (NIR), the teachings of US '614 differs from the current disclosure by the use of a photomultiplier in the detection process, instead of photodiodes. Hence, in this earlier disclosure, the detector can not simultaneously explore a range of wavelengths, which constitutes the basic concept of optical spectroscopy. The earlier disclosure focuses on one wavelength (e.g. NIR wavelength) and measures the corresponding intensity of light received, which is said to be function of the fluid composition to be measured. Furthermore, the teachings of this patent were not intended to detect micro-sized particles, as is the case of the current disclosure.
U.S. Pat. No. 5,140,169 and U.S. Pat. No. 5,170,056 issued Aug. 14, 1992 and Dec. 8, 1992 respectively. The first US '169 patent teaches a flow cell while the second US '056 patent teaches a probe. While both techniques use spectrometry with optical fiber cables, they only handle offline measurements on samples, which are put within a very narrow volume space. Furthermore, the two disclosures do not specify the wavelengths used and consider the light in the transmittance mode only.
U.S. Pat. No. 5,140,169 A discloses a flow cell for use in highly corrosive environments that is constructed from an extended metal body containing a smooth longitudinal circular center bore of uniform cross-section.
U.S. Patent Application Publication No. 2013/0031964 A1 discloses a method of monitoring the fluid, which includes containing the fluid within a flow path, the fluid including at least one adulterant present therein, optically interacting at least one integrated computational element with the fluid, thereby generating optically interacted light, receiving with at least one detector the optically interacted light, and generating with the at least one detector an output signal corresponding to a characteristic of the at least one adulterant in the fluid.
U.S. Pat. No. 8,686,364 B1 discloses methods and systems for real time, in situ monitoring of fluids, and particularly the determination of both the energy content and contaminants in a gas or oil transmission facility. The disclosed system includes two separate scanning sources to scan two different, but overlapping, near infra-red (NIR) ranges, or involves two separate scans from a single scanning spectroscopy source.
International Patent Application No. WO 2009/002322 A1 discloses a system and method of monitoring contaminant particles in pipelines. The system can include a probe for extending into the pipeline, and sampling fluid in the pipeline to ensure that a representative amount of contaminants within the pipeline can subsequently be measured. An analyzer receives the sampled fluid from the probe, illuminates the sampled fluid with a light source and collects scattered light from any contaminant particles in the illuminated sampled fluid.
U.S. Patent Application Publication No. 20150021482 A1 relates to a contamination recording apparatus for recording contaminations in a flowing hydraulic fluid to be examined in an aircraft comprising a conveying device for conveying the flowing hydraulic fluid, a light source for exposing the hydraulic fluid flowing in the conveying device to light and a detection device for recording a fraction of the light absorbed by the exposed hydraulic fluid.
Another drawback of the aforementioned prior art is that the disclosures all assume that the continuous phase (i.e. the background surrounding the particles of interest) is constant over time. This constraint is not realistic in oil and gas fields, since the density of the fluid (oil or gas) and even its type is likely to change. For instance, over a period of time, the produced natural gas can change from methane-dominated gas to ethane-dominated gas. Furthermore, when these apparatuses operate online, the apparatuses only monitor a relatively small portion of the flow in a slip-stream sample line either by using measurement cells (e.g. multi-pass measurement cell, cross flow measurement cell, and/or integrating sphere) or immersion probes. Therefore, such methods do not consider the entire process flow and consequently cannot be applied directly to the gas/oil pipelines (termed “main pipelines”) in order to measure the flow of black powder.
The present disclosure teaches a non-destructive optical-based device to monitor online and continuously the amount of black powder within a main pipeline passing though the earliest stages of the pipeline network. This device will allow isolating highly contaminated pipelines and thus reduce the risks; which may be caused to the pipelines by contamination through the black powder. In one aspect, the device operates using at least near infra-red radiation (NIR) to analyze at least one of the reflected, transmitted, and refraction light beams, which interact with the target medium. Hence, besides being non-intrusive and non-invasive techniques, the device also employs the property that light in the IR range has a different absorption rate for different constituents of black powder in the target medium. Hence, by knowing the spectrum of each of these different constituents, a proper analysis of the spectrum would lead to a good estimation of the concentration of the different constituents in the target medium.
In one aspect, the device further transmits further light beams of at least one of middle infra-red (MIR) or Raman spectra.
Measurements in the main pipeline as taught in this document refer to measurements ‘in-inline’ of a main flow path of the main pipeline in order to avoid for example a bypass to which measurement devices/facilities are allocated (see above—drawbacks of the prior art). The flowing fluid within the main pipeline is the target medium.
The device uses an algorithm to process the data from the different techniques. In one embodiment two multivariate techniques are used, namely the Principal Component Regression (PCR) and the Partial Least Square Regression (PLSR) techniques. These multivariate techniques are commonly used to group samples with similar characteristics to classify unknown samples (qualitative analysis) or to determine specific properties of unknown samples (quantitative analysis). Other artificial intelligence techniques such as neural network and fuzzy logic techniques can also be applied.
The description teaches a device to monitor online and continuously the amount of the black powder passing through the earliest stages of the pipeline network. The device allows for reducing of the risks that may be linked to the substantial pressure drops commonly experienced in the downstream pipelines.
The device comprises a ring of optical sender and receiving sensors evenly distributed across a given section of the pipeline. Extensive offline experiments to quantify the amount of black powder were conducted, and the results of the experiments were recorded to create a database of spectra relating to the different concentrations of the constituents of the black powder. The experiments were conducted by first measuring the samples of black powder by standard analytical procedures and then using the results as reference values for establishing the calibration model based on multivariate calibration using the PCR and the PLSR for NIR, MIR, and Raman spectroscopy. The results obtained from these experiments support the feasibility of using optical-based approach to monitor black powder particles in gas pipelines.
In an aspect, the present invention is an optical-based system and a method for online measurement of sub-micrometer sized black powder in gas or oil pipelines is disclosed. The system comprises at least one optical light transmitter (also called emitter), which transmits a beam of light towards a target medium within which the black powder concentration is sought to be determined. Depending on the positioning of the transmitters relative to the receivers, the sensing area can be either a two-dimensional (2D) section of the pipeline, or a 3D volume of the target medium. Targeting the 3D volume leads to a better accuracy of measurement at the expense of high computation time and/or hardware complexity. A plurality of optical sensors operating within the senders' wavelengths are positioned at different locations in the pipeline to measure the amount of light absorbed and/or reflected by black powder particles. A dedicated pattern recognition algorithm using statistical and/or artificial intelligence approaches uses this data to estimate the amount of black powder passing through the target area. The optical senders and receivers can be connected to the control room via optical fibers, which allow the apparatus to operate safely in hazardous areas (e.g. Zone 0 areas).
Still other aspects, features, and advantages of the present invention are readily apparent from the following detailed description, simply by illustrating a preferable embodiments and implementations. The present invention is also capable of other and different embodiments and its several details can be modified in various obvious respects, all without departing from the spirit and scope of the present invention. Accordingly, the drawings and descriptions are to be regarded as illustrative in nature, and not as restrictive. Additional objects and advantages of the invention will be set forth in part in the description, which follows and in part will be obvious from the description, or may be learned by practice of the invention. The above aspects and/or features within the aspects may be freely combined with each other to form embodiments of the present application.
For a more complete understanding of the present invention and the advantages thereof, reference is now made to the following description and the accompanying drawings, in which:
The invention will now be described on the basis of the drawings. It will be understood that the embodiments and aspect of the invention described herein are only examples and do not limit the protective scope of the claims in any way. The invention is defined by the claims and their equivalents. It will be understood that feature of one aspect or embodiment of the invention can be combined with a feature of a different aspect or aspects and/or embodiments of the invention.
Hence, the system 10 is distributed across all the three areas 1, 2 and 3, which are interconnected via the optical fibers 120. In the control room 60, a spectrometer 70 emits light toward both the reference probes 110 and the observing probes 100 and the emitted light is projected into the gas stream 140 in the gas pipeline 130. The control room 60 is also depicted in
Only a portion of the emitted light, or photons, will absorbed by the black powder contaminants in the gas stream. The remaining portion of the emitted light is transmitted, reflected, or refracted by the black powder contaminants. The light detector 80 in the control room 60 can analyze the received light from the reference probe 110 and the observing probe 100. The received light will be proportional to the amount of the black powder passing through the gas pipelines 130 and depends on the constituents (contaminants) of the black powder.
In
Raman spectroscopy is a technique that is used to monitor the black powder 150 in the gas pipeline 130. Raman spectroscopy is based on inelastic scattering of monochromatic laser light (from the light source 70) by matter. Inelastic scattering is the change of the frequency of photons in the laser light upon interaction with the matter. When the photons of the laser light are absorbed by the matter and then reemitted, the reemitted photons can have a frequency that is shifted up or down when compared with the original laser frequency. This shift is called the Raman effect. This shift offers information about the studied matter by observing the vibrational, rotational, and other low frequency transitions in molecules. A further discussion on the use of the Raman effect to detect solid particles in a fluid is found in Gallego et al, “Rapid measurement of phenolic compounds in red wine using Raman spectroscopy”, IEEE Trans. Instrum. Meas. Vol. 60, No. 2, 507-512, February 2011.
In
Transmittance Mode
By illuminating one side of the gas pipeline 130, and measuring the intensity of the light that exits from the contaminants of the black powder 150 in an opposite side of the gas pipeline 130, the computing device 90 acting as an analyzer can analyze the relationship between the projected light intensity and the received light intensity to determine the absorption according to Eqn 1:
A=log1I0/I1 (1)
where A is the absorbance, I0 is the emitted light, and I1 is the detected light.
While the accuracy of the measurement would increase with the increase of the number of the transmitter probes 160 and the detector probes 170, having a homogenous distribution of the black powder 150 in the gas pipeline 130 helps to relax this constraint. Hence, a flow homogenization can be easily obtained by properly designing the gas pipeline 130 preceding the transmitter probes 160 and the detector probes 1370 (e.g. by using a T-blender). This approach is commonly considered in flow measurement instrumentation, as noted in Meribout et al “A multisensory intelligent device for real-time multiphase flow metering in oil fields”, IEEE Trans. Instrum. Measur., Vol. 59, No. 6, 1507-1519, January 2010.
Diffuse-reflectance spectroscopy is a technique for measuring irregular-shaped materials and powders, especially iron oxides and oxyhydroxides (see Liu et al, “Quantification of hematite from the visible diffuse reflectance spectrum: Effects of aluminum substitution and grain morphology”, Clay Minerals, Vol. 46, No. 1, 137-147, 2011. The diffuse-reflectance spectroscopy relies on the principle that when the light beam 165 enters the gas pipeline 130, some of the energy in the light beam is reflected off the surface of the particles in the black powder 150 while some of its energy is transmitted through the particles. The light energy reflecting off the surface of the particle is usually lost while the light energy that passes through the particle is either reflected off the next one of the particles or transmitted through the next particle. This transmission-reflectance event happens many times in the device, which increases the path length of the reflected beam, as discussed in Giusto et al “Monitoring absorption changes in a layered diffusive medium by white-light time-resolved reflectance spectroscopy”, IEEE Trans. Instrum. Meas., Vol. 59, No. 7, 1925-1932, June 2010.
When the light beam hits a diffuse surface, the light beam creates a “virtual light source” by reflection. Radiance, which is the flux density per unit solid angle, is used to best describe the light energy stemming from the surface. Radiance is used to indicate the amount of flux that is collected by the detector viewing the illuminated surface. The following equation represents the radiance L of a diffuse surface for an input flux, φi.
where ρ is the reflectance, A is the illuminated area, and Ω is the total projected solid angle from the surface of the particle.
To derive the radiance L of an internally illuminated reflective loop, the radiance equation (2) must consider the multiple surface reflections as well as the losses through port openings for the transmitter probes 160 and the detector probes. Consider a reflective loop with a transmitter port area Ai and one detector port area Ae. When the first beam hits the first spot in the reflective loop, the input flux is perfectly diffused by the first reflection. The quantity of flux incident on the entire reflective loop surface is
where As is the surface area of the entire loop and the quantity in parenthesis represents the fraction of flux received by the loop's surface that is unconsumed by the two port openings, which can be written as (1−f) where f represents the port fraction (Ai+Ae)/As. Consequently, the total flux incident after n reflections over the entire circle surface is
Eqn 4 shows that the total flux incident φtotal on the loop surface is greater than the input flux φi because of the multiple reflections within the circle boundaries. Accordingly, the circle surface radiance is
Equation (5) represents the detected light, which is used in Equation (1) to deduce the absorbance required for the quantitative analysis of the black powder 150. The equation (5) is used to predict the loop radiance for a given input flux (pi as a function of circle diameter, reflectance, and port fraction. Maximum radiance is expected to be detected by the detector probe 170 when there is no black powder 150 in the gas pipeline 130. The radiance fluctuates as the quantity of the black powder 150 fluctuates in the illuminated area A. Accordingly, a quantitative analysis of the black powder 150 can be obtained.
Choosing the Calibration and Validation Samples—step 610.
The number of samples 613 for the calibration and validation should be carefully chosen. Yet, more importantly is considering how to choose them. The calibration samples are also called training set and they are used to conduct the calibration and design the model in step 616. On the other hand, the validation set consists of the validation samples and it is used to validate the model designed and evaluate the calibration performance.
Design of Samples—step 616
The quality of the calibration depends mostly on the training set used to generate the calibration. The training set must contain all of the unknowns that the calibration should analyze. Since the model to be designed for the calibration is based on statistical techniques, the training set should be a statistically valid sample of the population including all unknown samples for the application. In order to prevent extrapolation, the concentrations of the particles of black powder 130 in the calibration samples should span the full range of concentrations that will exist in the unknown gas stream 140. Since only one component is considered in the experiments, the sample design is not complicated and only requires to vary the concentration of the black powder samples stepwise in order to span the full range of the specified concentrations. However, if more than one component exists in the samples, more attention should be paid for the sample design in step 616.
Determination of the target parameter in step 620.
In order to produce a model that predicts different concentration values of black powder 150 in the gas pipeline 130, target parameters should be determined and the first step is to create a concentration matrix, which will be used later to predict the concentration values. The data set concentration values are used to form the concentration matrix (C). For m components and n samples, the concentration matrix (C) can be assembled as a (n×m) matrix, where the m components in this context mean sources of variation. For simplicity, the black powder 150 was considered as a single one of the m components in the test and ten samples were taken. Accordingly, the concentration matrix (C) was assembled as a (10×1) matrix.
Record NIR Spectra of All Samples—Step 630.
The absorbance matrix (A) represents the spectral data and each spectrum is represented as a column vector. For P wavelengths and n samples, the absorbance matrix (A) can be assembled as an (n x p) matrix. Consequently, for the application of this disclosure, the absorbance matrix for the NIR spectroscopy was assembled as a (10×1400) matrix since the data were taken over P=1400 wavelengths for the ten different samples. On the other hand, the absorbance matrices (A) for the MIR (P=828) and Raman spectroscopy (P=1850) were assembled as (10×828) and (10 X 1850) matrices, respectively.
The multicomponent form of the Beer-Lambert law is considered the base of quantitative analysis in spectroscopy
where Ai is the measured absorbance at wavelength i, εj,i is the sample's absorptivity of component j at wavelength i, b is the optical path length of the measurement, and cj is the concentration of component j.
The summation in equation (6) is taken over the m components of each of the samples. However, the term product εj,i can be combined to produce the sensitivity coefficient kj,i, which represents the correlation between the concentration and absorbance. For the m components and the P wavelengths, the sensitivity matrix (K) can be assembled as a (m×P) matrix, which is basically the spectra of each pure component in each raw. After assembling the (A), (C), and (K) matrices, the equation (6) can be defined in matrix notation as.
A=CK+E (7)
where E represents the error matrix (n×P) which shows that noise, artifact, or other kind of errors cannot be verified by the term C·K and will be presented in the measured absorbance matrix A.
Pretreatment of the Recorded Spectra—Step 640.
Prior to designing a multivariate model for the system 10, data pretreatment techniques are used in step 640 to reduce, remove, or regulate unwanted effects on the spectra caused by physical properties of the samples or instrumental effects, such as light scattering, path length variations, and random noise. Therefore, different ones of the pretreatment methods were applied to the spectra to choose the right ones. It was found that only normalization (step 646) and mean centering (step 643) were chosen to apply to the MR spectra while the MIR and Raman spectra required smoothing (step 649) in addition to normalization 646 and mean centering 643 as the smoothing 649 helped getting the best results without destroying the information.
Reduction of Variables by Principal Component Analysis—Step 640
Principal component analysis (PCA) is a variable-reduction tool that reduces the dimensions of the original data into less uncorrelated variables comprising only significant information from the sample. The PCA in step 655 uses the directions of maximum variability in sample groupings to generate new axes called principal components (PCs). The new variables (PCs) should have the following criteria.
Mathematically, the new variables (PCs) are produced by finding the eigenvectors of the variance matrix of the original variables (wavelengths). Then, use these found eigenvectors as the weight vectors for constructing the variables. The analogous eigenvalues then indicate the amount of the original variance that has been enclosed by each new variable.
The PCA is used for qualitative analysis in which spectra are compared with beforehand known spectra then the difference or the resemblance of those spectra discloses information. If we observe A, we can predict C and K in Eqn 7
A=Ĉ{circumflex over (K)}+{circumflex over (K)} (8)
where the hat notation (̂) used in equation (8) indicates a prediction.
This calculation is done by first performing PCA, which results in an abstract mathematical transformation of the equation (8) and yields the form:
A=Ĉ{circumflex over (K)}+Ê={circumflex over (T)}−{circumflex over (P)} (9)
where T contains the scores in which the variables are linear combinations of the original variables in A. P is the loadings matrix, which is estimated by regressing A onto T. The residual matrix E is found by subtracting the estimated {circumflex over (T)}−{circumflex over (P)} from A.
Construct the Model in step 660.
When the different components of the samples are classified, the next step is to quantitatively identify the concentration of each of the different components. The PCR and PLSR methods permit the prediction of the concentrations for the new samples based on their spectra, as is known from Larrain et al, “A multipurpose portable instrument for determining ripeness in wine grapes using NIR spectroscopy”, IEEE Trans. Instrum. Meas., Vol. 57, No. 2, 294-302, February 2008.
Calibration using PCR or PLS can be very simple if we consider only black powder 150 as a single compound and ignore all identities and concentrations of the other compounds.
The PCR in step 663 is performed through four main steps.
c=T·{circumflex over (r)} (10)
where c is the known concentrations in the mixture spectra in the gas stream 140, and r is a column vector, which represents the estimated regression coefficient whose length equals the number of PCs. r can be estimated by the known c and (T) (obtained from PCA) as
{circumflex over (r)}=T
+
·c. (11)
This allows the PCR approximation of the concentration C(CPR) vector to be computed
c
(PCR)
=T·T
+
·c. (12)
T+ is the pseudo inverse of T. If there are numerous compounds of interest, the vector c can be expanded to a matrix (C), in which each column corresponds to a compound
C=T·R. (13)
In order to estimate the quality of prediction, the equation (12) is applied to the test or validation set before estimating real data of unknowns.
The PLSR components in step 666 are acquired using both (A) and c data simultaneously, which maximize the covariance between them. The covariance in PLSR is modeled by finding a variable that maximizes the product of the experimental data with the concentrations. Basically, the PLSR assumes that errors exist in both blocks, which are equally important as opposed to PCR which assumes that all the errors are in the measured data. The PLSR is presented by
A=T·P+E
c=T·q+f (14)
where the first equation in (14) appears similar to that of PCA except that the scores matrix (T) models both the concentrations and the spectra. The vector q in equation (14) has some analogy to a loadings vector and it is estimated by regressing c onto T. f is the error vector for the c block and it is calculated by subtracting the estimated T·q from c. After defining the new scores and loadings matrices and vectors the regression is done the same way as PCR.
Validate the Model Using Cross Validation—Step 670.
The optimal number of PCs is determined by cross validation. The LOO cross validation is used in this disclosure. This is done by removing one sample from the calibration set, using the remaining for calculating a new calibration, and using the new calibration to predict the concentrations of the removed sample. Each prediction is then compared with the actual concentration, which is already known, as the removed sample is part of the total calibration set. This procedure is repeated N times (where N is the number of samples in the calibration set), each time leaving out one sample and performing the calibration on it until all samples are tested. This is done in order to determine the best number of PCs (or factors) by trying all numbers of factors.
Both the PCR and the PLSR models for NIR, MIR, and Raman spectroscopy were evaluated to determine their efficiency. The following criteria were calculated and compared.
Predicted Residual Sums of Squares
The size of the errors in the models can determine their quality. Therefore, the sum of squares of E (in PCR and PLS) and f (in PLS) is calculated which measures the accuracy of the prediction by taking the sum over all squared differences between cross validation predicted and true known qualities for all N samples
Also, the number of significant PLS and PCR components are estimated according to the size of these errors using cross validation, the smaller the error is, the better the model.
Coefficient of Determination R2
The coefficient of determination R2 provides a measure of how well future outcomes are likely to be predicted by the model. It is represented by the total sum of squares divided by the residual sum of squares all subtracted from 1
yi is the observed value, fi is the predicted value, and
Ideally, a perfect model has R2=1, however, in practice a high value of R2 almost equal to one is enough to represent a good model.
For a process device, the computation time is a factor in order to rapidly monitor the continuous process. The less required computation time of the designed model, the faster the analysis is done. The computation time takes into account the preprocessing task, as well as the PCR or PLSR timing requirements. For the offline experiment, the computation time required for running the MATLAB code for the preprocessing task and the PCR/PLSR was calculated using built in special MATLAB codes.
In the real device, the preprocessing task, such as the smoothing operation (step 649), features local computation requirements, which can be effectively implemented on a VLSI device, such as field programmable gate array (FPGA). Hence, a first in first out memory device is fed to the smoothing circuit to provide the input noisy spectrum. In this way, the filtered spectrum is generated on the fly with no delay. The number of logic blocks used within the FPGA device is proportional to the window size of the filter being considered. Hence, for a typical window size of eight (8), seven (7) logic blocks are required. This constitutes a negligible hardware requirement with regard to the capacity of modern FPGA devices, which contain hundreds of thousands of logic blocks. The remaining resources can be used for the post processing tasks.
The mean squared error of prediction (MSEP) is often used to assess the performance of regressions. Furthermore, the MSEP is used for selecting the optimal number of components in (PCR) and (PLSR). In order to perform the MSPE, the training data set (L={xi,yi)}) of nL observations is randomly divided into K segments Lk, where k=1 . . . to . . . K, of approximately equal size. The equation (19) represents the MSPE where fk is the predictor (PLSR and PCR) trained on L/Lk, i.e., all observations not in Lk. The K-fold cross validation estimate is
where the inner sum is taken over the observations in the kth segment. The LOO cross validation is the K-fold cross validation with K=nL.
Materials: The black powder samples were obtained from ASAB field, GASCO, Abu Dhabi, United Arab Emirates.
Instrumentation. A UV-vis-NIR Carry 5000 spectrophotometer was used for the NIR measurements. The measuring method was transmittance and the NIR spectra were obtained as absorbance in the 800-2200 nm range with a resolution of 1 nm.
The FT-MIR transmission spectra were recorded on a Vertext-70 from Bruker FT-MIR spectrometer (Appendix E) to obtain the MIR spectra. The spectra were recorded at 4 cm−1 resolution in the 525-3897 cm−1 spectral range.
Raman spectra were obtained using LabRam HR spectrometer, manufactured by Horiba Scientific. The He—Ne laser operates at 633 nm with a maximum power of 2 W and a focal length of 50 mm. A laser output power of 1.2 W was used, which was low enough to prevent possible laser induced sample damage and a high signal to noise ratio. Data were collected at 1 cm−1 resolution. Spectra were used in the Raman shift range between 150 and 2000 cm−1.
All of the black powder samples were stored and their spectra were obtained at 25° C. room temperature. The spectral range specified for each measurement was determined by the spectrometers used.
Sample Preparation and Recording of Spectra
For the NIR spectra, ten samples of the black powder 150 ranging from 200 to 2000 ppm were prepared. The black powder 150 was mixed with distilled water in an ultrasonic-based mixer for 30 min to suspend the black powder particles 150 in order to mimic its suspension in the gas process. After mixing, the black powder 150 was quickly transferred to a cuvette to take the measurement while the particles of the black powder 150 are still suspended in the liquid. Another cuvette containing distilled water was used as a reference.
In another set of experiments, ten spectra were acquired using MIR and Raman spectroscopy directly without any sample preparation. Samples with different dry black powder contents were prepared by varying the depth or thickness of the black powder layer facing the MIR/Raman light source. The depth of powder was 2-10 mm.
Data Processing
All data processing was coded in MATLAB programming language, Version 7.0.1 (the Math Works, Natick, Mass., USA).
Spectral Features
PLSR and PCR Calibration Models for NIR, MIR, and Raman Spectroscopy
In order to simplify the calibration process, the pure natural gas spectrum should be extracted from the acquired online spectrum before analyzing the data. In an attempt to mimic the black powder 150 in real natural gas pipelines 130, which contain many different contaminants, sand, methane gas, and ethane gas spectra were added to the black powder spectra.
In both the PLSR and PCR calibration models, the spectral range and number of PLSR factors are critical parameters and the calibration performance depends on them. Therefore, only the regions (1300-3000 cm−1) of the MIR, (1300-1900 nm) of NIR and (200-1400 cm−1) of the Raman spectra were considered as these ranges contain most of the useful information. Decreasing the calibration regions also helped in increasing the speed of the analysis and thus save computational time. This spectral range is further reduced and only critical ranges, which include information about the black powder should be considered to avoid the effect of sand. The chosen spectral range must include information describing the concentration variation of the black powder while excluding regions conquered by noise or other constituents. The proper spectral ranges can be recognized by calculating the correlation spectrum for each constituent of interest (
The optimal number of components for PCR and PLSR is determined before the predictions of new samples; it is a part of the calibration. The optimal number of factors is the number that results in the best prediction; hence, the optimum number of factors was identified as the number of factors that result in minimum predicted residual sums of squares (PRESS). The evaluation of the calibration and prediction performances is estimated by calculating the coefficient of determination R2 and the MSPE values. Prior to calibration, the NIR, MIR, and Raman spectra were mean centered (step 343) and normalized (step 646) while only the MIR and Raman spectra were smoothed (step 649).
In order to test PCR and later PLSR, a random selection of three validation samples from the total data set were removed. The remaining seven spectra and their known concentrations serve as the calibration set that is used then to predict the unknown concentrations of the validation set. The predicted concentrations are then compared with their known concentrations.
The MSPE for the PLSR is 0.0008731, 0.0001983, and 5.04e-5 for NIR, MIR, and Raman, respectively; while for the PCR it is 0.0009065, 0.0002068, and 5.099e-5, see
Furthermore, in order to validate the model, the prediction of the three validation samples is performed and shown in
This disclosure discusses different IR spectroscopic techniques for gas monitoring in the pipelines and the computation time for the prediction analysis is a factor. The computation time for all three techniques as a function of PLSR and PCR factors is shown in
Comparing PLSR and PCR Methods
In view of the similarity of the PRESS results for PCR and PLSR, it is anticipated that the predicted concentrations are very similar for the three methods. Comparing the R2 and MSPE values for the PLSR and PCR, it can be concluded that both methods are almost indistinguishable in their outcome. However, PLSR seems to reach optimal prediction with fewer factors than PCR. Also, PLSR seems to be accomplishing the prediction analysis faster than PCR (
Comparing NIR, MIR, and Raman Techniques
As shown in
On the other hand, the MIR spectra are the richest in information among all three techniques, as evident from
Although NIR is poor with obvious information content, sophisticated chemometric methods, such as PLSR and PCR can be applied to its spectra to extract useful information and perform quantitative analysis. In addition, its ability for online monitoring via optical fibers and its multiplexing capabilities make NIR spectroscopy preferable to MIR spectroscopy despite the slightly better results of MIR shown in
The foregoing description of the preferred embodiment of the invention has been presented for purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise form disclosed, and modifications and variations are possible in light of the above teachings or may be acquired from practice of the invention. The embodiment was chosen and described in order to explain the principles of the invention and its practical application to enable one skilled in the art to utilize the invention in various embodiments as are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the claims appended hereto, and their equivalents. The entirety of each of the aforementioned documents is incorporated by reference herein.
The present application is a continuation-in-part of U.S. Non-provisional patent application Ser. No. 14/639,473 filed by the present inventors on Mar. 5, 2015. The aforementioned provisional patent application is hereby incorporated by reference in its entirety.
Number | Date | Country | |
---|---|---|---|
Parent | 14639473 | Mar 2015 | US |
Child | 15060865 | US |