PySpice-org / PySpice

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

RingModulator.py example not working: inductor "has an incomplete set of K couplings" #196

Open KestutisMa opened 4 years ago

KestutisMa commented 4 years ago

Environment (OS, Python version, PySpice version, simulator)

Arch Linux, Python 3.8.2, PySpice 1.3.2

Steps to reproduce the behaviour

Example from https://pyspice.fabrice-salvaire.fr/examples/diode/ring-modulator.html not working

Error:

2020-04-29 08:41:33,652 - PySpice.Spice.NgSpice.Shared.NgSpiceShared.new_instance - INFO - New instance for id 0
2020-04-29 08:41:33,701 - PySpice.Spice.NgSpice.Shared.NgSpiceShared._init_ngspice - WARNING - Unsupported Ngspice version 31
2020-04-29 08:41:33,709 - PySpice.Spice.NgSpice.Shared.NgSpiceShared._send_char - ERROR - The Inductive System consisting of
2020-04-29 08:41:33,709 - PySpice.Spice.NgSpice.Shared.NgSpiceShared._send_char - ERROR - l.xring_modulator.linput_top l.xring_modulator.linput l.xring_modulator.linput_bottom
2020-04-29 08:41:33,709 - PySpice.Spice.NgSpice.Shared.NgSpiceShared._send_char - ERROR - k.xring_modulator.kinput_top k.xring_modulator.kinput_bottom
2020-04-29 08:41:33,709 - PySpice.Spice.NgSpice.Shared.NgSpiceShared._send_char - ERROR - is not positive definite
2020-04-29 08:41:33,709 - PySpice.Spice.NgSpice.Shared.NgSpiceShared._send_char - ERROR - has an incomplete set of K couplings, (missing ones are implicitly 0)
2020-04-29 08:41:33,709 - PySpice.Spice.NgSpice.Shared.NgSpiceShared._send_char - ERROR - The Inductive System consisting of
2020-04-29 08:41:33,709 - PySpice.Spice.NgSpice.Shared.NgSpiceShared._send_char - ERROR - l.xring_modulator.loutput_top l.xring_modulator.loutput l.xring_modulator.loutput_bottom
2020-04-29 08:41:33,709 - PySpice.Spice.NgSpice.Shared.NgSpiceShared._send_char - ERROR - k.xring_modulator.koutput_top k.xring_modulator.koutput_bottom
2020-04-29 08:41:33,710 - PySpice.Spice.NgSpice.Shared.NgSpiceShared._send_char - ERROR - is not positive definite
2020-04-29 08:41:33,710 - PySpice.Spice.NgSpice.Shared.NgSpiceShared._send_char - ERROR - has an incomplete set of K couplings, (missing ones are implicitly 0)

That may be related https://forum.kicad.info/t/something-wrong-with-coupled-inductors/15224/7

FabriceSalvaire commented 4 years ago

something is wrong, must ask ngspice expert