12

Click here to load reader

Chemometric Data Analysis Using Artificial Neural Networks

  • Upload
    masoud

  • View
    221

  • Download
    3

Embed Size (px)

Citation preview

Page 1: Chemometric Data Analysis Using Artificial Neural Networks

Chemometric Data Analysis Using Artificial Neural Networks

Y I N G LIU, B E L L E R. U P A D H Y A Y A , * and M A S O U D N A G H E D O L F E I Z I Department of Nuclear Engineering, University of Tennessee, Knoxville, Tennessee 37996-2300

The on-line measurement of chemical composition under different op- erating conditions is an important problem in many industries. An ap- proach based on hybrid signal preprocessing and artificial neural net- work paradigms for estimating composition from chemometric data has been developed. The performance of this methodology was tested with the use of near-infrared (NIR) and Raman spectra from both laboratory and industrial samples. The sensitivity-of-composition estimation as a function of spectral errors, spectral preprocessing, and choice of param- eter vector was studied. The optimal architecture of multilayer neural networks and the guidelines for achieving them were also studied. The results of applications to FT-Raman data and NIR data demonstrate that this methodology is highly effective in establishing a generalized mapping between spectral information and sample composition, and that the parameters can be estimated with high accuracy.

Index Headings: Artificial neural networks; Chemometric data; Com- position estimation; Sensitivity analysis.

INTRODUCTION

The analysis of energy spectra in various ranges of the electro-magnetic spectrum has been used extensively in many applications. Of specific interest in process and power industries is the issue of composition analysis of chemical samples. On-line analysis of stream composi- tion is important for effective control of complex chem- ical processes. Other industrial applications include anal- ysis of effluent gases from power plants, monitoring of air pollution, analysis of lubrication oil (both for com- position and wear particle sizes), and monitoring of chemical control of reactor coolant and boiler water chemistry.

Infrared (IR) spectroscopy is one of the widely used techniques in analytical chemistry. 1 This technique in- volves the energy levels in the IR region of the spectrum (wavenumbers from 10,000 to 10 cm-1), with the region from 10,000 to 4000 cm -1 known as the near-infrared (NIR). Most molecular energy levels are associated with internal vibrations of molecular structure, and IR spec- troscopy is the measurement of the absorption or emis- sion of photons to or from one of these statesY Raman spectroscopy is the "inelastic scattering of photons" about the IR energy levels. It does not involve absorption or emission from the energy levels directly, but shifts in frequencies about the energy levels. Raman spectroscopy has several advantages over IR spectroscopy. The pur- pose of the present research and development is to apply neural networks technology for extracting information from IR and Raman spectra of chemical samples.

Multiple linear regression is one of the mathematical techniques used to estimate useful properties of mate- rials and extract pertinent information present in Fou- rier-transformed Raman spectra. This technique as-

Received 20 July 1992. * Author to whom correspondence should be sent.

sumes that the properties of the material are linearly related to spectral features. Therefore, the prediction value of an unknown sample composition is largely re- liable in the linear range covered by the calibration sam- ples) The methodology developed here provides a gen- eral relationship between spectral signatures and percent composition of chemical samples, wear particle sizes in lubrication oil, and characteristics of effluent gases.

The Back-Propagation Network (BPN) algorithm 4 is currently the most widely used neural network paradigm for training multilayer perceptrons. This algorithm was implemented in relating spectral data with sample con- centrations. Multilayer neural networks are capable of creating complex decision surfaces and have been applied to many pattern-mapping problems) However, there are two critical issues in network learning: estimation error and training time. These issues may be affected by two factors: the factor related to the neural network archi- tecture, which includes the number of hidden nodes, number of hidden layers, and values of learning param- eters, and the factor related to the training set, which includes the number of training patterns, inaccuracies of input data, and preprocessing of data.

During the past ten years, artificial neural networks have been applied to a wide variety of industrial prob- lems. Examples of specific areas include image process- ing, s vision, 7 speech synthesis and recognition, s sonar and seismic signal classification, 9 financial analysis problems, robot motion control and knowledge processing, 5 signal validation, 1° power plant status identification, vibration monitoring, and others. The topic of neural computing has generated widespread interest and attention in many areas.

The back-propagation network algorithm has been central to most of the current study on learning in neural networks. Its inherent ability to build arbitrary nonlinear boundaries between input and output layer represen- tations allows the BPN to solve a variety of pattern map- ping problems. '1-13 Another typical pattern recognition application of a BPN is the identification of undersea targets from sonar returns. 9 The use of artificial neural networks for the estimation of chemical composition through spectroscopic data analysis is a new area of ap- plication. Previously, the estimation was performed by mathematical modeling which utilizes multiple linear re- gression or the partial-least squares algorithm. 3 Recently, the interest in applying artificial neural networks in this area has been steadily increasing. 14

The features of the back-propagation algorithm are found to be quite appropriate for the analysis of che- mometric data, although certain signal preprocessing is often necessary. Thus, it is used as the estimation tool for chemical composition analysis in the present re- search. Several issues concerning methodology devel-

12 Volume 47, Number 1, 1993 0003-7028/93/4701-001252.00/0 APPLIED SPECTROSCOPY © 1993 Society for Applied Spectroscopy

Page 2: Chemometric Data Analysis Using Artificial Neural Networks

opment were addressed. These include the identification ~000 of appropriate neural network architecture, use of an ~G00 ensemble of networks for the same training data, influ- ence of inaccurate spectral patterns and sensitivity anal- "°° ysis, choice of training patterns, and information pre- ~200 processing. ~ ooo

The major results of this research are:

