no data left behind

54
No Data Left Behind Modeling Colorful Compounds in Chemical Equilibria Mike DeVries D. Kwabena Bediako Prof. Douglas A. Vander Griend

Upload: clint

Post on 11-Jan-2016

65 views

Category:

Documents


0 download

DESCRIPTION

No Data Left Behind. Modeling Colorful Compounds in Chemical Equilibria Mike DeVries D. Kwabena Bediako Prof. Douglas A. Vander Griend. Outline. What is chemical equilibrium? What makes color data good or not-so-good? How does matrix algebra work again? - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: No Data Left Behind

No Data Left Behind

Modeling Colorful Compounds in Chemical Equilibria

Mike DeVries

D. Kwabena Bediako

Prof. Douglas A. Vander Griend

Page 2: No Data Left Behind

Outline

• What is chemical equilibrium?

• What makes color data good or not-so-good?

• How does matrix algebra work again?

• What is Sivvu and how does it work?

Page 3: No Data Left Behind

What is Chemical Equilibrium?

When chemicals react, they ultimately form a balance between products and reactants such that the ratio is a constant:

[products]/[reactants] = Kequilibrium

Log(products) – Log(reactants) = LogKeq = -G/RT

G is called free energy.

Page 4: No Data Left Behind

Example

Seal .04 mole of NO2 in a 1 liter container.

2NO2 N2O4G = -5.40 kJ/mol (@ 25°C)

[N2O4]/[NO2]2 = Keq = exp(-G/RT) = 8.97

Let x amount of NO2 that reacts.

(0.5x)/(.04-x)2 = 8.97

x = .01304, or 32.6% reacts

Page 5: No Data Left Behind

Demonstration

A B

1. Secretly choose A or B and submit choice.2. As directed, choose A or B again:

If last time you submitted A, now submit B. If last time you submitted B,

Submit B again if coin flip shows tails Submit A if coin flip shows heads

3. Repeat #2 as directed.

Page 6: No Data Left Behind

Multiple Equilibria

Solving one equilibrium equation can be tricky.

Solving simultaneous equilibria requires a computer.

Page 7: No Data Left Behind

Exhaust Example

Calculate the equilibrium amounts of CO2, N2, H2O, CO, O2, NO, and H2 after burning 1 mole of C3H8 in air.

4 mass balance equations, 1 for each element:• Carbon = 3, Hydrogen = 8, Nitrogen = 40 and Oxygen = 10

3 equilibrium equations:• 2CO + O2 2CO2 G = -187.52 kJ/mol

• N2 + O2 2NO G = 125.02 kJ/mol

• 2H2 + O2 2H2O G = -247.86 kJ/mol

Page 8: No Data Left Behind

Exhaust Example

4 mass balance equations:• Carbon = 3• Hydrogen = 8• Nitrogen = 40• Oxygen = 10

3 equilibrium equations:• [CO2]2/[CO]2/[O2] = 41874

• [NO]2/[N2]/[O2] = 0.001075

• [H2O]2/[H2]2/[O2] = 1134096

Species Amount

CO2 2.923

N2 19.99

H2O 3.980

CO 0.07667

O2 0.03471

NO 0.02732

H2 0.02006

Page 9: No Data Left Behind

Metal Complexation Reactions

[Ni]2+ + py [Nipy]2+ G1

[Nipy]2+ + py [Nipy2]2+ G2

[Nipy2]2+ + py [Nipy3]2+ G3

[Nipy3]2+ + py [Nipy4]2+ G4

[Nipy4]2+ + py [Nipy5]2+ G5

[Nipy5]2+ + py [Nipy6]2+…

Ni

Page 10: No Data Left Behind

Pyridine and Nickel

Ni2+ and BF4-

in methanol

equivalents of pyridine

added: 1 2 3 4 5

Page 11: No Data Left Behind

UV-visible Spectroscopy

Absorbance = · Concentration

(Beer-Lambert Law)

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

400 500 600 700 800 900 1000

Wavelength(nm)

Abs

orba

nce

0.1046 M Ni(BF4)2 in methanol

Ni2+

Page 12: No Data Left Behind

Color is Additive

Ni 2+

BF 4-

py

Abs = 0[Ni]2+ + 1[Nipy]2+ + 2[Nipy2]2+ + 3[Nipy3]2+ + …

0.0997 M Ni(BF4)2 w/ 0.585 pyridine

0

0.2

0.4

0.6

0.8

1

1.2

400 500 600 700 800 900 1000

Wavelength(nm)

Abs

orba

nce

Page 13: No Data Left Behind

What we know is not very much

[Ni]2+ + py [Nipy]2+ G1

