Using macromodels provided by electronic component manufacturers with Xyce

64 views
Skip to first unread message

Vlad Ivanov

unread,
Oct 9, 2015, 12:58:11 PM10/9/15
to xyce-users
Hello,

first of all, thank you for keeping this project open source, Xyce appears to be the most feature-rich free and open-source spice simulator available.

I'm trying to use Xyce with a model of an operational amplifier provided by Texas Instruments (OPA625) (in fact, I plan to use more models by TI and other manufacturers, but this would be good for start too). Xyce seems to successfully simulate the circuit, but the simulation results differ from results obtained with another (commercial) simulator.

The model is claimed to be compatible with Orcad PSPICE 16. After a minor changes in syntax, it is possible to get in working in TINA as well — so it works with at least two SPICE simulators. The same opamp circuit doesn't work with Xyce.
  1. Xyce seems to be able to perform a transient analysis on the circuit. Does this mean the syntax parsing stage has been passed successfully? I'm a bit unsure about this because of warnings produced (log: http://pastebin.com/PHTqXvvE)
  2. What steps could be performed in order to narrow down the possible problem causes? I understand that Xyce can't be fully compatible with all commercial SPICE simulators, but it would be good to have the existing compatibility improved.
vlad:~$ /opt/xyce-6.3/install/bin/Xyce -v
Release 6.3-opensource


Please find the following files attached:
  1. an example circuit with OPA625
  2. a screenshot of the example circuit being simulated by two simulators: TINA-TI (under Wine, on the left) and Xyce (on the right)

Regards,


Vlad

Screenshot from 2015-10-08 00:23:24.png
xyce-test.cir
opa625.txt

xyce-users

unread,
Oct 9, 2015, 3:51:24 PM10/9/15
to xyce-users

Vlad: 

Thank you very much for the detailed and carefully documented question.  Unfortunately, I have not yet tracked down the issues with this circuit, but wanted to let you know where it stands.  For starters, I can definitely reproduce your results exactly.  I do not yet understand why.

I have reviewed the circuit and see one issue that has been a common problem for users of Xyce:  Xyce's capacitor handles its "IC=" initial conditions very differently from the way other simulators do, and setting IC=0 on any capacitor is almost a guarantee of an incorrect operating point (or at least other-than-intended operating point:  it means we treat the capacitor as having a zero voltage drop across it at the operating point, and make sure that a consistent steady state solution is found with this condition enforced).  An undesired initial steady state solution would naturally lead to incorrect transient simulation, too.

Unfortunately, commenting out the IC=0 on all the capacitors causes this circuit to FAIL the operating point computation, which is often a sign that there is some internal inconsistency at the operating point that prevents convergence.  This would normally be something that one could solve by putting a ".IC (capacitor's positive node) 0" line into the circuit, but an open bug makes .IC statements inside subcircuits not work properly.  In order to set the initial conditions in this way, it is necessary to set them at the top level of the circuit using the detailed subcircuit path to each node.  While this does work, it is both inconvenient *AND* not the whole problem with the circuit, which behaves just as badly even when the ICs are set "our" way.  For what it's worth, that open bug is being addressed, but unlikely to be fixed by the time we freeze for Release 6.4 in a few weeks. 

I wish I had a simpler answer for you (or any real answer at all).  I am still trying to find other issues and will let you know if I come up with anything else. 

Vlad Ivanov

unread,
Oct 9, 2015, 4:39:23 PM10/9/15
to xyce-users, xyce-...@googlegroups.com
Thank you for the answer and the thorough description of the problem! I'll keep track of Xyce releases and changelogs then.

пятница, 9 октября 2015 г., 22:51:24 UTC+3 пользователь xyce-users написал:
Reply all
Reply to author
Forward
0 new messages