This page describes how to run a parameter sweep using the built in sweep utility. Parameter sweeps are useful for finding the optimum value of a parameter, and for studying the sensitivity of the design performance to certain parameters or running a series of simulations with a set of varying parameters. We will demonstrate how to use the parameter sweep feature in a simple example: finding the optimum thickness of an anti-reflection (AR) layer on silicon. The optimum thickness is the thickness that gives the minimum reflection at the wavelength of operation, which in this example is 500 nm.
Parameter sweep properties
- NAME: Parameter sweep name.
- TYPE- RANGES: Specify sweep points with start / stop values. All values will be linearly spaced.
- TYPE - VALUES: Specify each sweep point manually. Allows non-linearly spaced sweep values.
- NUMBER OF POINTS: Number of points in the parameter sweep.
- NAME: A user specified name for the parameter. Will appear in results dataset.
- PARAMETER: Property to sweep.
- TYPE: Used to specify the type of units for the selected property (eg. length, time).
- START/STOP: The start/stop value of the sweep, when using the RANGES option.
- VALUE_1,2,3,...: Specific sweep values, when using the VALUES option.
- ADD: Add another line to the parameters table.
- REMOVE: Remove a line from the parameters table.
- NAME: A user specified name for the result. Will appear in the results dataset.
- RESULT: Result to collect.
- OPERATION: Optionally, apply a simple mathematical operation to the results. Supported operations are Sum, Mean, Integrate.
- RESAVE FILES AFTER ANALYSIS: Optionally, resave the project files after the analysis scripts have been run. This can be helpful when the analysis scripts are slow to run.
Creating a parameter sweep project
1. Make sure you can see the Optimization and Sweeps window. This can be done by going to the menu View->Windows->Optimization and Sweeps, or by right clicking on the upper menu bar and making sure that Optimization and sweeps is selected.
2. Click the Add Sweep button to create a new parameter sweep task. Click the edit button to open the Edit sweep dialog window.
3. Editing parameters
Once the sweep object is open, add a parameter and browse the parameter pulldown menu. Select the "thickness" property of the AR structure.
4. Next, choose the Type to be length and set the Start and Stop values to 10nm and 150nm respectively. The final result should look like the screenshot here.
NOTE: Multiple parameter sweeps and Nested Sweeps
If two or more parameters are specified, they must have the same dimensions (i.e., number of points). Each sweep step will update all parameters values one column at a time (this is not the same as nested parameter sweeps). For information on how to set up nested parameter sweeps, please see Nested Sweeps.
5. Recording results
Add results to record, the recorded results will be available when the sweep is done. Select the power transmission 'T' from the Reflection and Transmission monitors, as shown here.
6. Under the Operation column, please leave the choice blank. The final Parameter Sweep window should look like this figure. Click OK to accept all settings, and go back to the main Optimization and Sweeps window.
NOTE: File not found!
Ensure that there is no period in the parameter sweep name. Otherwise it may result in "file not found" error while running the sweep.
Running the parameter sweep
To run the parameter sweeps, select the parameter sweep and click the run button. To distribute the sweep between several local computers, you must configure the computation Resources before running the optimization. Without additional configuration, all simulations will run on the local computer.
Viewing the results
The parameter sweep data is saved in a similar way to monitor data. One can right-click on the results in the Result View or the parameter sweep project to select any of the sweep results to be displayed in the Visualizer.
Parameter sweep results can also be obtained in the script environment with the command getsweepresult, which is similar to the command getresult. The name of each data member is the Name column that you specified when adding the parameters and results, in this case "T", "R" and "thickness". For example, the following 2 lines of script will plot the result R vs thickness.
R = getsweepresult("thickness_sweep","R");
plot(R.thickness*1e9, R.T, "AR thickness (nm)","R");
We can see that the best thickness is approximately 60 nm. To find the precise value, we could repeat the parameter sweep with more points, or reduce the range of the thicknesses we consider. Alternatively, we could consider using an Optimization project (Optimize a design) to find the thickness that gives the smallest reflection.