• No results found

Advantages and disadvantages

5. Refined Simplex Method

5.1 General features of the simplex method

5.1.4 Advantages and disadvantages

There are several advantages of the simplex method for curve fitting compared to other methods. The least-squares method is one of the most frequently used methods for

curve fitting (Malacara et a l 1990, Rayces 1992). The simplex method is mainly

compared to the least-squares method.

The first advantage is that the simplex method can be applied to any type of function. The least-squares method is restricted to functions which are orthogonal and

which have the derivative functions (Rimmer et a l 1972, Ralston and Rabinowitz 1978,

Rayces 1992). Before the least-squares method is applied, orthogonalization process

such as Gram-Schmidt orthogonalization (Ralston and Rabinowitz 1978, Malacara et a l

1990, Malacara 1992, Swantner and Chow 1994) should be preceded. On the contrary, the simplex method does not need the basis function to be orthogonal nor the derivative function. For example, the least-squares method can not be applied to the Zemike polynomials in Cartesian coordinates as they are not orthogonal over a unit circle

(Malacara et a l 1990). Whereas, the simplex method can be used for the fitting of the

Zemike polynomials in Cartesian coordinates and for any shape, rectangular, triangle, diamond, etc., of the mirror as well as circular shape.

Second, simplex method can easily be ported to any basis function in the computer programs. When a new basis function is to be applied, simply replacing the function to the old one is sufficient. When the number of terms or coefficients of a basis function which is already written in a program is changed, the least-squares method needs many parts of the program to be mended. A new derivative function should be derived and calculating part of the program should be rewritten according to the changed number of terms or coefficients. On the contrary, in the simplex method just adding or deleting the terms from the original basis function is sufficient for a new calculation.

Third, by the basic characteristic of handling the variance of a basis function, i.e. the square value, the simplex method does not have local minima. Such a hazardous

case as falling into a false local minimum never occurs in this case. It always goes to the minimum value of the variance.

Jefferys(1981) mentioned another advantage of the simplex method. The

simplex method does work very well when data are very noisy, in which case the least- squares method will not yield a solution.

There is a disadvantage of the simplex method. It is slow in calculation (William

et a l 1994). As the least-squares method is an analytic calculation method and the simplex method is an iterative method, the least-squares method may be faster than the simplex method for the calculations only. However, considering the development time of the computer program, the simplex method is easier to develop or apply. Consequently the simplex method can be quicker to get a result. Normally, calculation time depends on the amount of data, the number of coefficients to be fit, and the precision of the coefficients to be achieved. As the data processing in AQuaKET does not need to be performed in real-time, it is good to apply the simplex method in AQuaKET. Moreover, as faster computers are being developed, the simplex calculation would be faster.

5.1.5

Test run of the simplex method

The simplex method was tested whether it gives the correct solution for curve fitting. A simulation was performed for the simplex fitting of surface height error of a mirror. Zemike polynomials in Cartesian coordinates were used as a function for the test mn. The mirror was a nominally spherical one with diameter of 760mm and radius of curvature 5400mm. The mirror surface was divided into 51 by 51 grid lines, marking

1959 number of points on the mirror surface.

The simulation software was written in C, which included the conversion of the Caceci and Cacheris’s(1984) PASCAL program of the simplex method. The first step of the simulation was the calculation of the height error on each point of the mirror surface

by giving a set of arbitrary coefficients of Zemike polynomials. From the height error data, new coefficients of Zemike polynomials were derived by using the simplex method. The result of the simulation was judged by comparing the derived coefficients to the given coefficients.

During the simplex fitting, if the initial values and initial step sizes are set near the real values of the coefficients, it will take less time in finding the coefficients within

an accuracy. As for the Zemike polynomials, the ideal mirror is aberration free,

therefore all the initial values of coefficients were set to zero. The calculation was terminated when the difference between the maximum and the minimum coefficient values on each term was ICf^ or less.

Table 5.1 shows the result of the simulation. Four sets of arbitrary coefficients were tried. The first two simulations were performed for Zemike 4 terms polynomials

and the other two for Zemike 9 terms polynomials. Rows from Zq to Zg denote the

coefficients of Zemike polynomials. The results show that the simulated values are the same as the given values within the accuracy.

Related documents