1. Development of an optimal network based on exper- ~ ~o0 imental evaluation of the number of hidden layer nodes .~ coo in a multilayer perceptron. 400

2. Study of network performance with respect to chang- ing signal-to-noise ratios of input spectra. 200

3. Study of the sensitivity of sample composition to 0 change in certain pre-defined spectral regions.

4. Study of the convergence of network connection weights during training. FIG. 1.

5. Use of an ensemble of networks to obtain an improved nents. estimation of percent composition of chemical sam- ples.

6. Appropriate preprocessing of both input and output information to achieve maximum sensitivity in esti- mating desired properties.

7. Demonstration of the methodology with applications to data from Measurement and Control Engineering Center member companies, and the University of Tennessee Raman Laboratory.

8. Development of a set of guidelines for implementing this approach for processing near-infrared and Raman spectra.

ARTIFICIAL NEURAL NETWORKS FOR INFORMATION PROCESSING

Statement of Problem. The energy consumed in dis- tillation processes in the United States represents nearly 3 % of the total energy consumption. It is estimated that effective control of distillation columns could reduce the cost of chemical products? As a result of industry and government interest, the Measurement and Control En- gineering Center at the University of Tennessee under- took a research effort to develop a prototype on-line system to measure distillation column composition.

One of the tasks was to develop methodologies to es- timate chemical composition from Raman and NIR spec- tra. The use of artificial neural networks is considered for mapping spectral information and sample composi- tion. The assumption of a specific model structure is not necessary in this characterization, and a complex-to-sim- ple mapping can be readily obtained.

A chemical sample containing five components (n-hex- ane, iso-octane, toluene, p-xylene, and decane) was used for generating baseline Raman spectroscopic data. Figure 1 shows a typical FT-Raman spectrum of the above sam- ple. Most of the information is concentrated in two wave- number ranges. It is important to note that specific peaks in the spectra have direct relationship to certain com- ponents. The relationship between chemical composition and the spectral range may not be always one-to-one. There are often overlaps among the spectral features, thus reducing sensitivity to sample composition. The known features of spectra are useful while one is per- forming data preprocessing and verifying the capabilities of the methodology in real applications.

500 I000 1500 2000 2500

data points

i

I

I

3000 0500 4000

A typical FT-Raman spectrum of a sample with five compo-

Artificial Neural Networks. Artificial neural networks have been successfully applied in many areas during the past few years. In this research, neural network meth- odology was applied to Raman and NIR spectra of chem- ical mixtures to produce quantitative estimation of con- centration of chemical components. Spectra from samples containing five components (n-hexane, iso-octane, p-xy- lene, toluene, and decane) were used in the general study presented here. The multilayer feedforward network, trained with a back-propagation algorithm, was chosen to estimate the concentration of chemical components in the mixture using Raman spectral signatures. The feasibility of using the back-propagation network for this application was studied on the basis of the following observations:

1. Artificial neural networks are very effective in relating quantities for which a physical or empirical model is not fully described.

2. The given data set requires a supervised learning mod- el.

3. A multilayer feedforward neural network is the most suitable network for generating a nonlinear relation- ship for a given problem.

4. The pattern mapping is the most suitable problem to model with the use of back-propagation networks.

5. A preliminary test using the back-propagation net- work showed very encouraging estimation results.

A typical multilayer neural network model is shown in Fig. 2. The input to the network is a set of selected intensities in the Raman spectrum, and the output of the network is a vector of percent concentration of chem- ical components. The neural network was first trained to learn the functional relationship between the input and output signals by presenting a sequence of inputs and a set of expected outputs. In this application, the training data pair was composed of a sequence of inten- sities of a Raman spectrum and fractional concentrations of the five components. Once the network has been trained, it can be used to estimate the concentration by presenting any "unknown" Raman spectral data (inten- sities). In order to build a good model that would inter- polate parameter values in the future, it is necessary that the training data span the domain of interest completely.

APPLIED SPECTROSCOPY 13

Page 3: Chemometric Data Analysis Using Artificial Neural Networks

FIG. 2. work.

I Y~ ~2" " " Ym

'" L.;-" ~,s~" ",,,,i

HIDDEN LAYER

" . f '

" " i ' . , ; . . ,

/ %

• • • X n

Schemat ic represen ta t ion of a three- layer feedforward net-

Data Preprocessing. Data preprocessing is very im- portant in this analysis. Some of the preprocessing was made through iterative trials, whereas other methods were used that were based on consultation with analytical chemists (at industry and universities). The spectrum shown in Fig. i contains 3761 points. If all the data points were to be used, this would result in a huge neural net- work (from the standpoint of memory, computational speed, and accuracy). Therefore, before training the net- work, one must take the following steps to process the training data:

1. Dimensionality reduction. 2. Amplitude sensitive smoothing. 3. Data normalization.

The problem of dimensionality reduction is closely re- lated to feature extraction. In this application, the di- mensionality reduction is done by selecting the active ranges of the spectra. The selected ranges for the data points are located between 500 and 1200 and between 2000 and 3300 points, which makes a total of 2000 points. These points correspond to wavenumbers. Processing such a big data set was still difficult; thus the selected ranges of spectra were further smoothed with the use of an amplitude-sensitive moving average method. This method takes the average of the spectrum within a user- specified window width and an amplitude threshold. For the Raman spectra used in the present study, this smoothing process was performed by choosing the am- plitude threshold as 100, and the window width for av- eraging as 10 points. By this procedure, the final training data size was reduced to 190 points. The last step in data preprocessing was to normalize the amplitudes of the 190 points within a range of [0.1, 0.9] for each spectrum• The resultant data were finally utilized as a data learning set to train the neural networks.

