Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S-parameter File Handling Observation #1075

Open
tomhajjar opened this issue Nov 18, 2024 · 5 comments
Open

S-parameter File Handling Observation #1075

tomhajjar opened this issue Nov 18, 2024 · 5 comments

Comments

@tomhajjar
Copy link

tomhajjar commented Nov 18, 2024

@ra3xdh @transmitterdan

For a Mini Circuits ADQ_22+ Hybrid coupler I was comparing how Qucs-S makes a sub-circuit from the S-parameter file versus how S2spice makes a netlist from the S-parameter file. Mini Circuits says the device needs a ground reference.

S2spice makes a netlist from the S-parameter file with 4-ports and a ground resulting in a sub-circuit with a ground.
Qucs-S makes a sub-circuit from the S-parameter file with 4-ports BUT without a ground.

Both sub-circuits work but if the ground is removed from the sub-circuit created from the S2spice created netlist, it doesn't work.

2024-11-18_113043
2024-11-18_113001

S-parameter_files_ngspice_prj.zip

@tomhajjar
Copy link
Author

tomhajjar commented Nov 19, 2024

@ra3xdh

Here is another example of a "missing" Reference ground. It makes a 1/2-port device look odd without a ground.

This ONLY happens when Qucs-S converts a S-parameter file to a sub-circuit for ngspice. It doesn't happen when S2spice externally does the conversion or when when Qucs-S is using qucsator-rf.

2024-11-19_163601
2024-11-19_163544

ADL5536_RF_Amp_prj.zip

@tomhajjar
Copy link
Author

tomhajjar commented Nov 19, 2024

Here is a S-parameter file project made for qucsator-rf.

When Qucs-S is in "Qucsator mode", a 2-port S-parameter file whether placed into the schematic directly or made into a sub-circuit will ALWAYS have 2-ports plus the 3rd Reference port. Circuit will not work without Ref connected to ground.

When Qucs-S is in "ngspice mode" a 2-port S-parameter file placed directly into the schematic will ONLY have 2-ports.
A 2-port S-parameter file converted by S2spice will have 2-ports PLUS the 3rd Reference port.

S-parameter_files_qucs_prj.zip

@transmitterdan
Copy link

I decided to make S2spice use the "reference" port because sometimes you may want that reference to be something other than "ground". Others have decided to force the reference of each port to be node 0 (aka "ground") so they don't require you to connect it on your schematic. But the connection is there just hidden inside the subcircuit. I felt this was overly restrictive.

If one were to be pedantic, every port should have 2 terminals (v+ & v-) since S-parameters assume that is the case. However, very few practical circuits actually have the references for all ports floating. That would make the schematic symbol larger and require numerous ground connections to be made to every port.

If you think there is something wrong with how S2spice works, please explain because when I read your messages, I don't see a specific action suggested.

@tomhajjar
Copy link
Author

No actions for now.

I was making an observation that Qucs-S handles S-parameter files differently for ngspice than it does for qucsator or how S2spice handles it. Some might be confused that there is no gnd/ref. It will also preclude connecting an impedance to the ref port.

@tomhajjar
Copy link
Author

@ra3xdh @transmitterdan

Would adding User selectability be a major change? The device could default to no Ref unless the User makes a change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants