How to setup variables for sweep or optimization?



I have a basic question about setting up variables. I would like to optimize a device by maximizing abs(S21)^2. However, I don’t know how to set abs(S21)^2 as a figure of merit. The S-parameter I can set up in the optimization window is ::model:EME:user s-matrix. I tried to search for some tutorial online, but I couldn’t find anything that is useful. I really appreciate if anyone can show me how to do this.




I think you could try to make use of the “model” analysis script to return the S-parameter you want. Then you should be able to pick this parameter in the Optimization (or sweep) tool in EME.

Similar idea can be applied to set the properties of an object in the “Setup” tab. For example,

setnamed(“EME”, “group spans” , [3e-6;10e-6;4e-6]);