The application of the Probabilistic Neural Network (PNN) or the Kohonen Self-organizing Feature Maps (KSFM) to the initial set of data was another approach

W

X

(a) Y= i xi -

THRESHOLD FUNCTION

0 , 8 i " 0 . 6

0 ,~ . .

I ~'~ - 4 - z ~ z (b) X

FIG. 3. (a) A typical computa t iona l node. (b) Sigmoidal act ivat ion function.

utilized to reduce the training data size. This data re- duction can be done by classifying the entire learning patterns into several different groups•

DEVELOPMENT OF NEURAL NETWORK MODELS

Artificial neural networks are developed to simulate the most elementary functions of neurons in the human brain, on the basis of the present understanding of bi- ological nervous systems. These network models at tempt to achieve good human-like performance, such as learn- ing from experiments and making generalizations from previous samples. The network models are composed of many nonlinear computational elements (nodes) that op- erate in a parallel distributed processing architecture. Computational elements or nodes used in neural net- works are connected by links with variable weights.

The simplest computational node sums m weighted inputs (xl , x2, x3, . . . xm) and passes the result through a nonlinear function, as shown in Fig. 3a. Note that wl, w2, w3, . . . Wm are the connection weights. Figure 3b il- lustrates three common types of nonlinear functions: step, threshold logic, and sigmoid.

A three-layer feedforward neural network structure is illustrated in Fig. 2. The first layer of the network is the input layer. The function of the input layer is to receive

14 Vo lume 47, Number 1, 1993

Page 4: Chemometric Data Analysis Using Artificial Neural Networks

external input vector values. The weighted input signals are transferred to the nodes above the input layer, known as hidden layer nodes. Each node in a hidden layer com- putes the sum of its weighted inputs and transforms this sum using an activation function (for example, sigmoidal function). The outputs from the hidden layer are then sent to every node in the output layer.

The potential benefits of artificial neural networks ex- tend beyond the high computation rates provided by massive parallelism. Neural networks have many advan- tages over traditional computing and modeling: no need for a specific model form, prediction from incomplete data, detection of data features, and construction of gen- eralized mapping. Another important advantage of neu- ral networks is that they are robust and fault tolerant. This is because neural networks encode information in a globally distributed fashion.

There are a variety of neural network architectures: Hopfield network, multilayer perceptron with back- propagation training, Kohonen self-organizing feature map, counter-propagation network, and others. In this study, multilayer perceptrons, with back-propagation training, are used. A detailed discussion of this algorithm is given in the following section.

The Back-Propagation Network (BPN) Algorithm. The back-propagation algorithm was first proposed by Ru- melhart and McClelland. 4 It is the most widely used sys- tematic algorithm for supervised learning in multilayer neural networks. The goal of the back-propagation al- gorithm is to teach the network to associate specific out- put patterns (target patterns) by adjusting the connec- tion weights in order to minimize the error between target output and actual output of the network. A gradient descent algorithm is generally used to perform the op- timization.

A back-propagation neural network is trained by su- pervised learning. During the learning procedure, a series of input patterns (e.g., Raman spectra) with their cor- responding output values (e.g., fractional chemical con- centrations) is presented to the network in an iterative fashion while the weights are adjusted.

The back-propagation learning algorithm is composed of two types of passes: the forward-propagation (forward pass) and backward-propagation (reverse pass). The for- ward-propagation executes the computation of network outputs layer by layer. The output of one layer serves as input to the next layer. The forward-propagation pro- cedure for a three-layer feedforward network is shown in Fig. 2. The notational conventions are shown in Fig. 3. Given an input vector X (xl, x2 . . . . xn) to the neural network, the node j in the hidden layer receives a net input as a summation of its weighted input and a node bias:

n

nety = ~ wijxi + Oj (1) i = l

where wij is the connection weight between unit i in the input layer and unit j in the hidden layer; x~ is the ith output from the input layer node; and 0 i is the j th node bias. The output of unit j is evaluated as

Pi = f(net j) (2)

where f is an activation function.

The net value for an output layer node k is:

netk = ~ WjkP~ + Oh. (3) j=l

The final output is produced as follows:

Oh = f(netk) . (4)

The activation function used in this network is a sig- moidal function given by

1 f (x ) 1 + e -~" fi > 0. (5)

Thus, the output of unit j in the hidden layer becomes:

1 P J - 1 + e-~"etJ (6)

In Eq. 6 the parameter fi describes the shape of the sigmoidal function. The bias for neuron j in layer p is 0y, which is used to shift the activation function along the x-axis. As the forward-propagation completes, the error between the network output and the target values is calculated.

In the back-propagation pass, the connection weights are corrected to reduce the error found after the forward propagation. This error-correction procedure is made from the output layer to the hidden layer. The Gener- alized Delta Rule (GDR) is utilized to adjust the inter- connection weights so as to reduce the square of the error for each pattern as rapidly as possible. One important parameter in the learning phase is the error value (6), which is associated with each processing unit. It reflects the amount of error associated with that unit. The error parameter is used during the weight-correction proce- dure. A large value of 5 indicates that a large correction should be made to the connection weights. The param- eter 5 is defined in the discussion that follows.

For the nodes in the output layer,

~pk = (tph -- Opk)f'(netpk) (7)

where tph = target output of node k; %k = actual network output of node k; p = a subscript denoting the pattern number; and f ' = Of/Onet.

For the nodes in the hidden layer,

i~pj = (E~phwhi)f'(netpj) (8)

where Wk~ is the connection weight between node k in the output layer and node j in the hidden layer.

