Genetic Algorithm (GA) is a powerful tool for optimizing multivariate engineering problems. When combined with OnScale’s ability to evaluate many designs in parallel it unlocks the ability to rapidly solve complex design problems. This example shows how to optimize the Bragg reflector of an SMR filter using Matlab’s Global Optimization Toolbox and OnScale
1D SMR Model Structure
Bragg Layers are layers of material stacked on top of the substrate. In this example layers are made up of two materials, Silicon Dioxide and Tungsten. The thickness of these layers effects how much energy escapes through the substrate. It is important to optimize the thickness of these layers to reduce substrate losses in SMRs to maintain a high quality factor, a key performance metric for these types of filters.
- Silicon Dioxide (Si02) Thickness - 600 nm-1,200 nm
- Tungsten Thickness - 600 nm-1,200 nm
- Maximize Quality Factor (Q)
- 2000 - Q (Used because GA is set up to minimize cost function)
- Population - 20
- Max Generations - 20
In Matlab, multiple plot functions are available to track the optimization process. This allows users to see the best score at each iteration, the best current design, the scores of each design in the population etc.
From the plots above it is clear to see that the best design was:
- SiO2 Thickness - 925 nm
- Tungsten Thickness - 1,025 nm
- Score - 423.1
- Q - 1,577
Impedance Plot of Best Design
Number of Simulations
4 mins (2 CPU)
Recreate This Study
The following files are required to recreate this optimization example, click here to download the files:
You will also require:
- OnScale Cloud Account - www.onscale.com
- Matlab & Global Optimization Toolbox
- OnScale Command Line Interface (CLI)
Step 1 - Move OnScale CLI to C Drive (C:)
The OnScale Command Line Interface allows users to submit, download and post process simulations without having to use the OnScale UI. Unzip 'SMR_1D_Optimization.zip' then unzip 'OnScale_CLI.zip' and move 'OnScale_CLI' to your C Drive.
Step 2 - Username and Password
You must have an OnScale Account to submit simulations. Open 'smr_func.m' and insert your OnScale Account Username and Password where specified.
Step 3 - Optimization Toolbox
Open the Optimization Tool, located in Apps tab of Matlab.
Step 4 - Solver
Set the Solver option to genetic algorithm.
Step 5 - Fitness Function
Set the Fitness Function to @smr_func and set Number of variables to 2.
Step 6 - Constrain Input Values
Set input values upper and lower bounds to [1200e-9 1200e-9] and [600e-9 600e-9] respectively.
Step 7 - Population Size
Set the Population Size to 20.
Step 8 - Generations
Set Generations to 20.
Step 9 - Plot Functions
Select the desired Plot Functions.
Step 10 - User Function Evaluation
Change user function evaluation to vectorized.
Step 11 - Run Optimization
To run the optimization, select Start.