Having problems with python interface (Matlab works.... I think) #289
caglarozdag
started this conversation in
General
Replies: 2 comments 2 replies
-
I haven't tried to run it, but here's a couple observations: Your grid has a different range of values and number of lines between MATLAB and Python. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Your Python data shows S11=0dB, total reflecion. Now you can look at the S11 phase to see if there is a short or open circuit. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First of all, let me start by saying my sincere gratitude to this wonderful community. I hope to one day master the control of openEMS but I'm not there yet. Probably I am making super silly mistakes. I've been working on this code for weeks and not getting anywhere.
Summary of situation: I wrote/modified a Matlab script that simulates a 4 port differential transmission line in SKY130. In the code I am sharing I only excited port1, so the whole 4x4 sp matrix is a little bit made up :) but S11,12,13,14 should be correct (I think).
I attached the sp results, which passes my sanity checks.
I am trying to move away from Matlab and purely work in Python. This is partially a learning exercise for me to learn Python as well. I tried to "mimic" my Matlab script in Python..... had to debug certain parts with LLMs when I got super stuck, so hopefully it is not too terrible. Basically, the simulation runs, but the sp results are nonsense (also attached below)
I checked out the port_it1 and port_ut1 files, hoping I can get some insight... seems like in python the it file peaks at like thousands of times smaller magnitude than the matlab it file.... so I think my port is simply not excited properly. Don't want to bias everyone... but this is my suspicion.
I am also sharing the 3D view of the tline i'm trying to simulate Matlab and python visuals looks very similar.... Happy to share any more details you'd like.
If anyone is kind enough to rerun my code (attached as debug_package.zip), in python script see lines 6 and 7 for the CSXCAD and openEMS package locations and in Matlab script see lines 9 and 10 for the same (and also make sure write_touchstone.m in the same folder).
Thanks a ton in advance.
debug_package.zip
Beta Was this translation helpful? Give feedback.
All reactions