Simplex Optimization of Chemical Systems

Simplex Optimization of Chemical. Systems this technique to methodsdevelopment has heencarrird out only at the level of graduatt. rrsearrh. Optimizati...
4 downloads 0 Views 2MB Size
C. L. Shavers M. L. Parsons and S. N. Demingl Arizona State University Tempe 85281

Simplex Optimization of Chemical Systems

Simolex optimization (1.2) has been shown to be an efficient d e w ~ o p m e n t atechnique ~ for the impruvemcnt of resvonse in chrmical methods (3-20). Huwer,er. noolicat~onof this technique to methodsdevelopment has heencarrird out only at the level of graduatt. rrsearrh. Optimizatiim experi. ments, modified or simplified for use by ~ n d e r ~ r a d u a t e s t u dents, are virtually nonexistent. Therefore, a laboratory experiment was designed which would demonstrate the use of simplex optimization in a simple and straightforward manner. Optimization is important in many areas of chemistry. In analytical chemistry, for example, improving absorbance response for a fixed amount of determinant (%) often leads to a desirable increase in both sensitivity and precision. Synthetic organic and inorganic chemistry a s well as chemical engineering all benefit from an increase in reaction yield, especially if the overall yield results from a series of stepwise reactions: the final yield is then the algebraic product of all intermediate vields (18). Hazards of single-factor-at-a-time optimization strategies have been discussed ~reviouslv(10).The inefficiencies of sequential fartorid designs are also well known ( 9 ) .The sequrntial simplex method of optimization ( I , 2) is a strategy that rapidly and efficiently locates the region of the optimum !ISvarying 811 factors Irwiables) sim~dtaneo~lsb. The rules of the simplex algorithm are presented here for c&npleteness. More detailed discussions may be found in the literature (1-4, 6, 9, 10). Simplex Rules The variable size simplex method of Nelder and Mead (2) is a logical algorithm consisting of reflection, expansion, and contraction rules. These rules can be understood by referring to the two-dimensional example shown in Figure 1. The algorithm can be used with any number of dimensions. A simplex is a geometric figure defined by a number of points (n + 1)equal to one more than the number of variables (dimensions). In the initial simplex BNWshown in Figure 1, Vertex B was measured and found to have the best response, Wthe worst response, and N the next-to-the-worst response. P i s the centroid of the face remaining when the worst vertex is eliminated (6). Reflectionjs accomplished by extending the line segment WFbeyond P t o generate the new vertex R (i.e., a new set of experimental conditions) R = F + (F- W ) (1) Three possibilities exist for the measured response a t R. 1) The response at R is more desirable than the response at B. An attempted expansion is indicated and the new vertex E i s generated:

E = P + Z(F- W) (2) If the response at Eis better than the response at B, Eis retained and the new simplex is NBE. lithe responseat Eisnot better than at B. the expansion is said to have failed and BNR is taken as the new simplex. The algorithm is restarted using the new simplex. 2) If the response at R is hetween that of Band N, neither ex-

-

LLYEL

Or

XI

Figure 1. Possible moves i n s modified simplex method

pansion nor contraction is recommended and the process is restarted with the new simplex BNR. 3) If the response at R is less desirable than the response at N, a step in the wrong direction has been made and the simplex should be contracted. One of two possible vertices must he generated: a) If the response at R is worse than the response at N hut not worse than that at W, the new vertex should lie closer to R than to W: C r = F + 0 . 5 ( p - W) (3) The process is restarted with the new simplex BNC,. b) If the response at Ris worse than the response at W, then the new vertex should lie closer to Wthan to R: C, = P - 0.5(F - W) The process is restarted with the new simplex BNC,.

(4)

