in its molecular structure more than 400 compounds with four to twelve carbons, including paraffins, isoparaffins, naphtenes, olefins and aromatics, besides a 23 ...
Application of artificial neural networks for conformity analysis of fuel performed with an optical fiber sensor Gustavo Rafael Collere Possetti , Francelli Klemba Coradin , Lilian Cristina Cocco , 9 • • 1 ^ • Carlos Itsuo Yamamoto , Lucia Valeria Ramos de Arruda , Rosane Palate , Marcia Muller , Jose Luis Pabris ^Programa
de Pos-Graduagao em Engenharia Eletrica e Informdtica Industrial, Universidade Tecnologica Federal do Parana, Av. Sete de Setembro 3165, 80230-901, Curitiba, Parana, Brazil ^Departamento de Engenharia Quimica, Universidade Federal do Parana, Centro Politecnico s/n, Usinas Piloto A, 81531-990, Curitiba, Parana, Brazil ^Departamento de Informdtica, Universidade lade Estadual de Ponta Grossa, Av. (General Carlos Cavalcanti 4748, 84030900, Ponta Grossa, Parana, Brazil
Abstract. The liquid fuel quality control is an important issue that brings benefits for the State, for the consumers and for the environment. The conformity analysis, in special for gasoline, demands a rigorous sampling technique among gas stations and other economic agencies, followed by a series of standard physicochemical tests. Such procedures are commonly expensive and time demanding and, moreover, a specialist is often required to carry out the tasks. Such drawbacks make the development of alternative analysis tools an important research field. The fiiel refractive index is an additional parameter to help the fuel conformity analysis, besides the prospective optical fiber sensors, which operate like transducers with singular properties. When this parameter is correlated with the sample density, it becomes possible to determine conformity zones that cannot be analytically defined. This work presents an application of artificial neural networks based on Radial Basis Function to determine these zones. A set of 45 gasoline samples, collected in several gas stations and previously analyzed according to the rules of Agenda Nacional do Petroleo, Gas Natural e Biocombustiveis, a Brazilian regulatory agency, constituted the database to build two neural networks. The input variables of first network are the samples refractive indices, measured with an Abbe refractometer, and the density of the samples measured with a digital densimeter. For the second network the input variables included, besides the samples densities, the wavelength response of a long-period grating to the samples refractive indices. The used grating was written in an optical fiber using the point-to-point technique by submitting the fiber to consecutive electrical arcs from a splice machine. The output variables of both Radial Basis Function Networks are represented by the conformity status of each sample, according to report of tests carried out following the American Society for Testing and Materials and/or Brazilian Association of Technical Rules standards. A subset of 35 samples, randomly chosen from the database, was used to design and calibrate (train) both networks. The two networks topologies (numbers of Radial Basis Function neurons of the hidden layer and function radius) were built in order to minimize the root mean square error. The subset composed by the other 10 samples was used to validate the final networks architectures. The obtained results have demonstrated that both networks reach a good predictive capability. Keywords: Optical Fiber Sensor, Long-period Grating, Artificial Neural Networks, Fuel Quality Control. PACS: 42.81.Pa42.81.Wg, 42.82.Ds
INTRODUCTION Problems with fuel quality are usually associated with both the production process at industrial levels and eventual adulteration carried out during the distribution processes. The use of such debased fuels can be harmful to the consumers, by m e a n s of successive wastes with vehicular maintenance or with excessive consume, to the State by means
CP992, RIAO/OPTILAS 2007, edited by N. U. Wetter and J. Frejlich © 2008 American Institute of Physics 978-0-7354-0511-0/08/$23.00
265 Downloaded 30 Apr 2008 to 184.108.40.206. Redistribution subject to AIP license or copyright; see http://proceedings.aip.org/proceedings/cpcr.jsp
of fiscal evasion, or to the environment that receives undesired pollutants. Thus, the continuous monitoring of fuels is fundamental to reduce the non-conformity levels, serves as an indicative parameter to the regulatory agencies and supports activities of Public Ministry and Technical Police. Originated from the oil refine process, gasoline stands out for being the main fuel for motorized vehicles. It is a complex blend of liquid hydrocarbons, volatile and flammable. In special, the Brazilian commercial gasoline possesses in its molecular structure more than 400 compounds with four to twelve carbons, including paraffins, isoparaffins, naphtenes, olefins and aromatics, besides a 23 % (v/v) of anhydrous ethanol . Nowadays, in Brazil, the monitoring of fuels quality is carried out by means of a rigorous sampling technique among gas stations and others economic agencies, followed by a physicochemical laboratorial assessment of the samples. The Brazilian regulatory agency for petroleum production and commercialization, ANP (Agenda Nacional do Petroleo, Gas Natural e Biocombustiveis), has established a national program for quality control of fuels (Portaria 309/2001) with the standard assays for the automotive gasoline in the national territory. Since 1999 up to 2007 the ANP, by means of the laboratories responsible for monitoring the quality of automotive fuels, supervised about 160.000 economic agencies, among them 30 % showed irregularities and 12 % were interdicted or suffered sanctions due to the non-conformity of the products. In the fuel monitoring, samples of gasoline are collected and evaluated by using the American Society for Testing and Materials (ASTM) and/or Brazilian Association of Technical Rules (ABNT) standard methods. For this purpose, a series of physicochemical tests are done, including the determination of the look, samples anhydrous ethanol content (ABAC), distillation curve, octane number, density, vapor pressure, gum, induction period, copper corrosivity, and hydrocarbon, sulfur and lead content, as well as gas chromatography analysis. Nevertheless, such tests take some amount of time to be concluded and a specialist is often required to do the analysis, and the development of alternative tools is very important. The refractive index of samples is a parameter to be considered for the conformity analysis of liquid fuels, and fiber optic sensors present properties like electrical passive operation, electromagnetic immunity and high fusion point, that make them appropriate to be used for such purposes . Among them, long period gratings (LPG) stands out. These devices are an axial periodic modulation in the fiber core refractive index, which couples light from the fundamental core mode to cladding co-propagating modes whenever a phase-matching condition is fulfilled. This coupling results in several attenuation bands in the fiber transmission spectrum, whose central wavelengths are determined by the difference between the core and cladding modal effective refractive indices, besides the grating period. This devices can be used as temperature, strain and refractive index sensors . However, when the cross sensitivity is controlled, the sensor response becomes a function solely of changes in the effective refractive index of cladding modes, what in turn is critically dependent on the refractive index of the surrounding medium. The determination of solely the sample refractive index (or, equivalently, the resonance wavelength of a LPG in contact with a substance) is not enough to determine the gasoline conformity. However, by correlating one of these parameters with the sample density (a characteristic ruled by ANP), it is possible to determine conformity zones analytically defined . In this context, the goal of this work is to develop an artificial neural network (ANN) that can be able to define such zones. The chosen neural network is a Radial Basis Function (EU3F) network with three layers. A set of 35 samples was used to build the network with the measured values of samples refractive indices and density, the latter according to ANP standards. Another subset of 10 samples was used to validate the final architectures, and the obtained results showed that networks reached a good predictive capability.
ARTIFICIAL NEURAL NETWORK The conformity analysis of liquid fuels and the definition of a conformity zone as described above can be considered as a pattern classification problem with non-linear characteristics and correlated measurements. Since 1960, artificial neural networks has been trained to successful perform pattern classification and recognition. Nowadays many solutions to real world examples that use sophisticated architecture and training rules have been reported in the literature [5, 6]. In general, the solution of pattern recognition by means of ANN is decomposed in two parts: feature extraction and classification. If a multilayer feedfoward network with supervised learning algorithm is used, the feature extraction is performed by the neurons in the hidden layer(s) and the classification by the output layer. The main architectures with these properties are the Multilayers Perceptrons (MLP) trained with back-propagation algorithm and the RBF Networks.
266 Downloaded 30 Apr 2008 to 220.127.116.11. Redistribution subject to AIP license or copyright; see http://proceedings.aip.org/proceedings/cpcr.jsp
They are both universal approximators. While the MLP build global approximation to one non-linear mapping problem, the RBF with exponentially decaying (e.g. Gaussian function) gives a local approximation for the same problem. However, RBF function is able to implement any arbitrary non-linear transformations of the input space. That is not the case to MLP networks. Moreover, the computational effort to train a RBF is less expensive to the MLP training [6, 7]. In this paper, a RBF network with Gaussian function is proposed to analyze the fuel conformity. Three layers with different roles compose the RBF network, as shown in Fig. 1. The nodes in the first layer receive the input signal from environment and propagate them to the second layer. This second layer is a high dimensionality non-linear hidden layer. The dimension of the hidden layer is related to the capacity of the network to approximate an input - output mapping. The output layer produces the linear separability of the hidden space . The choice of RBF network to solve the conformity problem described above is justified by the Cover theorem . According to this theorem, a pattern classification problem cast in a high dimensional space is more likely to be linearly separable than in a low dimension. In addition, the higher the dimension of the hidden space, more accurate the approximation will be. f
Hidden Layer \b7\
\ W i
_^^_——C^p^)^-~_W2 (^X J ) ^ ^ ^ ^
Wi_^--^ ^^^C^XIEI W N /
FIGURE 1. The Radial Basis Function (RBF) Networks Architecture. In a RBF network, all neurons in the hidden layer receive the «-dimensional input vector and pass them trough a set of non-linear strictly positive radial functions 9j like Gaussian functions:
9j =(Pj(x) = cpj|x-Cj||)=exp - log 2
where Cj e $R" is the center of each RBF, P is the spread factor that models the kernel of each function, and || . || is the euclidean norm defined in $R". The RBF output layer has one neuron connected to all neurons in the hidden layer and presents as output a weighted summation of the hidden layer output expressed by:
y = y(x) = bo + X (WjCPj (x) + bj )
where Wj and bj are respectively the adjustable weight and bias of the j-th neuron. The accuracy of the RBF depends on the correct choice of the number of neurons and the spread factor of the radial function in the hidden layer. Considering a set of known input-output data and a fix spread, a constructive procedure is used to add neurons to the hidden layer until it meets the specified mean squared error goal. In addition the weight and bias of the output layer are computed by the well known training algorithm geweraftzeJ c/e/to rule .
267 Downloaded 30 Apr 2008 to 18.104.22.168. Redistribution subject to AIP license or copyright; see http://proceedings.aip.org/proceedings/cpcr.jsp
METODOLOGY A set of 45 samples of gasoline conform to the standards collected among several gas stations, previously analyzed at an ANP certified laboratory (LACAUT, Laboratorio de Analises de Combustiveis Automotivos, UFPR), was submitted to three systems to determine the density (d), the refractive index (n) and the resonance wavelength (X) of an LPG-based optical fiber sensor immersed in the samples. The LPG was engraved in the fiber by using a point-to-point writing method , resulting in a device with period of 595 ]im and 60 interaction points. The fiber with the sensor was inserted into a glass cell with a capacity of 15 mL, through two side openings (Fig. 2). The fiber tips were fixed onto supports in order to keep constant the strain applied to the device. Two additional openings (in the top and bottom of the glass cell) were employed to insert and to drain the samples. Light from a super-luminescent LED (central wavelength 1550 nm, bandwidth of 52 nm FHWM) was coupled to one fiber tip, while the other one was connected to an optical spectrum analyzer (OSA, Anritsu-MS9710B), set to a resolution of 0.1 nm and + 5 pm of wavelength stability. The transmission spectrum was acquired and processed by a computer via RS-232 interface to determine the LPG central dip wavelength. The samples refractive indices were measured with an Abbe type refractometer (Bausch & Lomb), operating at a wavelength of 589.3 nm and with precision of + 0.0002 and resolution of + 0.0001. To measure the samples densities was employed an automatic densimeter (Antoon Paar, DMA 4500). To avoid influence of temperature in the experiments, an air conditioner was employed to keep the temperature constant within (20 + 0.5) °C.
FIGURE 2. Experimental setup employed with a LPG as a sensor device. The parameters d, n and 1 were chosen as input signal to both RBF networks, implemented with the software Matlab 6.5 with the help of the special library Neural Network Toolbox Version 4.0.2 (R13). The first network (RBF_1) inputs (x) were the refractive index n (1.3850 > n > 1.4515) and the density d (735 kg/m^ > d > 770 k g W ) of the samples. For the second network (RBF_2), the samples densities and the fiber grating sensor response 1 (1512.0 nm > 1 > 1514.5 nm) were included into the input vector x. The output values y of both RBF are the conformity status of each sample, according to the result of assays following the ASTM and/or ABNT standards; y = 1 and y = 0 stands for conform and non-conform gasoline status, respectively. A subset of 35 samples (10 conform and 25 non-conform), randomly chosen from the initial database, was used to build and train both RBF. The number of neurons of the hidden layer and the spread factor p of each ANN were varied in order to obtain minimal root mean square error and the best predictive capability. A subset containing 10 samples (4 conform and 6 non-conform) was used to test and validate the architectures. The efficiencies of both topologies are visualized by means of a bi-dimensional grid with 1000 points from the observation planes.
268 Downloaded 30 Apr 2008 to 22.214.171.124. Redistribution subject to AIP license or copyright; see http://proceedings.aip.org/proceedings/cpcr.jsp
RESULTS AND DISCUSSIONS Several simulations were carried out in order to obtain the optimized topologies of both RBF; the summarized results are showed in Tables 1 and 2 to the RBF_1 and RBF_2, respectively. The following index were used to analysis the network performances: means square error (sse) during the training step, the probability of correct classification (P) for a tolerance limit of + 0.2, the mean value (E„ea„) and standard deviation (cr) of errors. The computations were firstly carried out for fixed values of P and for variable values of N (number of neurons). Simulations of both ANN (EU3F_1 and RBF_2) showed that, over the training stage and for a fixed value of p, the sse value diminishes and P increases as the number of neurons of hidden layer rises. However, during the testing stage, its generalization ability is better for intermediate values of neurons (N = 11, e.g.), resulting in an increase in the probability of correct classification, i.e., there is a trade-off between the ANN performance and its generalization ability. The reason for this behavior is that for high values of N, to each input value it is associated one RBF neuron, that is, each input corresponds to one pattern or class. For low values of N, there are no enough neurons able to classify all different patterns. For a fixed value of N and increasing values of p, sse also increases and the probability of correct classification during the training diminishes. The larger spread is the harder separation of class and more difficult is the training step. Too small a spread means many neurons are required to fit a smooth function, and the network might not generalize well. The better trade-off between performance and generalization ability can be reached satisfactorily for p = 1.
TABLE 1. Synthesis of results obtained for RBF 1 (x == [d,n]^). Training P == 1 N sse P(%) ^med 4 3,5626 54,2857 0,2280 11 0,4241 91,4286 0,0632 35 0,1957 94,2857 0,0383 N = 11 Training sse P(%) ^med P 0,02 0,4449 100 0,0023 1 0,4241 91,4286 0,0632 0,7975 82,8571 0,1056 20
TABLE 2. Synthesis of results obtained for RBF 2 (x == [d,Xf)Training P == 1 N sse P(%) ^med 4 0,8440 82,8571 0,1125 11 0,2778 94,2857 0,0423 35 0,1957 97,1429 0,0501 N = 11 Training sse P(%) ^med 3 0,02 0 100 0,1125 0,2778 94,2857 0,0423 1 1,2701 71,4286 0,1321 20
Testing a 0,2264 0,0833 0,0638
P (%) 60 70 30
c 0,0091 0,0833 0,1082
P (%) 60 70 30
a 0,1085 0,0792 0,0549
P (%) 70 80 60
a 0,1085 0,0792 0,1392
P (%) 60 80 40
0,2113 0,1731 4,2609 Testing ^med
0,4000 0,1731 0,5772
a 0,2132 0,2362 10,0722 c 0,5163 0,2362 0,5604
0,1846 0,1489 0,2542 Testing ^med
0,4000 0,1489 0,2229
a 0,2331 0,1996 0,2997 a 0,5164 0,1996 0,1244
Figures 3 (a) and (b) show the RBF_1 and RBF_2 responses to a simulated database. Full circles (•) and opened squares (D) stands for conform and non-conform samples used to construct and validate the described architectures. By visual inspection of this graphics, RBF_2 is a little superior than RBF_1, probably because of the low range of refractive indices of samples (about 10'''). The use of a normalized dataset can reduce this difference.
269 Downloaded 30 Apr 2008 to 126.96.36.199. Redistribution subject to AIP license or copyright; see http://proceedings.aip.org/proceedings/cpcr.jsp
a: i5i3.oHnininininn •
conform by non-conform by RBF
confomi by RBF
non-conform by RBF
conform data non-conform data
FIGURE 3. Visual performance of calculated RBF, (a) RBF_1 and (b) RBF_2, for N = 11 e p = 1.
CONCLUSIONS The obtained results showed that artificial neural networks can be used to determine the fuel conformity assessed by fiber gratings sensors. Even for the limited number of used samples, a probability of correct classification of 70 % and 80 % was reached for RBF_1 and RBF_2, respectively, during the testing stage, for 11 neurons and a spreading constant equals to 1. For a more extended dataset the conformity zones can be better delimited, increasing the probability of correct classification. The samples refractive indices can be combined to other physicochemical parameters than density, in order to extend the method for fuel characteristics that could be determined with the fiber sensor itself, making the conformity determination faster, easier and less expensive.
ACKNOWLEDGMENTS This work is partially supported by CAPES, CNPq, FINEP, Fundajao Araucaria and ANP - Agenda Nacional do Petroleo, Gas Natural e Biocombustiveis - by means of Programa de Recursos Humanos da ANP para o Setor do Petroleo e Gas PRH-ANP/MCT (PRHIO-UTFPR).
REFERENCES S. H. F. Scafi, "Sistema de Monitoramento em Tempo Real de Destila9oes de Petroleo e Derivados Empregando a Espectroscopia no Infravermelho Proximo", Tese de Doutorado, UNICAMP, 2005. R. Falate, R. C. Kamikawachi, M. MuUer, H. J. Kalinowski and J. L. Fabris, "Fiber Optic Sensors for Hydrocarbon Detection", Sensors and Actuators B 105, 4 3 0 ^ 3 6 (2005). J. Sun, C.C. Chan, K.M. Tan, X.Y. Dong and P. Shum, "Application of an artificial neural network for simultaneous measurement of bending curvature and temperature with long period fiber gratings". Sensors and Actuators A 131, 262-267 (2007). G. R. C. Possetti, R. Falate, L. C. Cocco, C. I. Yamamoto, M. MuUer and J. L. Fabris, "Application of an optical fiber sensor in the analysis of Brazilian gasoline conformity" in Optics Technical Digest, edited by N. A. S. Rodrigues, XXX ENFMC, Sao Louren9o, MG, 2007, pp. 233-236. L. Fausset, "Fundamental of Neural Networks", Englewood Cliffs, NJ, Prentice-Hall, 1994. S. Haykin, "Neural Networks: a Comprehensive Foundation", 2" edition, Prentice-Hall, 1999. M. C. F. Castro, "Predi9ao Nao-Linear de Series Temporais Usando Redes Neurais RBF por Decomposi9ao em Componentes Principals", Tese de Doutorado, UNICAMP, 2001. R. Falate, "Redes de Periodo Longo Fabricadas com Arco Eletrico como Sensores para Parametros Fisico-Quimicos", Tese de Doutorado, UTFPR, 2006.
270 Downloaded 30 Apr 2008 to 188.8.131.52. Redistribution subject to AIP license or copyright; see http://proceedings.aip.org/proceedings/cpcr.jsp