Using Neural Networks for Quantitative X-Ray Analysis

download Using Neural Networks for Quantitative X-Ray Analysis

of 22

Transcript of Using Neural Networks for Quantitative X-Ray Analysis

  • 8/4/2019 Using Neural Networks for Quantitative X-Ray Analysis

    1/22

    Using Neural Networks for

    Quantitative X-ray Analysis

    John N. Driscoll, PID Analyzers,LLC, Sandwich, MA

    &

    Walter Johnson, Physics Dept.,Suffolk Univ., Boston, MA

    Paper #1360 - 10

  • 8/4/2019 Using Neural Networks for Quantitative X-Ray Analysis

    2/22

    Introduction

    The overlap of Pb and As spectra is a well

    known phenomenon in XRF

    At Pittcon 2002 (paper #1968P ), wepresented a neural network that recognized

    overlapping Pb and As peaksin an XRFspectrum. This was done using a singleneuron in the network.

    Now, we attempt for the first time to predict

    the concentrationsfrom Pb and As X-rayspectra using input, output and hiddenneurons.

  • 8/4/2019 Using Neural Networks for Quantitative X-Ray Analysis

    3/22

    A technique for the analysis ofmaterials that is based onfundamental principles ofspectroscopy

    Atomic spectra are well knownSince we are dealing with atoms,

    absorption and emission lines areat the same wavelength

    Absorption and emissioncoefficients are well known and canbe used for correction of spectra(inter element corrections) via

    libraries

    What is XRF?

  • 8/4/2019 Using Neural Networks for Quantitative X-Ray Analysis

    4/22

    Model XR1000

  • 8/4/2019 Using Neural Networks for Quantitative X-Ray Analysis

    5/22

    Fits to As & Pb

  • 8/4/2019 Using Neural Networks for Quantitative X-Ray Analysis

    6/22

    Goals:

    To design and test a simple neural network which can use data from

    selected channels of an X-ray spectrometer to determinequantitatively the amounts of Pb and As present.

    Considerations:

    1) The major peak in both As and Pb (K-alpha and L-alpharespectively) exactly overlap. The smaller beta peaks are

    distinguishable and must be used.

    2) The neural net should have as few neurons as possible to allow

    expansion to other elements.

    3) The training set for the neural net should cover a large number of

    relative proportions of As and Pb and ideally should be generated

    by computer from normalized shapes which well represent the data.

  • 8/4/2019 Using Neural Networks for Quantitative X-Ray Analysis

    7/22

    What does a neural network do?

    A neural network is a mathematical procedure modeled after biological

    brains (network of neurons) to produce a desired set of output valuesfrom a set of input values.

    Structure: The net has inputs which are numbers usually scaled

    between 1 and 1. Each input is fanned out to many different

    processing units (neurons) and each of these sends its output to moreneurons. The final set of neurons (the output layer) gives the answer as

    numbers each ranging from 1 to 1.

    Function: Any given neuron weights each of its inputs by some

    different factor (any positive or negative number), adds up all of these

    weighted inputs, checks to see if a numerical threshold has beenreached and fires or does nothing. If the neuron fires, then it sends

    out its own signal (a value of 1) to other receiving neurons. Not firing

    results in an output of 0.

  • 8/4/2019 Using Neural Networks for Quantitative X-Ray Analysis

    8/22

    Training: The net goes through a training process where it is presented

    with many different patterns of numbers at its inputs and also the desired

    output for each pattern. The software used to produce the net starts witha random set of weights. Then one member of the training set is

    randomly selected and slight changes are made in all of the weights so

    the net is more likely to produce the desired output than before the

    weights were changed.

    Back propagation: This training process typically starts with the output

    layer of neurons and proceeds backwards to the input layer (back

    propagation). It is repeated many times (hundreds of thousands or

    millions) until the weights are correct and the desired results are

    obtained for most if not all input patterns.

    Testing: The final step is to test the behavior of the network on data it

    has not seen (i.e. which was not part of its training set). If it does not

    work then more neurons may be added to the net to enhance it learning

    capabilities. In general the fewer neurons needed to solve a problem, the

    better.

  • 8/4/2019 Using Neural Networks for Quantitative X-Ray Analysis

    9/22

  • 8/4/2019 Using Neural Networks for Quantitative X-Ray Analysis

    10/22

    As-10,000 PPM, Pb- 0 PPM

    Gaussian fits to peaks

    0

    500

    1000

    1500

    2000

    2500

    3000

    3500

    4000

    970

    990

    1010

    1030

    1050

    1070

    1090

    1110

    1130

    1150

    1170

    1190

    1210

    1230

    1250

    1270

    1290

    energy

    counts

    As spectrum with Mg(CO3)2 backgroundSpectral shape used for generation of neural net training sets

  • 8/4/2019 Using Neural Networks for Quantitative X-Ray Analysis

    11/22

    Pb spectrum with Mg(CO3)2 background

    Spectral shape used for generation of neural net training sets

    Pb-10^4 PPM Pb, As- 0 PPMGaussian fits to peaks

    0

    200

    400

    600

    800

    1000

    1200

    970

    992

    1014

    1036

    1058

    1080

    1102

    1124

    1146

    1168

    1190

    1212

    1234

    1256

    1278

    1300

    1322

    1344

    energy

    counts

  • 8/4/2019 Using Neural Networks for Quantitative X-Ray Analysis

    12/22

    Pb & As SampleMatrix

    Sample

    #

    ppm Pb ppm As

    B blank Blank

    1 1000 9000

    2 2500 7500

    3 5000 5000

    4 7500 2500

    5 9000 1000

    6 10000 0

    7 0 10000

  • 8/4/2019 Using Neural Networks for Quantitative X-Ray Analysis

    13/22

    Generation of neural net training sets

    The Gaussian fit for As , the Gaussian fit for Pb, and the linear fit for the

    background were each separately normalized to one. Multiplying each by an arbitrary number of counts and adding the three

    contributions together produced a spectrum containing some mix of As,Pb, and background. The determination of the meaning of the area of eachcontribution was determined from the samples with only As and only Pbpresent. (Samples 6 and 7).

    N1= total counts in the As spectrum (area of the Gaussian fit)

    B1= total counts in the background for sample with only As present

    (N1/B1)= 1(1) where 1= density of As in the sample in PPM Using the fit for the sample with only 104 PPM As and background

    present, we determined the proportionality constant 1. A similarprocedure was used for the Pb spectrum.

    Many spectral shapes were generated for training the net by varying thedensity of As and Pb present

  • 8/4/2019 Using Neural Networks for Quantitative X-Ray Analysis

    14/22

    Ratio of transition

    probabilities

  • 8/4/2019 Using Neural Networks for Quantitative X-Ray Analysis

    15/22

    Combined As, Pbspectra

  • 8/4/2019 Using Neural Networks for Quantitative X-Ray Analysis

    16/22

    Comparison of Measured & Calculated (NN)Spectra

    Fit to PbAs: 18P386A

    0

    2000

    4000

    6000

    8000

    10000

    12000

    14000

    16000

    18000

    970

    992

    1014

    1036

    1058

    1080

    1102

    1124

    1146

    1168

    1190

    1212

    1234

    1256

    1278

    1300

  • 8/4/2019 Using Neural Networks for Quantitative X-Ray Analysis

    17/22

    Generation of Neural Net Training Sets

    The Gaussian fit for As , the Gaussian fit for Pb, and the linear fit for the

    background were each separately normalized to one.

    Multiplying each by an arbitrary number of counts and adding the threecontributions together produced a spectrum containing some mix of As,Pb, and background. The determination of the meaning of the area ofeach contribution was determined from the samples with only As andonly Pb present. (Samples 6 and 7).

    N1= total counts in the As spectrum (area of the Gaussian fit)

    B1= total counts in the background for sample with only As present

    (N1/B1)= 1(1) where 1= density of As in the sample in PPM

    Using the fit for the sample with only 104

    PPM As and backgroundpresent, we determined the proportionality constant 1. A similarprocedure was used for the Pb spectrum.

    Many spectral shapes were generated for training the net by varying thedensity of As and Pb present

  • 8/4/2019 Using Neural Networks for Quantitative X-Ray Analysis

    18/22

    Pb spectrum fit

    The same procedure was used to fit the pure Pb spectrum-

    a main Gaussian and a smaller Gaussian shoulder locatedat 0.972 of the energy of the main peak.

    The counts in channel x due to Pb L-alpha and L-beta are

    given by :a2 (x) + b2 (x)

    where the subscript 2 refers to Pb rather than As.

    Background

    The background is well represented by 3 straight lines oneunder the alpha peak , another between peaks and the lastunder the beta peak.

  • 8/4/2019 Using Neural Networks for Quantitative X-Ray Analysis

    19/22

    Neural Net Determination of Relative Amounts of As and Pb

    A neural network has the capability of learning verynon-linear relationships between many input values

    and one or more outputs. To determine the relative amounts of As and Pb in a

    sample, different portions of the spectrum from thealpha peak, K- beta (As) and L-beta (Pb) are usedalong with background outside the peak areas. Inparticular ratios of the counts in these regions of thespectrum can be used to determine the ratio (g1/g2)where

    g1= fraction by weight of As present in the sample

    g2= fraction by weight of Pb present in the sample The network must be trained on a very large number

    of spectra representing many different values of g1and g2 present in the sample. To produce this trainingset we use analytical functions to generate the

    spectra.

  • 8/4/2019 Using Neural Networks for Quantitative X-Ray Analysis

    20/22

  • 8/4/2019 Using Neural Networks for Quantitative X-Ray Analysis

    21/22

  • 8/4/2019 Using Neural Networks for Quantitative X-Ray Analysis

    22/22

    Summary

    We demonstrated previously (Pittcon2002) that we could identify Pb and Asoverlapping peaks using a single neuron

    We wanted to modify our neural net

    training program by running the matrix ofconcentrations in slide # 12 andincreasing the number of spectra in ourtraining set

    We found that with 5 input neurons, twooutput neurons and a hidden neuron, wewere able to calculate concentrations thatagreed with the concentrations prepared

    and calculated by xrf software