where R is an rn X p matrix of responses for p wavelengths and rn standard samples, C is an m X n matrix of concentrations for n components and m samples, and K is the n X p calibration matrix. Error analysis of Beer's law has been well defined (13-17)through numerical analysis procedures. It is represented by
[
IIAdI/lldl < o n W 0 i l A r l l ~ l l r l+ l l l ~ l l l l l ~ l l ](13) where 11 AcllIllcII is the total relative error for the estimated concentrations of all components, IIArll/llrll and IIMIIIIIKII are the total relative errors for the sample responses and calibration, respectively, and cond(K) is the condition number for the K matrix. 11.11 signify the norm of a vector or matrix. The condition number is usually estimated as the ratio of the largest eigenvalue to the smallest eigenvalue of the K matrix. Cond(K) reoresents error maenification of the relative errors inhere2 with the analysis-sample as shown through ea 13. Since the maenitude of cond(K) is directlv influenced b; the shape of thesample spectrum (selectivity and sensitivity), the accuracv and orecision are also influenced. Thus. cond(kl can be used as ameasure of the combined effect of analyte spectra on analyte concentration estimates. That is, the smaller cond(K) is the greater the selectivity and sensitivity present and the more accurate and precise the concentration estimates will be. The interactive program described is intended for advanced undereraduate and " eraduate courses in chemometries. Our chemometrics class uses i t as a laboratory exercise. The program allows students t o simulate UV-vis spectrophotometry and will permit a student to design particular sets of standard soedra to observe trends in cond(lO. Factors to be explored during lab consist of the number of components, degree of resolution, and intensity ratios. The method used to simulate the multicomponent system consists of generating Gaussian curves of the form
The program described is written in FORTRAN IV for use on a H P 1000 computer system. The plotting program is a FORTRAN 77 subroutine to the main FORTRAN IV program and makes use of the H P Advanced Graphics Package (AGP) subroutines. A H P 2623 terminal and a H P 7475A plotter are required. Alternative H P terminals and H P plotters can he used provided the user has the appropriate work station progranls available. However, the lah can be operated on anv terminal if d o t s are not needed. In addition. the plotting program can be used separately in conjunction with another FORTRAN nroeram. The comolete oroeram requires 140 K bytes df memory when used o n a HP 1000 system. The authors will supply a source listing of the FORTRAN IV main program and the FORTRAN 77 plotting subroutine as well as the laboratory handout given to each student. The handout consists of an overview of the error analysis theory and derivations along with step-by-step instructions on operating the program. Acknowledgment The authors are thankful to the Idaho State University Computer Service Center and to Brian Hughes for their assistance in computer operations and software development. We also wish to thankChristopher Wininger, formerly with Idaho State University Computer Services, for his assistance.
-
I ( x ) = A exp[-(x
- C)2/2B2]
(14)
where A is the maximum amplitude, B is the band halfwidth, C is the abscissa value (wavelength in our case) corresponding to the function maximum, and I is the absorption at wavelengthx. During the program x is set tovary from 1to 100 while the student decides on values for A, B, and C for each component chosen. Overlapping bands are constructed by summing the respective number of Gaussian curves (one curve Der comnonent). he p r o g r k is broken down into two parts. One part allows for observations of trends in cond(K) with changes in spectra while the second part lets the students simulate a chemical analvsis t o test theorv (ea 13) with actual results. The program starts by offering these choices to the user. In either case, prompts requests the number of components, peak amplitude, band half-width, and the wavelength of the peak amplitude. If the user is only examining trends in cond(K), noiseless signals are generated by eq 14 and a cond(K) is computed and printed to the screen. The user then has the ontion to see nlots of the snectra. chanee the number of con;ponents, c h k g e A, change B, i h a n g e c , or simulate a chemical analvsis of this svstem or another. Plots can be made as overlays or individually. For the analvsis -Dart.. the user decides on the concentration levels for the sample and standards. Random noise is added to the spectra by a Monte Carlo method (18).A normal distribution with a mean zero and a standard deviation equal to a 3% relative standard deviation of the noise-free signal is used. Ten perturbations are performed allowing standard deviations of concentration estimates to be made. After a chemical analysis the student can see the plots, run another analysis with the same parameters or new ones, or observe more trends in cond(K).
Simulation Valparaiso University Valparaiso, IN 46383
I have written and made available to Project SERAPHIM a computer program that can be used to simulate experiments in free radical oolvmerization. In this.. the erowth of .. variouslengthchains Lssikulatedand the resultingdistribulions oresented as eraohs. first of thenumber fraction distribution, second of the-weight fraction distribution. One experiment simulates termination by disproportionation; a second, termination by coupling. The hardware required to use this program includes an IBM PC or X T personal computer with a t least 320 KB of RAM, the Intel 8087 mathematics coprocessor, and a graph ics monitor. One version of the program can be run on either a color monitor or a monochrome monitor with a graphics card: the other. which uses color.. reauires eraohics . a color " . card and monitor. In addition, to print a graphics screen dumo. a dot matrix minter such as Eoson FX 80 or comnatible is needed. A computer totally compatible with the ~ B M machines cited can be used provided the screen access and sound I10 control are identical to the IBM's. The operator enters a monomer concentration, monomer molecular weight, and initiator concentration. The computer uses polymer growth kinetics principles to calculate a free radical concentration based on the initiator and a ratio of rate of propagation to rate of termination based on the free radical concentration and the monomer concentration. A random-number generator is used to determine whether a unit counter. U. is incremented or the looo is ended. which constitutes &r&ation. If the random number is greater 11, the counter is incremented by one; than l/(RATIO otherwise, the loop ends. In the case of the disproportionation simulation, the variable U serves to determine a variable, DP[U], that is incremented by one a t the end of the loop, thus counting one more chain of length U. After the "growth" of 5000 chains, the distribution is divided into 200 portions based on chain lengths and the number fraction of each portion plotted on
+
Volume 65 Number 9 September 1988
795
rw
Figure 4. Oraphiw screen print hom simulated polymerization experiment. initial mnomer Concennation, 1.0 M; initial initiator concentration. 0.01 M; kinetic chain length. 359.4.
NUMBER FRACTION DISTRIBUTION OF DECREE OF POLEiTE09 FREE RADICAL POLYMERIZATION ERMINATION BY COUPLING Figure 5. Graphics screen print of theoretical curve. Kinetic chain length. 359.4.
screen. At a pause in the program, the screen can be printed, orovided that the anorooriate oroeram (GRAPHICS.COM for IBM) was called1;efdre thebo?;mer experiment simulation hegan. After this, the program plots the weight fraction distribution and again pauses for screen print. In the case of the coupling simulation, the variable U is transferred to PLEN[I], in which I is 1 or 2; PLEN[l] is added to PLEN[2] in variable J, which serves to determine a variable, DP[J], which is incremented by one a t the end of the loop. This gives the effect of combining two chains by coupling. The remainder of the analysis is identical to that for termination by disproportionation. In addition, the program can be used to plot on screen the theoretical curves for number fraction distribution and weight fraction distrihution for termination by disproprtionation and for termination by coupling.
Spreadsheet Graphics in the Organic Laboratory: Providing Students with Feelback mlhmr Data I Jeffrey E. KeIsm
Coa College
Cedar Rapids, IA 52402 ContribAors to this and other iournals have recentlv discussed the uses of microcompuier spreadsheets f o r k c h anolications as eradine- .(19.20). calculation of activitv coeffi. c&s (21), anrfscientific modkl building (22). ~ e v k o v(23) has pointed out the advantaees for aoolications in the scientific.lahoratory of "second.gkerati&spreadsheets" such as LOTUS 1-2-3 with their powerful graphics features. Lev796
Journal of Chemical Education
FRAC DISTILLATION
Figwe 6. Fractional dlstiilation data. Fmm top to bonom ourves are: wt % toluene in lraction3: wt % methanol in fraction 1; volumeof fraction 1: volume of fraction 3.
kov's examples were principally physical chemistry ones. I t is the ouroose of this DaDer to illustrate uses of secondgeneraiion-spreadsheets inthe organic lahoratory. I have no brief for anv particular brand of snreadsheet-we use SunerCalc3 (the-current version is 4) principally because it is available to educational institutions a t steep discount. Clones of LOTUS 1-2-3 are available a t low cost, but two of them are the subject of current lawsuits. Lotus has recently made available a $40 student version of their spreadsheet. While these spreadsheets were originally written for IBM comouters and comoatibles. versions of SuoerCalc3 and a t lea$ one of the clones are available for the Apple I1 series. With the exce~tionof Der cent vield calculations. orzanic chemistry has tiaditionahy been;egarded as a qualitkive subject. However, modern snectrosco~icand chromatograbhic instrumentation allows us to a&umulate quantitative data on student samples. While academic chemists aenerally appreciate the calEulating power of spreadsheers;not all are awareoftheir powerful graphics features, which make nossihle the comnarison of student data whether or not one does calculations. The dramatic impact of seeing their class data disolaved eraohicallv on a color monitor is much more effectivethan graph pape; at getting students to think about their data. Figure 6 represents class data for the fractional distillation of 25 mL of an eaual-volume mixture of methanol and toluene. The students-collected the bulk of the distillate in fractions 1 and 3 and a small intermediate fraction. They analyzed fractions 1and 3 using a gas chromatograph interfaced with a computing integrator. The resulting data were then entered into a worksheet, and the graph shown in Figure 6 was displayed to the class on a 25-in. color monitor. Since the first fraction is an azeotrooe cdntainine 72%meth1 and 28% toluene, it is larger in volume than the third (the bottom line in Fie. 6 ) . which is nearlv oure. (The student data averaged 97 &%toluene.) The incriased purity of fraction 3 relative to fraction 1 and the large ~. - deeree " of precision in the student data are readily seen by inspecting Figure 6. Student 10 noticed her puritv for fraction 3 was less than that of anyone else in the class,thought about her experiment, and realized she had started collecting fraction 3 significantly below the l l l ° C boiling point of toluene. Commercial bleach is tending to replace dichromate in the organic teaching lahoratory for the oxidation of cyclohexan01 to cyclohexanone (24 and references therein). When students make cyclohexanone according to the procedure of Mohriget al. (24), the product usually contains small quantities of cyclohexanol and can he analyzed by gas chromatog-