You are on page 1of 4

Instrumental Simplex Optimization

Experimental Illustrations for an Undergraduate Laboratory Course


D. J. Leggett
University of Houston, Houston, TX 77012

A question frequently faced by chemists involved in pure figure having one more vertex than the number of factors.
orapplied research is, “Now that the system under study Rule 1: A move toward the optimum response is made after
works, can it be made to perform more efficiently?” This sit- each observation of the response. This move is made once the
uation often occurs in 1) instrumental analysis where the responses have been ranked in the order best, next.-to-worse,
machine’s performance is a function of several adjustable worst. For the situation involving more than two factors, the
parameters, 2) the improvement of a quantitative determi- ranking is performed at best,. next-to-worst, worst.
.. ,

nation where the sensitivity is to be maximized or side reac- Rule 2: A move is made such that the vertex having the
tions and interferences minimized, 3) industrial productivity worst response, W, is rejected and replaced by a new vertex
See https://pubs.acs.org/sharingguidelines for options on how to legitimately share published articles.

where the yield of a chemical process is to be raised, and 4) generated by a reflection through the midpoint of the re-
numerical analysis where experimental data are fit to a maining hyperface. Figure indicates the progress from the
1

mathematical model by the simultaneous adjustment of a initial simplex (ABC) to the final simplex (JKO) and the table
Downloaded via UNIV DE ALICANTE on April 24, 2023 at 07:41:24 (UTC).

number of variables. details the ranking, rejection, and generation of each new
Although there are many methods available to perform the simplex.
above tasks including factorial design of experiments, the Rule 3: If, on ranking the vertices of the next simplex, the
stochastic approach, the one-factor-at-a-time approach (for newly created vertex is the worst vertex, then reject the
1) to 3)), and many nonlinear least squares algorithms (for 4)) next-to-worst vertex. If this procedure is not adopted, the next
most of t hese techniques are either prone to failure, too time simplex generated will be identical to the previous simplex and
consuming, or too difficult to understand for the average the optimization process will terminate abruptly—hence the
chemistry major’s background of statistics and mathe- ranking order. We are only interested in B, N, and W for any
matics. n-dimensional problem. This rule has been invoked for runs
10, 13, 14 and 16 in the table.
The Simplex Method Rule 4. Roundary constraint violations are accorded a
The original simplex concept was derived by Box and suitably bad response. If one or more of the new vertex levels
Wilson (1) who combined response-surface methodology and are found to be outside the boundary constraints, that par-

hill-climbing techniques to produce an algorithm capable of ticular experiment is not performed. However, the response
varying many factors simultaneously and arriving at the op- is assigned a suitably low (i.e., bad) value and included in the
timum level of response. At that time the technique was next round of calculations.
known as “evolutionary operation” (EVOP) (2) and it re- Rule 5: If a vertex has been retained for n + / moves, where
mained for Spendley et al. (3), in 1962, to develop the method n is the number of vertices, then the response for that vertex
of “sequential application of simplex designs in optimization is re-evaluated. This procedure prevents the simplex from
and evolutionary operations.” Nelder and Mead (4) provided becoming stranded on an experimental point whose response
a simple yet powerful modification to the original simplex may have been erroneously high. It should be noted that the
method, and at this time, the method has been used in a wide retention of a single vertex for n + 1 t imes does not necessarily
variety of applications. mean that the optimum has been reached. Figure shows t hat
1

The principles of the fixed (3) and variable (4) sized simplex vertex H is retained five times before a vertex, K, having a
and their implementation in a fourth-year undergraduate
instrumental analysis course will he discussed. The simplex
technique has been reviewed in detail by Deming et al. (5-7,
bibliography).
The Simplex Algorithm
Consider an analytical instrument, the response of which
is to be optimized. The response is believed to be dependent
upon two variable inputs. Let these inputs be restricted, ar-
bitrarily, to values bounded by 0.0 and 100.0. If three experi-
ments are performed, each at different levels of the variable
inputs, then three different responses from the instrument
will be obtained. Assuming that these responses are measur-
able then one of the three will be the worst response. Since the
object of the procedure is to improve the response of the in-
strument, it is logical to reject the input variables that led to
the lowest response replacing them with a new pair that will
provide, hopefully, an improved response.
The above description is the basic aim of the simplex
method and may be strictly formulated in terms of five simple
rules. The following terminology will be used to describe the
simplex method. The variable inputs, upon which the response
depends, are known as factors. The particular input value of Figure 1. Progress of fixed size simplex, superimposed on a hypothetical re-
that factor is known as its level. A simplex figure is a geometric sponse surface.

Volume 60 Number 9 September 1983 707