[Nipy]2+ + py [Nipy2]2+ G2

[Nipy2]2+ + py [Nipy3]2+ G3

[Nipy3]2+ + py [Nipy4]2+ G4

[Nipy4]2+ + py [Nipy5]2+ G5

[Nipy5]2+ + py [Nipy6]2+…

Ni

Page 14: No Data Left Behind

The Problem

We don’t know the wavelength-dependent colors or the equilibrium constants!

We can’t measure the independent color (absorptivities) because all the compounds are present together.

We don’t know the amounts of the compounds because they have equilibrated.

Almost all the data is composite.

Page 15: No Data Left Behind

The Solution

It is possible, using advanced mathematical computations, to isolate information about pure species without chemically isolating them.

How? Generate more composite data by making more mixtures with differing amounts of reactants.

Model all the data according to chemical equilibria and the Beer-Lambert law for combining absorbances.

Page 16: No Data Left Behind

Why it Works

Each data point corresponds to a single equation. For each point on the same curve, the [concentrations] are

the same. For each point at the same wavelength, the molar

absorptivities, n, are the same. With enough solution mixtures then, there will be more

equations than unknowns. This is known as an overexpressed mathematical system

which can theoretically be solved with error analysis.

Abs = 0[Ni]2+ + 1[Nipy]2+ + 2[Nipy2]2+ + 3[Nipy3]2+ + …

Page 17: No Data Left Behind

Matrix Algebra Refresher

5

8

y

x

13

32

2x + 3y = 8

3x – y = 5

Page 18: No Data Left Behind

Matrix Multiplication

C = AB(n x p) (n x m) (m x p)

Page 19: No Data Left Behind

Matrix Algebra

Abs = 0[Ni]2+ + 1[Nipy]2+ + 2[Nipy2]2+ + 3[Nipy3]2+ + …

22

2

2

210

Nipy

Nipy

Ni

Abs

Page 20: No Data Left Behind

Matrix Form of Beer-Lambert Law

component

CAbs

component

mCAbs

Absorbances(n x p)

(n x m)

Concentration(m x p)

m

mp

nm

n CAbs p

Mol

arA

bsor

btiv

ity

n # of wavelengths

m # of chemical species

p # of mixture solutions

Page 21: No Data Left Behind

Measured Absorbances

Absorbances(n x p)

n = number of wavelengths

p = number of solution mixtures

Every column is a UV-vis curve.

Every row is a wavelength

So there are a total of np absorbance data points, each associated with a distinct equation.

The total absorbance at any particular point is the sum of the absorbances of all the chemical species in solution according to Beer-Lambert Law.

Page 22: No Data Left Behind

Molar Absorptivities

(n x m)

Every column represents one of the m chemical species.

Every row is a wavelength

This smaller matrix contains all of the molar absorbtivity values for each pure chemical species in the mixtures at every wavelength.

Page 23: No Data Left Behind

Component Concentrations

Concentration(m x p)

Every column corresponds to one of the p solution mixtures (UVvis curve).

Each row represents one of the m chemical species.

This smaller concentration matrix contains the absolute concentration of each chemical species in each of the solution mixtures.

Page 24: No Data Left Behind

Matrix Absorbance Equation

component

CAbs

Absorbances(n x p)

(n x m)

Concentration(m x p)

So the problem is essentially factoring a matrix.

…Or solving np equations for mn + mp unknowns.

Abs = C

Page 25: No Data Left Behind

With Residual Error!

Absorbances(n x p)

(n x m)

Concentration(m x p)

Residual(n x p)

Given data matrix of absorbances, find the absorptivity and concentration matrices that result in the smallest possible values in the residual matrix.

Abs = C + R

Page 26: No Data Left Behind

Factor Analysis

What is m?• How many pure chemical species?• How many mathematically distinct (orthogonal)

components are needed to additively build the entire data matrix?

The eigenvalues of a matrix depict the additive structure of the matrix.

Requires computers. Matlab is very nice for this.

Page 27: No Data Left Behind

Random Matrix Structure

(16 x 461) matrix of random numbers

All 16 eigenvalues contribute about the same to the structure of the matrix

Page 28: No Data Left Behind

Non-random Data

50 data curves of Ni2+

solution with zero to 142 equivalents of pyridine.

How many additive factors exist in this data?

Page 29: No Data Left Behind

Data Matrix Structure400 500 600 700 800 900 1000

-0.2

-0.15

-0.1

-0.05

0

0.05

0.1

0.15Initial Factors in Measured Data

Wavelength (nm)

Abs

orba

nce

0 10 20 30 40 501

2

3

4

5

6

7

Factor Ratios

Rel