The error parameter 5pk can be evaluated in the highest layer of the network by using Eq. 7. Then the error is propagated in a backward manner to the lower layers. This will allow us to calculate the parameter 5p~ at the hidden node in terms of the 5ph at the upper layer. Ac- cording to the generalized delta rule, the weight adjust- ments are made as follows. It is important to note that the "backward propagation" of the error is a natural consequence of the gradient descent algorithm.

,~ w~, = ~ j o , . (9) The parameter is the learning rate defining the step size of training, ~i is the error parameter of upper layer node j, and oi is the active value of lower layer node i.

APPLIED SPECTROSCOPY 15

Page 5: Chemometric Data Analysis Using Artificial Neural Networks

Average Error 0.04

0.035

0.03

0 . 0 2 5

0 . 0 2

0.O15

0.01

0.005

0 2

• -i ._%=

f J I I f I I I I I f T I

15 16 17 18 19 20 21 22 23 24 25 28 30

No . o f H i d d e n N o d e s Fro. 4. Network performance with different numbers of hidden nodes. ( . . . . . ) Training pattern; ( - + - ) test pattern.

To improve the training time of back-propagation al- gorithm and enhance the stability of the learning process, we add a momentum term to Eq. 9. Therefore, Eq. 9 is changed to the following expression:

A W j i ( n + 1) = nSjo, + a [ W j i ( n ) - W j , ( n - 1)]. (10)

The second term in the above equation is the momentum term. The parameter a is the momentum coefficient, which is usually initialized around 0.9. The integer (n + 1) indicates the training iteration number.

Thus, the resultant connection weight is computed as

W A n + 1) = W~,(n) + ~W~,(n + 1). (11)

An expression similar to Eq. 10 is used to adjust the connection weights between nodes in the input layer and the hidden layer. Prior to the start of training, all the weights in the network are set to random values. Equa- tions 10 and 1 1 are used to correct the connection weights in each training pattern until the error reaches an ac- ceptable value for the entire training patterns.

The s tep-by-s tep procedure of back-propagat ion learning rule is summarized below.

1. Initialize the connection weights to small random val- ues in the range [-1,1].

2. Apply a pattern to the input layer. 3. Propagate the input pattern in a forward fashion

through the network using Eqs. 1-4 until the final network outputs are calculated.

4. Compute the error parameter 5 for the nodes in the output and hidden layers using Eqs. 7 and 8.

5. Adjust the connection weights using the GDR and Eqs. 9 and 10.

6. Repeat steps 2 through 5 for the next training pattern. 7. Stop training when the root mean square (RMS) error

of network output reaches an acceptable level.

There are several issues that need to be considered

ABSOLUTE ESTIMATION ERRORS 0.11 . . . . .

!

0 .08

o oo! j }/__ 0.04

1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 2 0212 22 32 42 ~ E2 ;~ ~ ~3 0

P A T T E R N I N D E X FIG. 5. Network performance with different numbers of hidden nodes (differing output vector size). ( ~ ) Single output; ( - + - ) four outputs; (-*-) five outputs.

when one is utilizing the back-propagation algorithm to train a neural network--for example, the optimal num- ber of hidden layers and the corresponding number of nodes in each layer, the optimal values of the learning parameters which improve network training, and a for- mat for presenting training data.

P E R F O R M A N C E OF C O M P O S I T I O N ESTIMATION USING DIFFERENT NETWORK STRUCTURES

Modular Networks. In cases where the composition monitoring requires the use of a large number of spectral features, it is not very effective to develop a single neural network model to process this information. The best ap- proach is to subdivide the spectral domain into several classes and represent each class by a separate network. During actual application or testing, the data must be associated with one of the above networks, and the com- position estimation from that network must be used.

Performance Testing. Multilayer feedforward neural networks were implemented to estimate concentrations of five chemical components using Raman spectroscopy data. To obtain the best network performance for this application, in this research we studied different ap- proaches for choosing the optimal network architecture. Studies of the network structure include the selection of the number of hidden nodes, the number of hidden lay- ers, and the number of output nodes.

The appropriate number of hidden nodes for the ap- plication of chemometric data analysis was selected from the experimental analysis. The three-layer perceptrons with a given number ~-22 of hidden nodes were trained with the use of the back-propagation algorithm. Regard- ing the effect of initial random connection weights, the network training procedure for each number of hidden

16 Volume 47, Number 1, 1993

Page 6: Chemometric Data Analysis Using Artificial Neural Networks

TABLE I. Results of a comparison for different numbers of hidden AVERAGE ABSOLUTE ERROR nodes. 0.05

Learning rate Learning shape Momental term No. of iterations

0.7 0.8 0.9 1000 Input nodes Hidden nodes Output nodes No. of layers 190 2, 15-30 4 3 No. of hidden

nodes (min. Min. RMS for Min. RMS for No. of networks RMS) training set testing set

22 0.013 0.017 10

nodes was repeated ten times with different initial con- ditions. The fractional concentration of each component was obtained by averaging these ten estimation values for each experiment. Figure 4 shows the overall average results of learning and testing for the case of a different number of hidden nodes. A summary of this study is presented in Table I. The result shows that the best average performance was achieved by the network with 22 nodes in the hidden layer. This number is equal to the number of training patterns. The effect of choosing various target (output) vectors was studied next. Net- works with five, four (after combing n-hexane and decane as one parameter), and single output nodes were trained to estimate the concentrations of chemical components. Figure 5 and Table II illustrate the network performance for these three types of network configurations. The ex- perimental results clearly indicate that the network with one output node provides the smallest estimation errors for the chemometric data analysis. Therefore, the best number of output nodes for this application is one. From this result, it is concluded that the analyst must develop as many networks as there are chemical components in a sample, each network providing the estimate of one component.

