Unexplained Mixed-Mode <-> Single End Behaviour 1

88 views
Skip to first unread message

Denz Choe

unread,
Apr 27, 2021, 2:09:25 AMApr 27
to scikit-rf
Hi Scikit-RF Community,


This issue has been raised in github before and is now presently closed

I intend to bring this up in this page, to gain a better understanding of this and maybe past / future users can contribute to their observations
I have initially written a script for mode conversion after EM Simulating a Differential structure. The Mixed-Mode(MM) touchstone file is the output of the EM Simulation. I bumped into a strange behaviour every-time I reconvert it back to its original form (MM -> SE -> MM).
Thus I proceeded to write a test code to check for Multi-Mode Conversion errors and by accident I have discovered a 180 degree phase shift every time a mode conversion is done from SE -> MM. It was also discovered by Jackson.

By comparison I have decided to try this on MATLAB, and it looks like MATLAB RF Toolbox's mode conversion API couldn't reproduce the 180 degree phase shift.


Scikit-RF Script:
Level 0, Original Single Ended (k0) -> Level 1, Mixed-Mode (k1) -> Level 1, Single Ended (k1) -> Level 2, Mixed-Mode (k2) 
<Results Summary>
S21 Phase begins at 0 to -180 -> S21 Phase begins at 0 to -180 -> S21 Phase begins at -180 to -360 -> S21 Phase begins at +180 to 0


MATLAB Script:
Level 0, Original Single Ended (k0) -> Level 1, Mixed-Mode (k1) -> Level 1, Single Ended (k1) -> Level 2, Mixed-Mode (k2) 
<Results Summary>
S21 Phase begins at 0 to -180 -> S21 Phase begins at 0 to -180 -> S21 Phase begins at 0 to -180 -> S21 Phase begins at 0 to -180


The figures below will help illustrate the outputs of the conversion.

Compare Original VS 1st Level Converted SE.jpg


Compare 1st & 2nd Level Converted MM.jpg

Randomly picking the Real and Imaginary array information of the S-Parameters, we can see that the difference after each 1.5 cycle of mode conversion (SE->MM->SE), scikit-rf generates an equal magnitude but opposite in polarity in the results. It is not seen on MATLAB though

Compare Sign Notations of 1st & 2nd Level Converted MM
k1_mm_Nwk.s[1000,0,0]:
 (0.0012857556997388233+0.0028259480455562836j)
k2_mm_Nwk.s[1000,0,0]:
 (-0.0012857556997384297-0.0028259480455561374j)
mat1_mm_Nwk.s[1000,0,0]:
 (0.001285755699738621+0.0028259480455562133j)
mat2_mm_Nwk.s[1000,0,0]:
 (0.001285755699738641+0.0028259480455562133j)

Compare Sign Notations of Original VS 1st Level Converted SE
k1_se_Nwk.s[1000,0,0]:
 (-0.08530206766881694-0.11238291087729485j)
mat1_se_Nwk.s[1000,0,0]:
 (0.08530206766881697+0.11238291087729482j)
original_se_Nwk.s[1000,0,0]:
 (0.08530206766881694+0.11238291087729484j)

As to how will this impact anyone in the future?
It only affects you if you are transforming from MM -> SE.
If we were to transform the differential DUT from Frequency domain to Time Domain via TDR and TDT; you obtain the following output. 
TDR of original_se_Nwk: shows a capacitive feed at the beginning of the trace
TDR of k1_se_Nwk: shows a false-inductive feed at the beginning of the trace
TDT of original_se_Nwk: shows a Positive Voltage response at 1.03 ns
TDT of k1_se_Nwk: shows a false-Negative Voltage response at 1.03 ns

TDR_TDT_Output.jpg


The temporary solution to the problem for MM -> SE?
Perform 2 cycles of Mode Conversions to obtain the correct result. 
[MM(original phase info) -> SE(incorrect phase info) -> MM(incorrect phase info) -> SE(corrected phase info)]


I'm enclosing the Python, MATLAB scripts, & Touchstone files for your usage

Jackson Anderson

unread,
May 4, 2021, 12:01:08 PMMay 4
to scikit-rf
Hello Denz Choe,

Thanks for your insight on this issue and your work in helping to track down what is happening. In the meantime, thank you for sharing your workaround. I have reopened the Github issue and posted the workaround there for anyone who does not subscribe to the mailing list. Also - nice Matlab GUI! If you ever want to dip your toes into web-based GUIs with scikit-rf/python, check out the dash-apps repo. Matlab GUIs are definitely easier to prototype, but Dash is pretty good for production-scale front ends if that is something that is ever of interest to you.

Cheers,
Jackson

Denz Choe

unread,
Jul 27, 2021, 10:25:04 PMJul 27
to scikit-rf
Hi Jackson,

Apologies for the late reply.
MATLAB GUI was actually developed by @Davi Correia ; and shared to the attendees of the Bootcamp at DesignCon 2019.
I supposed the codes are free for our use. I can share them if you like, or if you want it for dash-apps.

Just one thing, how do you use dash-apps for scikit? I actually don't understand it. Is there a guide? 

Jackson Anderson

unread,
Jul 28, 2021, 10:25:16 AMJul 28
to scikit-rf
Hey,

I don't think there are setup instructions anywhere in the skrf specifically, but the general process for Dash apps is to run the file that contains app.run_server() (for the viewer that is in dash-apps/SNaP/snap/index.py). This will start a local webserver that you can connect to in the browser on your PC. Then once development is complete, you can move the app to a production webserver and your whole department can use it in their browsers without having to install anything. Both of those examples use a browser upload feature which, depending on your browser of choice, is something like 5-20 MB and may limit the size of files you can view. A better way to do it for a production environment would be to connect directly to the data on a server/in a database so that it never had to pass through the browser front-end and only the plot/GUI updates have to go to the user.

In case you want to see if they might be useful first, here are the demo apps hosted on the web by plotly:



Cheers,
Jackson

lol yoy

unread,
Aug 8, 2021, 11:21:02 PMAug 8
to scikit-rf
Hi kinkha
I want to try the cool GUI, would you please share it? Many thanks!

Best regards,
Terry Ho

Denz Choe

unread,
Aug 9, 2021, 1:53:17 AMAug 9
to scikit-rf
Hi Terry,


Here is the compiled version of GUI.

Just follow the instructions to download the appropriate MATLAB runtime to run the .exe file.
If I can recall correctly, it should be R2019a



Regards,
Denz


lol yoy

unread,
Aug 9, 2021, 2:43:19 AMAug 9
to scikit-rf
Hi Denz,

Received, thank you!

Best regards,
Terry Ho 

Reply all
Reply to author
Forward
0 new messages