## Photonics

#### Optimization for broadband absorber issue

Tagged:

• rvpandohie
Subscriber

Hi,

I've been trying to run an optimization on a broadband absorber I've been simulating. In the optimization utility article that Lumerical has, it says that the result we're trying to optimize must be a single scalar value, but since I'm testing the absorption of the material over a range of wavelengths, it is not possible for me to use the optimization route in this case. Is there any way I can set the figure of merit that I want to optimize to be the integral of the Reflection over the wavelengths it is being tested for (either through writing a script or through the user interface)? Thank you!

• Guilin Sun
Ansys Employee
yes, if you need Single-valued FOM since directly using the built-in optimization will work for one FOM. So You can for example add one or two lines of scripts in the analysis group or in "model".
FOM=mean(absorption)
where "absorption" is the frequency-dependent matrix of absorption.
https://support.lumerical.com/hc/en-us/articles/360034406314-mean-Script-command
or you can use "integrate" https://support.lumerical.com/hc/en-us/articles/360034405814-integrate-Script-command
it will have dleta_f in the result. So you may want to normalize the result to remove this effect.
If you want to to have more-than-one values of FOM, you will need either to write your own optimization code, or use 3rd party's tool, with the help of API matlab or python, if available and possible.
• rvpandohie
Subscriber
thank you. Just to be sure, would the attached picture be what I write in the figure of merit script in order to maximize the mean(absorption), given that
mean(absorption)=1-(mean(reflection)+mean(abs(transmission)))?

• Guilin Sun
Ansys Employee
You will need first to get the data, then do the average. For example
R=transmission("R");
T=transmission("T");
form=1-mean(R)-mean(T);
Please note that in Optimization script, only limited script commands can be functional. You may try to get the data in "model", and in the Optimization you pick up the FOM from "model".
• rvpandohie
Subscriber
Thank you! While this makes sense, I'm not exactly sure how to get the mean of reflection and transmission from "model" itself. I have the monitors set up to record the data but I am not sure how to get the average within "model" in order to feed that data into the optimization script.
• Guilin Sun
Ansys Employee
Please add the above scripts in "model" of analysis script, and output FOM. Then in Optimization you choose the the output of the FOM in "model". Please try to test in a fewer generation and generation size and make sure it works. If not, please give screenshots here.