The comparison of results of networks with one (22 hidden nodes) and two hidden layers (8 and 14 nodes, respectively) is demonstrated in Fig. 6. The number of interconnections for the single hidden-layer network is: (190 + 1)* (22 + 1) + 23*4 = 4485, where 190 is the number of inputs, 22 is the number of hidden nodes, 4 is the number of output nodes, and 1 is the bias added to one factor of each term. The number of interconnections for the network with two hidden layers equals: (190+1).8 + (8+1).14 + (14+1).4 = 1714. The average prediction error using two hidden layers for the remaining 8 un- learned patterns is 0.0195, while with one hidden layer the average error of predicting concentration of chemical components for the same set of spectra is 0.0301. More- over, because of the smaller number of interconnection

TABLE II. Results of a comparison for different numbers of output nodes.

Learning rate No. of iterations Learning shape Momental term

0.7 1000 0.8 0.9 No. of layers Input nodes Hidden nodes Output nodes 4 190 22 1, 4, 5 RMS for sin- RMS for four RMS for five No. of networks

gle output output output node nodes nodes

0.015 0.018 0.07 10

0.04

0.03

0.02

0.01

0 1

FIG. 6. ( ~ ) Two hidden layers; ( - + - ) one hidden layer.

2 3 4 5 6 7 8

TEST PATTERN INDEX Network performance with different numbers of hidden layers.

weights (1714), the training time for the network with two hidden layers is much less than the training time for the network with a single hidden layer. Table III gives the conclusion of this experiment. These results indicate that, for this application, the network with two hidden layers provides a better estimation than does a network with a single hidden layer.

Another method used to improve the performance of the neural network is the utilization of an ensemble of networks. In this study, ten networks were implemented and trained with the use of the same data set with dif- ferent initial conditions. Our argument for using network ensembles was strongly supported by the experimental results. Figure 7 shows the average performance of 10 networks and the results with a single network. A com- parison of their performance is shown in Table IV. The smaller estimation errors show that using an ensemble of networks can significantly improve network perfor- mance.

RESULTS OF COMPOSITION ESTIMATION OF SAMPLES USING FT-RAMAN AND NEAR-INFRARED (NIR) SPECTRA

Network Performance for Chemical Composition Es- timation. Figures 8-11 demonstrate the network perfor- mance for estimating iso-octane, toluene, p-xylene, and

TABLE IlL Results of a comparison for different numbers of hidden layers.

Learning rate Learning shape Momental term No. of iterations

0.7 0.8 0.9 1500 No. of hidden RMS for RMS for test- No. of networks

layers training set ing set 1 0.010 0.03 10 2 0.008 0.0195 10

APPLIED SPECTROSCOPY 17

Page 7: Chemometric Data Analysis Using Artificial Neural Networks

ABSOLUTE ERROR Fraction 0.I 0.35

0.08

0.06

0.04

0.02

0 I 2 3 4 5 6 7 8

TEST PATTERN INDEX Fro. 7. Ensemble vs. single network performance. ( ~ ) Single net- work; ( -+ - ) network ensemble.

n-hexane + decane. A three-layer network with 22 hid- den nodes is used for this study. The learning parameters and the RMS values of errors for these four parameter estimations are summarized in Table V.

Effect of Input Noise on Network Performance. Two types of random noise were used to study the effect of noise. Tables VI and VII summarize the experimental results for both types of noise signals. In Fig. 12, a bar plot is made to demonstrate the network performance for the noise case. The standard deviation of each net- work output, as reported in the tables, was obtained from 100 trials of the random noise testing. That is, for each noise level 100 estimations were obtained. From Fig. 12 it is observed that the network prediction error increases almost linearly as a function of percent input noise. For an input noise of 3 %, the deviation of prediction error is approximately 2 %. This result illustrates that the net- work is noise tolerant up to a certain level of noise in the input features.

One approach for obtaining a better performance in a noisy environment is to train the network with an ad- ditive noise. Figure 13 shows the comparison of the re- suits for three types of training patterns. The network was trained with additive noise in the spectrum, with no

TABLE IV. Results of a comparison for single versus an ensemble of networks.

Learning rate Learning shape Momental term No. of iterations

0.7 0.8 0.9 1500 No. of neural RMS for RMS for test- No. of hidden

networks training set ing set nodes 1 0.006 0.03 22

10 0.002 0.005 22

0.25 . . . . . . . . . . . . . . . . . . . . . . .

0.2 ~ - -

0.15 -- - I

o.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . t . . . . J

0.051 ...............................................................................................................................

0 ~ I I I I I I I r I I I I I I I ! i I r + 1 t I [ I 1

1 2 S 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 2 0 2 1 2 ~ 3 2 4 2 ~ 6 2 7 2 6 2 g B 0

N u m b e r O f P a t t e r n l

FIG. 8. Network estimation for iso-octane. (~) Target values; (-+-) Est. for training; (-.-) Est. for testing.

noise, and with and without noise learning patterns. The presentation of alternative noise and noise-free patterns provides the best performance of composition estima- tion. Both noise-free and noise data were used to test the trained networks. The network estimation errors for the eight unlearning patterns presented in Fig. 13 were obtained by taking the average of both noise-free and noise-corrupted data.

S e n s i t i v i t y Analysis of Network Prediction. The objec- tive of this study is to determine the sensitivity of a region of the spectrum on one or more components in a given sample. A specific region of the input spectrum was

0.6

0.5

0.4

0.3

0.2

0.1

F r a c t i o n

0 I T I I 1 I I ] I ~ I 1 I I ] I I I I I I I I r I I I I

