| Matlab was used to create a program that would generate simulated surfaces and their interferograms to be analyzed using the algorithm. As was true for the test surface used in Reference [[#References|[1]]], Legendre polynomials of two variables were chosen as a basis set with which to describe the surfaces. The surfaces are described by the weighted sum of the matrix elements <math>a_{i,j}P_{i}(x)P_{j}(y)</math> [[#References|[1]]]. These elements take the products of the Legendre polynomials of x and of y in all possible combinations of respective i's and j's and assign to each product its own coefficient, namely <math>a_{i,j}</math>. This is what the surface generator is designed to do. The first set of surfaces was kept somewhat similar to the original test surface. Their interferograms were kept at fifty pixels by fifty pixels, but the coefficients were randomly generated and Legendre polynomials up to the 2nd degree were incorporated. These changes make the surface more closely resemble the surface of a real diamond wafer, but also make the surface a little more difficult for the algorithm to analyze. | | Matlab was used to create a program that would generate simulated surfaces and their interferograms to be analyzed using the algorithm. As was true for the test surface used in Reference [[#References|[1]]], Legendre polynomials of two variables were chosen as a basis set with which to describe the surfaces. The surfaces are described by the weighted sum of the matrix elements <math>a_{i,j}P_{i}(x)P_{j}(y)</math> [[#References|[1]]]. These elements take the products of the Legendre polynomials of x and of y in all possible combinations of respective i's and j's and assign to each product its own coefficient, namely <math>a_{i,j}</math>. This is what the surface generator is designed to do. The first set of surfaces was kept somewhat similar to the original test surface. Their interferograms were kept at fifty pixels by fifty pixels, but the coefficients were randomly generated and Legendre polynomials up to the 2nd degree were incorporated. These changes make the surface more closely resemble the surface of a real diamond wafer, but also make the surface a little more difficult for the algorithm to analyze. |
| + | Once we have generated two surfaces and their interferogram, we can let the algorithm work on it. The algorithm works by meandering through solution space and assigning a <i>Costfunction</i> to each solution it comes upon. If the solution is a poor one, the Costfunction is high, but if the solution is good, then the Costfunction is low. After the algorithm has assigned a Costfunction to a given solution, the algorithm either accepts that solution and moves to it or rejects it and finds another one. The decision of whether to accept or reject a solution with a given Costfunction depends on the <i>temperature</i> of the algorithm at that point in time. The temperature refers to the probability that the algorithm will accept or reject a poor solution. So when the algorithm is "hot" and has a high temperature, it is more likely to accept a poor solution, and when the algorithm is "cool" and has a low temperature, it is less likely to accept a poor solution. As it runs the algorithm completes a cycle that involves first "heating up," i.e., increasing its temperature so that it accepts more and more poor solutions and then "cooling down," i.e., decreasing its temperature so that it accepts fewer and fewer solutions. This cycle, by first heating up and then cooling down, ensures that the algorithm begins from a random position and the solution it ultimately accepts as the best one is not dependent on its starting position. Due to running the MIR, or Multiple Independent Runs, program, this cycle is completed many times during the running of the algorithm, and each cycle is called a run. Each run heats up and then cools down until it reaches a parameter which can be specified and which is called <i>endtemperature</i>. It cools down by a factor of <math>\alpha</math>, so that at each step n, the temperature <math>T_{n}</math> is equal to <math>\alpha T_{n-1}</math>. The first run is 100,000 steps long, and after the first run, each run is increased by a factor called <i>Beta_Runtime</i>. This continues until the final run, which is the longest run shorter than the product of <i>Runfactor</i> and 100,000. Once it has reached this longest run, the algorithm has completed one <i>Sample</i> and the next Sample is begun until the algorithm has completed the specified number of samples. |