I’m working on a simple 2D metasurface simulation, and I’d like to get the phase contribution of the metasurface to the overall S11 and S21 through Python. I’ve found that the default analysis group doesn’t have all the options I need, and the S-parameter extraction code has several correction factors that I have difficulty understanding. I’d be happy to use the grating functions to extract the relevant data, then de-embed the phase myself in Python if I could figure out exactly how much phase to remove.
Can anyone explain where they all come from, or perhaps instead give me a more detailed explanation of how the “grating” functions work?
I think what’s happening in the grating function is as follows:
- The fields on the monitor are projected onto a plane wave basis of the diffraction orders supported by the geometry and input direction (How is this done numerically?)
- The specified order is propagated to the origin (forward or backwards, depending on input argument)
- A far-field transformation is performed to an arbitrary 1m
So to de-embed the phase (e.g. reflection), I need to do the following:
- Input wave:
a. Apply the grating function to the input wave (measured at the reflection monitor but traveling forward)
b. Add 1m of phase to propagate the wave back to the origin (surface-normal direction)
c. Remove phase from the origin to my object surface (or the input port for full S11 phase, incidence angle direction) ***I believe this is not done in the analysis group code, and instead borrows the output angle from the desired diffraction order??
- Output wave:
a. Apply the grating function to the desired output wave (measured at the reflection monitor but traveling backwards)
b. Remove 1m of phase to propagate the wave back to the origin (surface-normal direction)
c. Remove phase from the origin to my object surface (diffracted wave propagation direction)
d. (possibly) Add in a 180 degree phase shift due to reflection polarization convention for P-polarization
There is also a random 90-degree phase shift added that eventually divides out?