2 3 4 5 6 7 S 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 2 0 2 1 2 2 2 3 2 4 2 5 2 ~ 7 2 ~ 9 3 0

N u m D e r Of P a t t e r n o

FIG. 9. Network estimation for toluene. (~) Target values; (-+-) Est. for training; (-.-) Est. for testing.

18 Volume 47, Number 1, 1993

Page 8: Chemometric Data Analysis Using Artificial Neural Networks

F r i c t i o n

0.16

'9.14 ................... ~ ~ " . . . . . . . . . . . . . . . . . . . . . . . " i i i l i o.:. I 0.08 . . . . . . . . . . . . . . . . . . . . . . . . .

1 2 3 4 {5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 2 2 0221:2 22 ,32 ,42 ~ ~ 722 82 9B 0

N u m b e r of P a t t e r n o

Fro. 10. Network estimation for p-xylene. (~) Target values; ( -+ - ) Est. for training; ( - , - ) Est. for testing.

selected in order to study the sensitivity of network per- formance. Figure 14 shows the Raman spectrum used to relate a portion of this spectrum with one or more chem- ical components in the sample. As an illustration of this study, approximately 5% bias error was added to the indicated portion of the spectrum in the figure. The re- sulting fractional components, as estimated by the net- work, and the errors, are shown in Fig. 15. The black bar indicates the network prediction value with the original input spectrum (without additive bias error). The gray bar shows the network prediction results for the new

F r a c t i o n

0 . 5

0.4 ~ ....

0.3:

0.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

0.1 .............................................................................................

0 f I I f f f I I I f I t I t I I I I 1 I ~ I I I [ ¢ I I

2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 ' 2 0 2 1 2 2 2 3 2 4 2 5 2 ~ 7 2 8 2 ~ 1 3 0

N u m b e r of P a t i e r n l

Fro. 11. Network estimation for n-hexane + deeane. (~) Target val- ues; ( -+ - ) Est. for training; ( - , - ) Est. for testing.

T A B L E V. Summary of chemical composition estimation (I).

Learning rate Learning shape Momental term No. of iterations

0.7 0.8 0.9 2000 No. of layers Input nodes Hidden nodes Output nodes 3 190 22 1 Chemical RMS for RMS for test- No. of networks

components training set ing set iso-octane 0.007 0.01 10 toluene 0.0052 0.006 10 p-xylene 0.0047 0.004 10 n-hexane + 0.0049 0.0058 10

decane

pattern (after the addition of bias error to the portion of the spectrum). The third bar shows the error between two results for each component. It is obvious that the estimation of n-hexane and decane has maximum error. This result indicates that n-hexane and the decane frac- tion are the most sensitive components affected by the bias error.

Further study of this sensitivity is made by selectively excluding the indicated region from the spectrum, and by excluding all the spectral features except the portion of interest. The results in both cases showed that the perturbation had maximum effect on the prediction of n-hexane + decane concentration. Thus the current analysis is capable of associating Raman spectral re- gion(s) with specific chemical components.

Study of Network Connection Weights. Two types of plots were made to analyze the behavior of the conver- gence of network connection weights. One plot shows a connection weight behavior as a function of training it- erations. The other shows changes in all the connection

4 m

0 ~ 0.5 1 2 3 4 5

P E R C E N T O F I N P U T N O I S E

FIG. 12. Effect of input noise on network estimation. Network pre- diction error (%).

A P P L I E D S P E C T R O S C O P Y 19

Page 9: Chemometric Data Analysis Using Artificial Neural Networks

TABLE VI. Network performance for additive noise in the spectrum (constant noise level).

Random Standard deviation of sample components (%) noise (To) No. 1 No. 2 No. 3 No. 4

0.5 0.5 0.3 0.65 0.3 1 1 0.5 1 0.67 2 1.8 1 2.2 1.04 3 2.7 1.6 3.2 1.5 4 3.85 2.15 4.8 2.4 5 5.2 2.7 5.8 2.9

weights during a network learning phase. Figure 16 pre- sents a typical internal connection weight between the hidden layer and the output layer as a function of iter- ation. This plot shows the connection weight converging to a certain value as the number of iterations increases (no fluctuations are noticed). Figure 17 shows the be- havior of all 22 connection weights during network learn- ing. Figures 17a and 17b illustrate the cases of the first 50 and 2000 learning iterations, respectively. From the variations in the connection weights it is observed that the values of weights become stable after about 1500 learning iterations.

Experimental Results on the Study of Near-Infrared (NIR) Spectroscopic Data. The data used in this appli- cation consisted of 31 spectral patterns. Each pattern has 700 intensity values, and the sample consists of three unknown chemical components (x, y, z). Two different methods were used to process the data. In the first ap- proach, the data reduction was performed to compress the size of data in each spectrum. The intensities in each pattern were averaged over 5 points (wavenumbers), re- sulting in 140 intensity values for each spectrum. Data normalization was then made for the 140 spectral values in each spectrum. The resultant data were used to train and test the networks. A four-layer feedforward network with two hidden layers was developed for this study. Twenty-seven spectral patterns were selected as training data; the remaining four patterns served as testing data. Several pairs of numbers of hidden nodes were selected during this study, the choice of 12+16 was found to be the best for both network training and estimation. It was observed that the estimation errors for this data set were too large. In fact, the network learning could not be im- proved after the local error reached 0.013. In order to improve the performance of the network estimation, an approach to enhance the feature of the training spectrum was implemented. The second derivative of the values in each pattern was calculated to emphasize the spectral features. Figures 18 and 19 show the compressed spec-

TABLE VII. Network performance for additive noise in the spectrum (spectral dependent noise level).

Random Standard deviation of sample components (%) noise (%) No. 1 No. 2 No. 3 No. 4

0.5 0.6 0.2 0.48 0.417 1 1.28 0.57 1.16 0.75 2 2.38 1.03 1.9 1.47 3 4.19 1.5 3.55 2.5 4 5.3 1.78 3.89 3.16 5 7.2 2.6 5.56 4.8

Network Estimation Error 0.06

0.05

0.04

0.03

0.02

0.01

1 2 3 4 5 6 7 8

FIG. 13. Comparison of network estimation using different training patterns. (m) Forty-four training patterns; (D) 22 noise-free training patterns; ([3) 22 noisy training patterns.

trum before and after the second difference was taken. Note that the spectrum shown in Fig. 19 was obtained after the second difference of the original spectrum was taken and then the resultant data averaged over 4 points. Therefore, the final training data consist of 174 inten- sities for each spectrum. Figure 20 presents the network estimation for the same chemical components as the first case, except for the second differencing of the spectral points. This procedure was suggested by one of the mem- ber companies who supplied the data. The background effect would be minimized by this approach. The overall estimation error in the second case was 0.002. The effect of a first derivative was also studied for these data. The estimation results showed that the first derivative was also effective in enhancing the features of the spectra and in improving network performance.

The network structure and its performance of esti- mating three chemical components are summarized in Table VIII. This summary indicates that an artificial

I000

H r.D Z

E~ Z H

IG30

1400

1200

lOOC

00O

600 I 4O0

700

0 0

FIG. 14.

J 500

J lOOO

t 1500 2000 2~00 ~OOO ~500 4 0 0 Q

DATA POINTS

Regional perturbation in a Raman spectral pattern.

20 Volume 47, Number 1, 1993

Page 10: Chemometric Data Analysis Using Artificial Neural Networks

0.5

~ ,~,~ ~'%~,

:~::,:" ' ~ :!~,,4 _ _

0.2

" H? HN 0.1 " "i :' ~*~ .,, ,,~.~ :,.:~ , ~i,:.~.~ ~,;~:.:~

(..; I ....... ~ • :"~:~ ' '~'~

o :!~iliF-I iso-octane toluene p-xylene n-hexane-~ecane

FIG. 15. Sensitivity analysis with regional per turbat ion in the spec- trum. (il) Signal; (~]) signal + noise; (~) error.

neural network trained with the back-propagation al- gorithm can provide a very effective method for pro- cessing spectral data and studying the properties con- tained in these data.

CONCLUSIONS

Artificial neural networks trained with the back-prop- agation algorithm have been applied to estimate the com- position of chemical streams using spectroscopic data. Different approaches were evaluated to reduce the net- work training time and estimation error. The effect of network architectures on learning convergence was stud- ied. The experimental results show that network perfor- mance is sensitive to the training data organization, the network architecture, and the initial conditions. This observation supports the interpretation of the variation in network performance for the same training and testing

Z6

1 - 1 . 1

- 1 . 2

- 1 . 3 0 5 O

T R A I N I N G I T E R A T I O N

FIG. 16. Behavior of a connection weight between the h idden layer and the output layer during network training.

- 0 . 3 w 3 - - 1

- 0 . 4

- 0 . 5

- 0 . 6 0 3 0

I I

i 0 20

(a)

- 2

- 3 0

w3--44

i I

10 2 0 3 0

(b)

Fro. 17. Behavior of 22 connection weights after (a) 50 and (b) 2000 training iterations, respectively.

data. The numbers of hidden layers and hidden nodes are the major factors which affect the network perfor- mance. The network with the appropriate number of hidden nodes could be trained to achieve a high degree of estimation accuracy. Furthermore, the performance of trained networks on test data that were not contained in the training set demonstrates that these networks uti- lized general signal features to achieve accurate param-

U~ Z E~ Z H

"'I £.8

ft.8

i~.4

ft.2

- 1

i iiiiiii i iiii

i

FIG. 18.

D A T A P O I N T S

The smoothed spectrum.

A P P L I E D S P E C T R O S C O P Y 21

Page 11: Chemometric Data Analysis Using Artificial Neural Networks

f t . 8

El.4

I~.~

~3 5~ I@~ 150 ~@

DATA POINTS

The compressed spectrum after second differencing. Fm. 19.

eter es t imat ion. The sensi t ivi ty of ne twork es t imat ion on the re la t ionship be tween a por t ion of spectroscopic da ta and one or more chemical componen t s was studied. T h e exper imen ta l resul ts showed t h a t cer ta in inherent fea tures can be ex t rac ted by the t ra ined networks. T h e effect of r a n d o m noise in t ra ining pa t t e rns on ne twork pe r fo rmance was also analyzed in this research.

The conclusions based on the s tudy in this research are made main ly in two areas: the s tudy of ne twork struc- ture and the s tudy of ne twork capabil i ty. These are sum- mar ized as follows:

1. T h e use of artificial neural ne tworks to es t imate con- cent ra t ion of chemical componen t s th rough spectro- scopic s ignatures provides a high degree of accuracy.

2. Mul t ip le networks, each with a single ou tpu t node,

0.2

0 . 1 5

0 . I

0 . 0 5

0 I 2 ~ 4 5 8 7 8 9LOll12131415181718192~12~242528272829303!

NUMBER OF PATTERNS

FIG. 20. Network estimation of component X using derivative data. (~ ) Est . for t ra ining; ( - + - ) ta rget values; ( - . - ) Est . for tes t ing.

TABLE VIII. Summary of chemical composition estimation (II).

Learning rate Learning shape Momental term No. of iterations

0.7 0.8 0.9 3000 No. of layers Input nodes Hidden nodes Output nodes 4 174 12+16 1 Chemical RMS for RMS for test- Number of net-

components training set ing set works x 0.0015 0.002 10 y 0.0021 0.005 10 z 0.0024 0.004 10

pe r fo rm be t t e r t han one ne twork es t imat ing all the chemical componen t s s imultaneously.

3. T h e n u m b e r of h idden nodes is one of the major fac- tors affecting ne twork per formance . Set t ing the num- ber of h idden nodes equal to the n u m b e r of t ra in ing pa t t e rns is found to work well for this composi t ion identif icat ion problem.

4. The es t imat ion errors can be reduced by using an ensemble of networks.

5. In the p resen t appl ica t ion the es t imat ion error and t ra ining t ime can be reduced by using ne tworks wi th two hidden layers.

6. Mul t i layer percep t rons (MLP) are noise to le ran t due to thei r intrinsic abi l i ty to generalize f rom t augh t ex- amples to cor rup ted versions of the original pat terns . This is i l lus t ra ted by the small error s t anda rd devi- a t ion in the es t imated concentra t ions , general ly less t han 2 % when the s t andard deviat ion is less t han 3 % of signal level.

7. T h e independen t sensi t ivi ty analysis of the neural ne twork has d e m o n s t r a t e d the correspondences be- tween spect ra l fea tures and c o m p o n e n t fractions.

8. Ne twork initial condit ions and connect ion weights are also i m p o r t a n t factors affecting t ra ining t ime and es- t imat ion accuracy. Set t ing the initial connect ion weights to p roper values is very i m p o r t a n t for learning convergence. For this purpose, a s tudy of the s tat is- t ical d is t r ibut ion of ne twork connect ion weights was per formed. However , no valuable clue was found in the cur ren t results.

T h e neural ne twork me thod can be easily ex tended to process other spectroscopic da ta for appl ica t ions such as lubr icat ion oil analysis, effluent gas analysis, water chem- is t ry s tudy, and others.

ACKNOWLEDGMENTS This research was sponsored by the Measurement and Control En-

gineering Center and in part by the National Science Foundation. We are grateful to several Center Industry members for supplying us with chemometric data.

1. A. A. Garrison, E. C. Muly, M. J. Roberts, and C. F. Moore, "On- Line Chemical Composition Analyzer Development," Final Report prepared for the U.S. Department of Energy by the University of Tennessee (July 1989).

2. J. G. Grasselli, M. K. Snavely, and B. J. Bulkin, Chemical Appli- cations of Raman Spectroscopy (Wiley-Interscience, New York, 1981).

3. P. M. Fredericks, J. B. Lee, P. R. Osborn, and D. A. Swinkels, Appl. Spectrosc. 39, 311 (1985).

4. D. E. Rumelhart and J. L. McClelland, Parallel Distributed Pro- cessing (MIT Press, Cambridge, Massachusetts, 1986), Vols. I and 2.

22 Volume 47, Number 1, 1993

Page 12: Chemometric Data Analysis Using Artificial Neural Networks

5. J. Dayhoff, Neural Network Architectures (Van Nostrand Rein- hold, New York, 1990).

6. R. H. Silverman and A. S. Noetzel, Neural Networks 3, 593 (1990). 7. Y.-H. Pao, Adaptive Pattern Recognition and Neural Networks

(Addison-Wesley, Reading, Massachusetts, 1989). 8. A. Weibel, T. Hanazawa, G. Hinton, K. Shikano, and K. Lang,

IEEE Tran. Acoustics, Speech, and Signal Processing 37, 328 (1989). 9. R. P. Gorman and T. J. Sejnowski, IEEE Tran. Acoustics, Speech,

and Signal Processing 36, 1135 (1988). 10. B. R. Upadhyaya and E. Eryurek, Nuclear Technol. 97, 170 (1992). 11. D. J. Burr, Proc. First IEEE Intl. Conf. Neural Networks 4, 717

(1987). 12. T. J. Sejnowski and C. R. Rosenberg, Complex Systems l, 145

(1987). 13. J. R. Long, V. G. Gregoriou, and P. J. Gemperline, Anal. Chem.

67, 791 (1900). 14. L. K. Hansen and P. Salamon, IEEE Tran. Pattern Analysis and

Machine Intelligence 12, 993 (1990).

15. F.-S. Tsung and G. W. Cottrell, Proc. Intl. Joint Conf. Neural Networks 2, 133 (1989).

16. A. Maren, C. Harston, and R. Pap, Handbook o/Neural Computing Applications (Academic Press, New York, 1990).

17. S. Y. Kung and J. N. Hwang, Proc. IEEE Intl. Conf. Neural Net- works 363 (1988).

18. S.-C. Huang and Y.-F. Huang, IEEE Tran. Neural Networks 2, 47 (1991).

19. R. Hecht-Nielsen, Proc. Intl. Joint Conf. Neural Networks 1, 593 (1989).

20. S. A. Harp, T. Samad, and A. Guha, Advances in Neural Infor- mation Processing Systems II, 447 (1990).

21. J. Hertz, A. Krogh, and R. G. Palmer, Introduction to the Theory o/ Neural Computation (Addison-Wesley, Reading, Massachu- setts, 1991).

22. G. Cybenko, "Continuous Valued Neural Networks with Two Hid- den Layers are Sufficient," Technical Report (Tufts University, Medford, Massachusetts, 1991).

APPLIED SPECTROSCOPY 23