ativ

e S

igni

fican

ce

absorbance data

random numbers

6th eigenvalue is relatively small, but still possibly significant.

m = 6

Page 30: No Data Left Behind

Equilibrium-Restricted Factor Analysis

Factoring a big matrix into 2 smaller ones does not necessarily give a positive or unique answer.

We also the force the concentration values to adhere to equilibrium relationships.

Page 31: No Data Left Behind

Sivvu

Inputs• raw absorbance data

Page 32: No Data Left Behind

Absorbance Data

n = 305 wavelengths

p = 50 solution mixtures

Page 33: No Data Left Behind

Sivvu

Inputs• raw absorbance data• composition of solutions for mass balance

equations

Page 34: No Data Left Behind

Composition of Solutions

-2

-1.5

-1

-0.5

0

0.5

1

1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55

Solution number

Lo

g(C

on

cen

trati

on

)

Ni++

Py

From 0 to 142 equivalents of pyridine.

Pure pyridine (12.4 Molar) is dripped into 0.10 M Ni(BF4)2 Solution

Page 35: No Data Left Behind

Sivvu

Inputs• raw absorbance data• composition of solutions for mass balance

equations• chemical reactions for equilibrium equations

Page 36: No Data Left Behind

Inputs

Page 37: No Data Left Behind

Sivvu

Inputs• raw absorbance data• composition of solutions for mass balance

equations• chemical reactions for equilibrium equations• guesses for G’s

Page 38: No Data Left Behind

Inputs

Page 39: No Data Left Behind

Sivvu

Inputs• raw absorbance data• composition of solutions for mass balance equations• chemical reactions for equilibrium equations• guesses for G’s

Process• Calculates concentrations from G’s

Page 40: No Data Left Behind
Page 41: No Data Left Behind

Sivvu

Inputs• raw absorbance data• composition of solutions for mass balance equations• chemical reactions for equilibrium equations• guesses for G’s

Process• calculates concentrations from G’s

• solves for wavelength dependent colors

Page 42: No Data Left Behind
Page 43: No Data Left Behind

Sivvu

Inputs• raw absorbance data• composition of solutions for mass balance equations• chemical reactions for equilibrium equations• guesses for G’s

Process• calculates concentrations from G’s

• solves for wavelength dependent colors• calculates root mean square of residuals

Page 44: No Data Left Behind
Page 45: No Data Left Behind

Sivvu

Inputs• raw absorbance data• composition of solutions for mass balance equations• chemical reactions for equilibrium equations• guesses for G’s

Process• calculates concentrations from G’s

• solves for wavelength dependent colors• Calculates root mean square of residuals• Searches for G’s that minimize rms residual

Page 46: No Data Left Behind

Structure of Residual

400 500 600 700 800 900 1000-0.4

-0.3

-0.2

-0.1

0

0.1

0.2

0.3Residual Factors in Measured Data

1

2

34

5

Page 47: No Data Left Behind

Now we know a lot!

[Ni]2+ + py [Nipy]2+ G1 = -6.76(2) kJ/mol

[Nipy]2+ + py [Nipy2]2+ G2 = -3.52(2) kJ/mol

[Nipy2]2+ + py [Nipy3]2+ G3 = 0.64(3) kJ/mol

[Nipy3]2+ + py [Nipy4]2+ G4 = 5.8(5) kJ/mol

[Nipy4]2+ + py [Nipy5]2+ G5 = ?

[Nipy5]2+ + py [Nipy6]2+ G6 = ?

Ni

Page 48: No Data Left Behind

So what color is [Nipy]+2?

Ni++

NiPy++

NiPy2++

NiPy3++

NiPy4++

Ni++

NiPy++

NiPy2++

NiPy3++

NiPy4++

Page 49: No Data Left Behind

What’s going on in 25th solution?

0

0.2

0.4

0.6

0.8

1

1.2

400 500 600 700 800 900 1000

Wavelength (nm)

As

orb

an

ce

0.0997 M Ni(BF4)2 w/ 0.585 pyridine

Page 50: No Data Left Behind
Page 51: No Data Left Behind
Page 52: No Data Left Behind

Summary

Page 53: No Data Left Behind

Conclusions

Factor Analysis extracts much useful information about complex systems from easy experiments.

Forcing the concentrations to satisfy chemical equilibria greatly enhances stability and sensibleness.

is Uv-vis in reverse.S IV V U

Page 54: No Data Left Behind

Acknowledgements American Chemical Society Petroleum Research

Fund

Research Corporation Cottrell College Science Award

Pleotint L.L.C.

Calvin College Research Fellowship

Jack and Lois Kuiper Mathematics Fellowship