A low-noise simplex optimization experiment - Journal of Chemical

A low-noise simplex optimization experiment. Scott Steig. J. Chem. Educ. , 1986, 63 (6), p 547. DOI: 10.1021/ed063p547. Publication Date: June 1986...
0 downloads 0 Views 2MB Size
A Low-Noise Simplex Optimization Experiment Scott Stleg' Harvey Mudd College. Claremont, CA 91711 Experimental

Although many chemists are aware of the ultimate futility of optimizing a chemical system by varying, one a t a time, the narameters that control a comnlicated svstem. this insight is not widely shared by students of chemistry. In their coursework. two-dimensional d o t s of a single parameter and its depend& response functibn are the u&i way of examining physical relationships. The partial derivatives of thermodynamics make the varying of parameters one a t a time, parallel to a parameter's axis, almost folk wisdom. This becomes a bariier to thinking about howtwo or more parameters interact in a system. The simplex optimization scheme popularized by Deming and Morgan (1, 2) is simple yet sensitive enough to show students how a direction-of-maximum-slope optimum searching algorithm works. In a simplex optimization, by usine a logical aleorithm which nlans an exneriment and evaliates $s "response", the student gets to kvaluate data immediatelv and unambiauouslv in order to plan each succeeding experiment. ~ppl&g this algorithmduring the lab period is a pleasant and important change from experiments in which the student has liitle input into the procedure and is asked to evaluate the experiment's responses only after the experiment is safely over. Anyone who has tried simplex optimization knows that a laree random error or noise inherent in the resnonses of the experiments is the death of the optimizationf the simplex simply flounders about in the noise. Although any experiment with a large noise content is frustrating, the simplex optimization scheme is particularly susceptible to noise hecause no functional relationship between the responses and the parameters is found: the scheme lacks a model that wouid help reduce noise effects. In contrast, when a single parameter x is varied to give responses r(x), they are usually fitted to a model from which an optimum can be found by inspection or the calculus. This model will always have the effect of reducing noise in the optimum. There are simplex algorithms that construct local models in order to reduce their noise suscentibilitv. notablv the Super Modified Simplex of Ruuth etal. (3),the ~mprovedsuper Modified Simolexof Van Der Wiel 14). and the Weighted Simnlex Method the la& these algo~ t bf Ryan et al. (5). ~ x c i for rithms are not simple enough for the student to grasp during a single experiment and would have to he used as black-box computer programs. So, the noise-susreptible, yet revealing, Modified Simplex algorithm of ref 1 is still best for student use. Shavers et al. (6)have written a laboratory experiment applying the algorithm in ref I to a two-parameter optimization: the number of drops of a vanadiumlll) sulfate solution and the number of drips of 1% Hz02 sbktion added to a constant amount of sulfuric acid solution to eive the maximum absorbance of the colored oxidation prdduct. The sulfuricacid amount is not optimized. In using this experiment we have found that i t of& gives a large k d o m krror hecause O9 bubbles form in the cuvettes and because students miscount drops. This "chemical noise" is a source of anguish among students who, even if initially intrigued with the grapl;,cal and logical progression of the algori;hm, will eventually throw up their hands and their flasks in disgust when they~cannot consistent rankings of vertexes from which to make decisions. Our HC1-methyl violet system described below is chemicallv low-noise: it has onlv two reaeents. both optimized, and has no side reactions.

Two solutions are made available, a 1M HCI solution and a 20 ppm aqueous methyl violet indicator solution. The object is to dilute the HC1 solution with the methyl violet solution to give the maximum concentration of the yellow denrotonated form of .the indicator: its absorbance maximum is a t 425 nm. Since the pK, of methyl violet is 1.0 and the pH of the diluted HCl solutions range from 0 to about 2, the resulting pH and the diluted total concentration of methvl violet interact to determine the resulting color. The color-is difficult to predict and lends itself to a simplex scheme. A Styrofoam block resting on an electronic balance pan holds two spectrometer cuvettes, labelled x and y. The cuvettes have been rinsed with water and shaken dry to ensure no sample carryover and a constant cuvette wetness. The HCIis weighed from a syringe through the top of the balance chamber into cuvette x, the balance tared, and the methyl violet weighed from a syringe into cuvette y. The weights of the solutions in milligrams, rather than the number of drops as in ref 6. are the parameters x and v. One electronic balance canserve;woor threestudents ifen&hcuvettesand Styrofoam holders are s u ~ d i e dIf . such balances are not available, two burets may bi;sed to dispense volumes rather than weights of solution. The contents of cuvette x i s poured into cuvette y, a timer is started, y is poured into x, then x into y again. The color changes with time; the reaction must be started reproducibly, and the response r(x,y), the transmittance or absorbance. must he measured 1.0 min after x is first noured into y. Just before 1.0 min, any bubbles in the cuvette'are tapped off the walls. and the cuvette is placed into the snectrometer (Turner, ~ d d e l 3 3 0similar , to the Bausch and i o m h Spectronic 20). The snectrometer must be checked for tungsten source and deteitor noise or short-term drifting as these greatly degrade the simplex responses. At least once per simplex the 100 % T is set, using a third cuvette filled with water, to reduce the effects of long-term drift. The optimum r(x,y) will he the minimum %T(x,y) or the maximum A(x,y) obtained a t 425 nm. The Modified Simplex algorithm in ref. 6 is used with minor changes. The "best" vertex is named A rather than B. This nomenclature allows a natural expansion to hither dimensions in which vertexes would be named, from best to worst: A. B. C.. . . .N. W. The student d o t s the boundaries of x = 0; = 0 and x y = 3600 mg (Luvette full) onto the simplex map of xy space (see figure), and plots each new simplex vertex A, N, or W. A similar lower boundary to nrevent an unfilled liaht path is not used as i t is physically possible and because the simplex naturally moves away from this region of low absorbance. If an out-of-bounds move occurs, the student is given the option of either invoking a contraction towards W or placing the reflection vertex R or expansion vertex E just inside the boundary crossed, near the point where the extension of the line from W to the centroid P meets the boundary, as in ref. 3. This allows responses near boundaries to be found and is easily done graphically. A starting simplex [vertex 1 (900, 900), vertex 2 (900, 1500), vertex 3 (1800,1200)] is supplied although some students make up their own. ~~

