S-parameter phase extraction


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:

  1. 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?)
  2. The specified order is propagated to the origin (forward or backwards, depending on input argument)
  3. 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:

  1. 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??
  2. 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?


Hello @msemple,

Thanks for posting and welcome to the community. Could you clarify what you mean by the de-embed the phase? The s-parameter is a complex valued, and the angle describes the meta-material phase contribution. It requires knowing the span of the meta-material for precisely this reason.

I think there are several phase contributions with a meta-surface. Are your looking for the polarization specific delay, the geometric delay, or the delay from some reference value? Could you use a point time monitor and compare the fields measure after the surface and then get a control by disabling the metasurface and measuring the fields.


Hi @trobertson ,

Thank you for your reply. I’m looking to measure the overall phase delay imparted to the reflected and transmitted plane waves, effectively the phase difference between the input and output waves at the metamaterial surface. The s-parameter analysis group comments use “roll back the phase” in the same way that I mean de-embed. It comes down to multiplying the s-parameter by exp(+/-gamma_z*z) to forward or back-propagate the plane wave to the surface.