PySpice-org / PySpice

Simulate electronic circuit using Python and the Ngspice / Xyce simulators
https://pyspice.fabrice-salvaire.fr
GNU General Public License v3.0
661 stars 174 forks source link

Scattering Parameters #319

Open GleidsonLeite opened 2 years ago

GleidsonLeite commented 2 years ago

How can i extract S-parameters using PySpice? Is there any example to do that?

matthuszagh commented 2 years ago

It appears that s-parameter analysis is coming to ngspice. Once that's in stable, I expect it wouldn't be too much work to get this into pyspice.

If you don't want to wait for that you can always create something yourself. You'll need some sort of signal separation device. I'd probably look at the Wenzel low-frequency circulator and use ideal opamps so you're not bandwidth-limited. Worth also noting that a lot of people use other tools than spice for RF simulation (e.g., QUCS) or a proper EM simulator (openems and meep are open-source options, but they carry pretty steep learning curves).

matthuszagh commented 2 years ago

Now released. Maybe we turn this into a feature request to update to ngspice 37 and add support for SP simulation?