~

.~~~~~ ~~~

~

~

.~~~~~~~~ ~~

-

+

' Present address: Lachat Instruments. 10500 N. Port Washington Rd..

Mequon. WI 53092

Volume 83 Number 6 June 1986

547

3800

3800

The canyon floor is a low-noise, low-slope, "rugged" response region for the final simplexes, a region which can be found by most students within 10 simplexes, and which is also easy to stay in once found. In fact, once found, preseruing the optimum by controlling x and y is the object of 1800 C quality control schemes. Here, the simplex has led us t o the 0 optimum region and given us the means to control this re*3 sponse or optimum quality. * a. 0 Looking at the dotted line canyon, the simplex tells us that VI there is anoptimum ratio of x toy. By means of the students' 1800 9800 r O 1800 3600 0 e two-variable simplex searches, a "best direction" of oneJ. Fruetel C. Boegeman variable search has been found, a direction not parallel to 0 either axis, but shown by the dotted line. In our algorithm, when all three of a simplex vertexes' resvonses lie within the standard deviation or noise in the three responses, the optimization ends. The lower this noise, the more sure the student is that he or she has reached a real optimum and is not floundering in a thicket of noise far from it. The above suggests what an ideal training chemical system should be for the student simplex optimizer. Many other similar systems could he devised by using HC1 or I 3600 & 0 _ _ 1800 3800 NaOH solutions of 0.001 M to 1 M and indicators of K,'s 0 1800 H. Chan L . Lee about the same as the concentration of strong acid or base mg HCl s o l u t i o n diluent. The time of reaction could become a third optimized Simplex maps from tour students. The top two were done one day, the bottom parameter in a three-dimensional optimization. two on another. The optimum simplex Is blackened. The mean and precisionof Although unanticipated real-life problems in an experithe three final simplex venexes' responses are given. The center of the ment are interesting in themselves, the ones that turn out to optimum ridge or canyon is shown as a dotted line. he educationalareusually due to determinate errors. I t is the random error or chemical noise in an experiment that most discourages students and instructors, that is difficult to exDlocussion plain or correct during an experiment, and that every effort should be made to minimize. When the chemical noise is If the system has a definite and a single optimum region, kept low by careful experiment design, the student-contriball students will approach i t regardless of path. However, if uted noise becomes limitine. As in this simolex ootimizaan optimum region is very sharp, a movement there gives a tion, if the student contribu& little noise to theenpkriment. large change in response, making this the region of highest he or she is rewarded for this careiul work with eood results. chemical noise and thus the most uncertain region in the x,y here an unambiguous simplex progress and optimum. space. The optimum region in our HC1-methyl violet space appears to be a broad canyon for r(x,y) = % transmittance, Llterture Clted %T,or a broad ridge for r(x,y) = absorbance, A, the center of (1) Moqan,S.L.:Deming,S.N.Anol.Chom. 1914,46,1110. which is shown as a dotted line in the figure. Although the (2) Doming,S.N.;Parker,L.R,&.CRCCn'L.Reu.Aml. Chsm. 1918.9,187. (3) Roulh, M. W.; Swart., P, A.: Denton, M. B. Anal. Chem. 1971.49, 1422. response will vary as the origin is approached, the slope in (4) Van Der Wiei.P. F.A.An.31.Chim.Aelo 1980.122.421. the region around the dotted line is small enough so that the ( 5 ) Ryan,P.B.;Barr,R.L.;Tadd,H.D.Anal.Chrm.1980.52,1460. (6)Shaven, C. L.: Pama, M. L.; Oeming, S. N. J. Chsm. Educ. 1919.56.307. student reaches an optimum soon after entering the canyon.

-

--

"1 Ld.-A

~

~~~~

~~~

~

-

548

Journal of Chemical Education