TAGGED: interconnect, sparametermatrix, script


July 22, 2024 at 7:50 pmCamille DuclosBbp_participant
Dear all,
I am working on Lumerical and InterConnect as part of my internship. My goal is to extract the S parameters from a structure on Lumerical then implement them in a scripted element on InterConnect in order to be able to build more complex circuits with correct simulation times. At first, I stored the frequency, amplitude and phase on a .txt file to use them on a scripted element. This worked great with the setsparameter function and the "transmission" option. But my new objective is to extract the coefficients representing the functions which are formed by the parameters S. For this I also want to use the setsparameter function with the “s coefficient” option. (setsparameter("output_port", "mode_label", output_mode_ID, "input_port", input_mode_ID, "s coefficient", coeff, frequency) _ https://optics.ansys.com/hc/enus/articles/360034407774setsparameter scriptcommand )
Only I don't understand what exactly to put in the coeff matrix.
Here is the example of a structure I am working on: a simple waveguide.
When I used the "transmit" function of the setsparameter function, I stored the frequency, amplitude, and phase of the Port1.b/Port1.a (S11) and Port2.a/Port1.a (S21) ratio.
Now, with the “s parameter” option if I understand the explanation correctly:
(“Sets the sparameter between "output_port" and "input_port", using 's' domain coefficients. coeff is a matrix with 2 columns: complex numerators and complex denominators. The number of rows of the matrix is the number of coefficients points. If the number of numerators is different from the number of denominators, set the missing values to zero. frequency is the center frequency of the transmission described by the coefficients. " and "input_mode_ID" are numbers (i.e., 1, 2, 3...).)
I must create a matrix with the first column, the coefficients of the function representing the data of Port1.b or Port2.a for the column of numerator complexes and Port1.a in the second column for the column of denominator complexes? This is what I have tried, among other things, until now. I store the S parameter data in a txt file with Lumerical. Then I use the polyfit function of MATLAB to separately extract the coefficients of the real part and the imaginary part of the denominator and numerator column.
Here is an example of what I get from MATLAB in the form of a file. txt:
Then I manually fill the coeff matrix on Interconnect with these coefficients.
Or should I only keep the real or imaginary part of the coefficients? I tried several cases including the very first case cited but I did not get the expected results at all and despite the tests, I cannot understand how to use the function with the “s parameter” option.
Hoping someone can help me!
Thank you for your time!
Camille D.

July 24, 2024 at 6:35 pmKyleAnsys Employee
Hello, it sounds like you should use the "s coefficients" option, not the "s parameter" option. The "s parameter" option is used when directly specifying the S parameters as a function of frequency. The "s coefficients" option is used when writing the S parameters as a ratio of polynomials. You can use complex parameters with the "s coefficients" option. You also might need to change the order of the parameters in your matrix.

July 25, 2024 at 9:31 amCamille DuclosBbp_participant
Good morning,
This is a mistake on my part, I meant “s coefficients”. I understood a little more how to use the setsparameter function but I can't understand what form of the function is expected
If I understood correctly, the setsparameter function with the “s coefficients” option expects a function of the form A.z +B + C/z +D/z^2… and we must put in the trans matrix, the coefficients in the following order:
trans (1,1)=A;
trans(2,1)=B;
trans(3,1)=C;
trans(4,1)=D;
trans(1,2)=0;
trans(2,2)=1;
trans(3,2)=0;
trans(4,2)=0;
And to use the setsparameter function with the “coefficients” option, we are supposed to fill the matrix in the same way, right?
And, isn’t it possible to use a polynomial function of the form E*f^2+F*f^1+G for example ?
Finally, to be sure, z corresponds to the frequency or to 2*pi*frequency?
Thank you very much !

July 30, 2024 at 12:24 amKyleAnsys Employee
Hello, the "s coefficients" option uses a ratio of two polynomials where each coefficient corresponds to a descending power of "s", for example (A*s^2 + B*s + C)/(D*s^2 + E*s + F). For this function the matrix would have A,B,C in the first column and D,E,F in the second column. If you want to make a function of the form A*s^2 + B*s + C you can set D=E=0 and F=1. The "coefficients" option works the same way.
The "s" corresponds to 2*pi*f*i. The negative sign comes from the sign convention Lumerical uses for the Fourier transform (the "physics" convention).

July 31, 2024 at 8:21 amCamille DuclosBbp_participant
Hello,
thank you for you answer!
Regards,
Camille.

 You must be logged in to reply to this topic.
 Ansys Insight：使用Checkpoint继续仿真被迫中断或已经仿真结束的文件
 怎么修改生成远场图片的横纵坐标以及坐标标签的字体大小
 INTERCONNECT – No results unless rerun simulation until it gives any
 EME得到的S参数与监视器结果不一致的问题
 如何直观计算3db带宽
 INTERCONNECT – obtain power output over time & check for SNR
 varFDTD半导体激光器建模方向及反射率设置问题
 Inverse Design Freezing Issue
 Calculation of correlation values in laser modulation bandwidth simulation

421

192

178

162

140
© 2024 Copyright ANSYS, Inc. All rights reserved.