higher response, is found. For a two-dimensional simplex, will, in all probability, establish whether the first optimum
starting from an equilateral simplex, the optimum is reached was local or not.
when the simplexes close pack to form a hexagon. This can be That the fixed size simplex cannot accelerate its progress
seen in Figure 1 where vertex K has the highest response. in accordance with the response surface was recognized by
However, this phenomenon may not be observable when Nelder and Mead (4). However, the fixed size simplex provides
dealing with systems of higher dimensions. a valuable tool for localization and tracking of a moving op-
These five rules are the basis of the simplex method. timum. For example, instrumentation that is prone to drift
may be continually monitored and held at its peak perfor-
The Fixed Size Simplex mance by employing a small fixed size simplex and interfacing
Three limitations are apparent when using the fixed size the equipment to a small computer.
simplex. First, the optimum is never precisely located, except
The Variable Size Simplex
by chance. Second, a false optimum may be located. Third,
the progress towards the optimum can only proceed at a fixed Precise optimum location and simplex acceleration have
rate. been described by Nelder and Mead (4), with the incorpora-
None of these limitations are severe and in fact may, in tion of the operations expansion and contraction. Together,
certain situations, prove to be beneficial. To obtain a precise these operations provide the means by which a simplex figure
location for the optimum, a smaller simplex may be started may expand and accelerate towards the region of the optimum
within the region of the optimum located by the larger sim- and then reduce its search region until the optimum is located
plex. This process may be repeated as many times as desired. with the desired precision.
On the other hand, if an improvement in response of only The movement of the simplex is governed by the same basic
greater than 80% of the presumed maximum response is de- set of rules as for the fixed size simplex. Additional tests are
sired, then the fixed size simplex would prove to be entirely used to decide which operation to perform in a given situation.
adequate. These rules are presented as a flow chart in Figure 2, The
The location of a local rather than the global optimum is a possible operations in the variable size simplex are shown in
problem not only restricted to this type of search procedure. Figure 3.
Restarting the process from a different point in factor space
The Relevant Calculations
Assume that the responses for the vertices BNW, Figure
4, have been ranked as indicated earlier.
Expressing the coordinates of these vertices as vectors we
have
W =
(l 1)

N =
(5 8)

B =
(9 1)

The reflection operation is performed by reflecting the


worst vertex through the centroid of the remaining hyperface,
p. Thus the coordinates of p are needed.

Figure 2. Flow chart summarizing rules for the acceptance or rejection of a


vertex, for either fixed or variable size simplex.

Progress of Simplex (Figure 2) Showing Rejected and New


Vertices and Responses

Response
Current Ranked’ Rejected New for New Figure 3. The simplex figure illustrating the inter-relationships between each
Move Simplex Vertices Vertex Vertex Vertex move.

4 ABC ABC0 AD 65
5 BCD BCD BE 60
6 CDS CED C F 76 E
7 DBF EOF EG 71
8 DFG DGF D H 91
9 FGH GFH G I 66
10 FHI IFH Fc J 77
11 HIJ IJH I K 95
12 HJK JHK J L 72
13 FfKL LHK Ftc M 66
14 KLM MLK Lc N 85
15 KMN MNK MO 83
16 KNO ONK Nc F( =
J) 77

Ranked in order worst, nexf-fo-worst, best.



Responses tor initial simplex are A = 37. S —
45, C =
53. Figure 4. The simplex figure with calculated coordinates for each vertex. See
c
Application of Rule 3. text for details of calculations.

708 Journal of Chemical Education


By definition, p =
average of the sum of the remaining Useful discussions on the various aspects of the fixed and
vertices variable sized simplex have been written by several authors.
These have been included in the Bibliography, in a suggested
p =
(N + B)/(n —

1)
reading order.
where n =
number of vertices The Simplex Technique in an Undergraduate Laboratory
N =
(5 8) Course
B =
(9 1) The introduction of the simplex technique to an under-
N + B =
(14 9) graduate class has been achieved by using a computer to
simulate an analytical instrument or chemical process. This
Therefore,
approach has been used for the following reasons. Although
P
=
(7 4.5) the simplex technique is simple to comprehend and apply
The distance between p and W is the numerical difference (often in hindsight) it demands that the student fully un-
between the two vectors, derstand the principles and practices involved. Most of our
students have had no prior experience with analytical in-
p =
a 4.5) strumental techniques (except spectrophotometric methods).
W =
(l 1 ) These two facts can lead to rapid disenchantment with sim-
p
-

W =
(6 3.5) plex if students are required to optimize, immediately, a real
analytical instrument. Any undetected arithmetic mistake or
The coordinates of the reflected vertex are obtained by adding
misunderstanding of the method may lead much wasted
(p W) to the centroid coordinates,

laboratory time.
<p-W) =
(6 3.5) The use of a computer to simulate an analytical instrument
+ p =
(7 4.5) ensures that
p + (p
-

W) =
(13 8 )
= R 1) the “response" is always correct and free from experimental
error;
For the fixed size simplex the calculations finish at this no waiting time between the commencement of an
2) there is
point. For the variable size simplex the expansion or con- “experiment" at the new factor levels and obtaining the re-
traction coordinates are dependent upon the acceleration sponse;
factor chosen. For the majority of operations acceleration 3) students are freed of concerns involving the incorrect use of the
factors of two for an expansion and 0.5 for a contraction, are analytical instrument and therefore may concentrate on per-
satisfactory. In principle, however, there is no reason why fecting their understanding of the simplex technique.
other factors cannot he chosen. This familiarization process is broken down into three
Thus expansion coordinates for E are given by
parts:
E =
p + 2(p-W) 1) Attempts to obtain the best response from a system with three
and for the example in Figure 4, interacting factors by any method, other than the simplex
technique. This is, in effect, an exercise in frustration and em-
E =
(19 11.5) phasizes the need for a systematic approach to optimization.
2) The application of the fixed size simplex technique to a two
The contraction towards the reflection, Cr, or towards the factor system.
worst vertex, Cw,are defined by 3) The application of the variable size simplex technique to a two
and three factor system.
Cr =
p + 0.5(p
-

W) When dealing with a two-dimensional simplex the coordi-


Cw =
P
~

0.5(p -

W) nates of each vertex, after they have been calculated, are


plotted. This allows the student to check the accuracy of the
and for the example in Figure 4. arithmetic, and also provides visual encouragement that the
CH =
(10 6.25) process is being optimized. The ability to plot the progress of
the simplex is particularly valuable when dealing with the
Cw =
(4 2.75) variable size simplex. It has been found that most arithmetic
errors are made in the early stages of this part of the experi-
Once the coordinates of the reflection vertex are calculated,
ment.
and the response evaluated, the remaining vertices (E, Cr, and
Finally, the three-dimensional simplex experiment is run
Cw) are examined in accordance with the flow chart, Figure and this, since it is not easy to plot, reinforces the need to
2.
check all calculations. Experience has shown that by this stage
The Initial Simplex a few mistakes are made. It should be pointed out that the
simplex method does not, in principle, fail if the vertex coor-
The establishment of the initial simplex is also an automatic dinates were incorrectly calculated. Either it will take a few
procedure. The first vertex is normally selected at factor levels more experiments to realign the simplex figure, or, in the most
that give a measurable response. Coordinates for the other severe instance, the simplex will be distorted sufficiently that
vertices are calculated by applying the general technique of in subsequent moves one vertex may partially collapse.
Spendlev et al. (3). For a two-dimensional simplex, if the first
vertex coordinates are (20, 20) then the other two vertices will Instrument Simulation using a Computer
be at (20 + a, 20 + b) and (20 + b, 20 + a), where An interactive computer program (9) has been developed
5 that will provide a numerical response to a set of factor levels.
a =—7r((n + l)1/2 + (n -

1))
2 The program consists of a number of different experiments
including the “exercise in frustration” mentioned earlier.
b =
+ l)'/2- 1) Depending upon the particular experiment chosen the pro-
ny/2 gram prompts the student for information, such as student
where n = =
step size for each
number of factors and Sn name, experiment type and problem number, factor levels,
factor. and the type of simplex move contemplated, if the variable
This topic is reviewed in greater detail by Yarbro and sized simplex is being worked on. The program does not per-
Deming (8). form any calculations related to the simplex algorithm. Con-

Volume 60 Number 9 September 1983 709