False high results caused by experimental error which might mislead the simplex can he detected and corrected if theresponse of a vertex appearing in n + 1 successive simplexes is reevaluntrd ( 1 , . Thc average response can be taken as thr response of reevaluated vertices. If a vertex lies outside the boundaries of one or more of the factors (variables), a very undesirable response is assigned to that vertex. The simplex will then be forced back inside the boundaries. Calculations are implificd if a worksheet such us the one shown in Figure 2 is used r22). Experimental A simple method for introducing the application of simplex optimimiuu IC chemical syqtems is a modification of n vmadiu& slx>ttc*t (2i1.Thrpmcdurt. involvrs rhcndditim of varymgamaorm (nmntwr ofdrcmv ofhvdnwn owoxide solutiun and wlfurir acid solut',dm 1 0 a standard amount (n;mber of droos) of a samde of fixed vanadium concentration. After a sufficient time has elnosed. absorhnnce iS

' University of Houston, Houston, Texas 77004 Volume 56, Number 5, May 1979 1 307

Figure 2. Example of a worksheet which could be used with this experiment. reazcnt and i h fixed ~ ammnt 181 i.hromq,hore is diluted o r is eon\.erred to a abiorlring speriei 1211.The goal of the uptimization iitutind the amuuntsuf hydn,:rn pvn,xidewlution and ;ulturicarid solution that produce maximum absorbance. Each student should be provided approximately 250 ml of solution containing about 0.1 gvanadium sulfate (-400 ppm), 250 ml of 20% sulfuric acid solution (vlv),and 250 ml of 1%hydrogen . . .mroxide solution (vlv). The boundaries for the hydrogen peroxide and sulfuric acid solutions are set a t Oand 100drops. Astandard amount of vanadium solution (20 drops) is placed in a spectraphotometer cell (test tube if a Spectronic 20 is used). Hydrogen peroxide and then sulfuric acid (the order of reagent addition is important) are added in amounts dictated by the simplex algorithm and stirring is initiated. Absorbance is measured 5 min after the addition of sulfuric acid. Suggested starting vertices are (10 drops H&10 drops H2SOa),(50,101, (10,50). The following initial number of drops per solution A and solution B were used and categorized according to their responses duringexperimentatian. XI

x2

Drops Solution

Drops Solution

Vertex

A

B

1 2 3

25

33

10

10

1

22

10

20

PO

40

50

"2%

Figure 3. Typical simplex plots of H202 versus drops of H2S04.

6 If this response a t R is more desirable than the response a t B (best response), an expansion may be attempted. The new vertex E is generated by 'applying the following equation:

Relative Resoonse 51.9 worst 62.3 next to worst 67.5 best

In order t o start simplex calculations the following steps must be taken:

if the response at I? is brrter than thr response at R, I? is rrmined nnd thc nnv qimplex i. H Y E If the response at E is not hetter than nt N, rhr expansion is said tu hare failed and BNR is taken as the new simplex The alearithm is restarted usine the new simolex. However if resoonse a t R is less deshhle than a t N. we can msume

tee

STEP 1 2 3.

Place the number of drops used per response in the order listed on the worksheet (i.e., worst, next to worst, best responses), as shown in the sample worksheet. Take the summation of the nextto the worst response and the best response. T o obtain P divide through the summation by n , where n = "

Z.

1 h

Suhstrnrt your worst rrspmsp frum F. 1;)generate the new vertex X 1i.r.. a ncw set ofexperrmental cmdniunil, the fdluwing equatlon must he applied: R=P+(P-W) where R is the first refection in the simplex.

308 1 Journal of Chemical Education

ed: a) If the response a t R is wone than the response a t N but not worse than that a t W, the new vertex should lie closer to R than to W: C n = F + o . 5 ( F - W) the process is restarted with the new simplex BNCR. b) If the response a t R is worse than the response a t W, then the new vertex should lie closer t o W than t o R: Cw = P - 0.5(i3 - W) the process is restarted with the new simplex BNCw.

In our case, hbwever, we see that the Cw contraction has failed Le., giving a negative number of drops), therefore the process is restarted with the new simplex RNCn, applying the rules previously stated.

Results Figures 3a and h show the progress of the simplex toward the optimum in a typical laboratory study. The numbers indicate the absorbance response a t each vertex. The large initial simplex is seen t o contract into a smaller region about the optimum. As can be seen by these figures, each expeiiment will predict a slightly different optimum and may take a few more or less simplex steps. However, the student should get a feeling for optimization and approach the same general optimum region.

Literature cited (11 ~ ~ ~W..Hext, ~ bG. R., l and ~ Himworth, ~ , F. R., Teehnomelrics, 4. 441 (19621 (21 Nelder, J . A,, and Mead, R., Computer J.,7,308 (19651. (31 Em*, R.R.. R m . Sci. Indrum.. 39,988 (19681. (4) I,ong,D.E.,Anal.Chim.Aclm, 46,191(19691. I61 Houle, M.J., h n g , D. E., and Smotte, D., A n d Lett., 3,401 (19701. (6) Derning, S. N.. and Morgan. S. L., Anol. Chem., 45.278A (19731.

Czech. F.P., J. Ass. Oiiie, Anal. Chem., 56,1489 (19731. CzechF.P.. J.Azs. Offic. Anol. Chem., 56,1496 119731. Deming, S. N.,and King, P. G., Res.iDeoelop., 26.22 (19741. Morgan.S.L.,and Dorning,S. N.,Anol. Chem., 46, 1170 11974). King,P.G.,snd Deming,S. N.,Anoi. Chem., 46,1476(19741. King, P. G.,and Derninp. S. N.,Absi,orta American Associ.fion Ciinieoi Chemist$ B t h Notional Meeting, Los Vr@zs, Nauodo, August 1974, Paper No. 1% Clin. Chem.. 20,891 (19741. (13) King, P. G.,P h D Diasertafion, Emory University, Atlanta, Georgia. 1974. 1141 Krau8e.R. D.,end Lott,J. A.,Ciin. Chem., 20.775 (19741. (15) Srnits,R.,Vanmelen,C.,and Massart, D.L., 2. Anal. Chom., 278,1(19751. (16) Ring,P. G.,Deming,S. N..and Mo~an,S.,Anai.Latl., 8,369 119751. ,171 h r k e r . JI.. L. R.. Morgan, S. L.. and Deming, S. N., Appl Sprrlrose., 29, 429 (19751. (181 Dsan, W. K., Hrdd, K. J., end Dcrning, S. N., Science, 189,805 (19751. (19) Viekers, T.J.. Johnson, E. R, and Wolfe. T. C., Abstrorts Pilfsbuigh Cmiemnncs on Anolylicni Chemistry and Applied Spectroscopy, Cieudond, Ohio. Mamh 1975, Paper Na. 136. (20) Denton, M. B.,m d Routh, M. W., Abalracts Pittsburgh conisrenee on Analytical Chemist" end Applied Spectroscopy, Cieueiond, Ohio, Momh 1975, Paper No. 391. (211 Wi1son.A. L., Tolmfo, 17.21 (19701. 122) h w e , C . W., Trans. Insf. Chem. Eng., 4z,T334(19641. (23) Feigl, F,andAnger.V.,"SputTestsin InorganicAndmi8,"6thod., (Tmnslotor Oosper, R. E.1, Elsevier, New York, 1972.

(7) (81 (9) (10) (111 (121

Volume 56. Number 5, May 1979 1 309