When the optimum conditions for the determination of
magnesium and/or calcium have been determined the stu-
dents are required to rationalize their observations. The ex-
perimentally determined optimum conditions are compared
with recommended conditions found in the literature.
Conclusion
The inpact of simplex optimization on students has proven
to be very encouraging. This part of the instrumentation
laboratory course occupies about one quarter of the semester
and provides benefits additional to an appreciation of simplex
optimization. First, many of our students have not had
hands-on experience with a main-frame computer, especially
in an interactive mode. Although no programming is involved,
a degree of confidence in working with a computer is devel-
oped during the simulation experiments. Second, the real-life
application of simplex also provides experience with the basic
Figure 5. Progress of simplex for the gas chromatographic separation of a tour
techniques of atomic absorption spectrophotometry and gas
component mixture.
chromatography. Third, the results of the instrumental op-
timizations correspond to the predicted optimal conditions
sequently, it is the responsibility of the student to ensure that described in lectures on these techniques.
the calculations have been correctly performed. Work sheets,
used by the students, are designed to aid in an orderly pro- Acknowledgment
gression through each step in the calculations. By using the The author wishes to express his sincere appreciation to
computer as an analytical instrument the student is free to Professor S. N. Deming for the many helpful discussions on
concentrate on the principles of the method. Working inter- the simplex method.
actively, the response is available within seconds, rather than
in */2 hour as might be the situation with the optimization of Literature Cited
a gas chromatograph. Finally, should a gross error be made
(1) Box, G. E. P., and Wilson, K. B.,J. Roy. Statist. Soc.,B, 13, 1 (1951).
in the calculation of a factor level, there is no possibility of an (2) Box, G. E. P.. Appl. Statist., 6,81 (1957).
accident—a possibility if air and fuel flow rates are the pa- (3) Spendley, W., Hext, G. R., and Himsworth, F, R., Technametrics, 4, 441 (1962).
(4) Nelder, J. A., and Mead, R., Computer J., 7, 308 (1965).
rameters being studied in the optimization of an atomic (5) Deming, S. N. and Parker, L. R.,Crif. Rev. Anal. Chem., 7, 187, (1978).
spectrophotometer. (6) Deming, S. N.. Morgan, S. L., and Willcott, M. R., Amer. Lab., 8(10), 13 (1976).
(7) Shavers, C. L., Parsons, M. L., and Deming, S. N., J. CHEM. EDUC., 56, 307 (1979).
(8) Yabro, L. A., and Deming, S. N., Anal. Chim. Acta, 73,391 11974).
Instrument Optimization (9) Listings of the interactive computer program (FORTRAN), implementation details.
Once students are familiar and feel comfortable with the sample worksheets, and a sample terminal session are available from the author upon
request.
principles and practice of simplex, two optimizations are (10) Kaiser, R., “Gas Chromatographie." Geest and Portig, Leipzig, I960, p. 33.
performed on analytical instruments. (11) Morgan, S. L., and Deming, S. N., J. Chromatogr., 112, 267 (19751.
(12) Parker, L. R., Morgan, S. L., and Deming, S. N., Appl. Spectrosc., 29,429 (1975).
The first experiment involves the two factor optimization
of a gas chromatograph. In this experiment a four component Bibliography
mixture of alcohols is to be separated. Oven temperature and Deming, S. N.r Morgan, S. L., and Willcott, M. R., Amer. Labor., 8(10), 13 (1976). (An ele-
carrier gas flow rate are the chosen factors. Boundary con- mentary discussion of optimization including the simplex technique).
Deming, S. N., and King, P. G-, Res. Develop., 25(5), 22 (1974). (An alternative elementary
straints are a maximum oven temperature, commensurate discussion to simplex techniques).
with the particular column, and a constraint on the length of Deming, S. N., and Morgan, S. L., Anal. Chem., 45,278A (1973). (A detailed but very' readable
discussion of the sequential simplex method).
time taken for the separation (20 min). Peak separation, as Yarbro, L. A., and Deming. S. N., Anal. Chim. Acta, 73,391 (1974). (Discusses factor selection
defined by Kaiser (10, 11), is optimized. The progress of the and preprocessing, step size choice, and the design of the initial simplex).
simplex figure, for the first 14 moves, is shown in Figure 5. King, P. G.. Deming, S. N., and Morgan, S. L., Anal. Lett.. 8,369 (1975). (A delineation of
some mistakes and misunderstandings in the application of simplex methods).
Moves 9, 11, and 13 violated the 20 min time constraint. Morgan, S. L., and Deming, S. N., Anal. Chem., 46,1170 (1974). (An example of the simplex
The second experiment is a three-factor optimization of an method applied to the optimization of an analytical chemical method. Regression and
factorial design analysis is also discussed).
atomic absorption spectrophotometer. The absorbance, for Parker, L. R., Morgan, S. L.. and Deming, S. N., App Spectros., 29,429 (1975). (Application
a constant concentration of magnesium or calcium ions, is of simplex to the optimization of an atomic absorption spectrometer).
Dean, W. K., Heald, K. J., and Deming, S. N., Science, 189,806 (1975). (Simplex optimization
optimized. Air and fuel flow rates and burner height are the of reaction yields).
factors. Boundary constraints are imposed by the safe maxi- Morgan, S. L., and Deming, S. N., J. Chromatogr., 112, 267 (1975) (Optimization strategies,
mum and minimum flow rates of the gases and by the ad- including simplex, for the development of gas-liquid chromatographic methods).
King, P. G., and Deming, S. N., Anal. Chem.. 46, 1476 (1974). (UNlPLEX: single-factor
justment limits of the burner. A response of —1 is assigned optimization of response in the presence of error).
when a factor level falls outside any one of the boundaries, Routh, M. W,, Swartz, P. A., and Denton, M. B., Anal. Chem.. 49,1422 (1977). (A new im-
proved simplex optimization algorithm is developed. It is claimed to be superior to the
thereby forcing the simplex figure away from this region original simplex algorithm in the presence of noise, multiridged surfaces, and final location
(12). of the optimum I.

710 Journal of Chemical Education

You might also like