2
\$\begingroup\$

I was designing a circuit, when I noticed some unexpected behaviour regarding \$V_{GS}\$ of the PMOS in LTspice XVIII.
I have reduced the circuit in order to point out where the problem lies.
D3 was originally connect to another piece of circuit, but as shown below, the weird behaviour can still be reproduced with an unconnected D3.
Few side notes:

  • For quick reference: the BZX84C10L is a 10V zener
  • The picture rendered a false spacing in the word "ti me", the real equation for
    R1 is R={if(time>2,1G,if(time<1,1G,1u))})

enter image description here

The picture shows 2 simulations.

  • The left simulation is with the unconnected D3.
  • In the right simulation D3 has been 'delete'd.

Why does deleting the unconnected D3 give different simulation results?

\$\endgroup\$
  • 1
    \$\begingroup\$ Not a full answer, but in general SPICE does not like any floating nodes. Remove or tie to ground (via impedance if nessesary). \$\endgroup\$ – winny May 2 at 14:40
  • 1
    \$\begingroup\$ You must have some changed settings in the control panel, because LTspice, normally, will not run the simulation with a floating diode. I cannot reproduce your results because I get singular matrix error. Without the diode, I get your 2nd run. Try resetting to defaults. The simulation should not run. Is that diode actually a subcircuit, with internal grounding? \$\endgroup\$ – a concerned citizen May 2 at 15:07
  • \$\begingroup\$ @aconcernedcitizen In OP I used LTSpice XVIII. When using LTSpice IV on anohter computer, I get this singular matrix error too. Have installed a fresh LTspice XVIII on that computer as well and get same results as OP. Hope there is an easier way instead of checking differences in settings between version 4 and version 18 (if it is really in the settings and not some other piece of code) \$\endgroup\$ – Huisman May 2 at 20:25
2
\$\begingroup\$

The difference in simulation results is due different DC solutions using different methods to find an operating point.

For an unconnected diode, it fails finding an operation point using Direct Newton Iteration.

WARNING: Node NC_02 is floating.

WARNING: Less than two connections to node NC_01. This node is used by D1.
WARNING: Less than two connections to node NC_02. This node is used by D1.
Direct Newton iteration failed to find .op point. (Use ".option noopiter" to skip.)

When deleting this unconnected diode, it succeeds finding the DC operation point with Direct Newton Iteration.

For an unconnected resistor (with a given value), it also succeeds finding an operation point with Direct Newton Iteration.

WARNING: Node NC_02 is floating.

WARNING: Less than two connections to node NC_01. This node is used by R1.
WARNING: Less than two connections to node NC_02. This node is used by R1.
Direct Newton iteration for .op point succeeded.

Conclusion
Having unconnected components in your circuit will not give direct errors or warnings in LTspice XVIII (only warnings in the Spice error logs), but may end up in complete different simulation results.

\$\endgroup\$
0
\$\begingroup\$

Take a look at the actual SPICE netlist for the circuit, with D3 present. Make sure that the terminals of the diode have not accidentally been given node names that are the same as other nodes in the circuit, such that D3 is implicitly connected.

\$\endgroup\$
  • 1
    \$\begingroup\$ The netlist with D3 shows the line D3 NC_01 NC_02 1N4148. So, no hidden implicit connection. \$\endgroup\$ – Huisman May 2 at 13:42
0
\$\begingroup\$

Try and solve a circuit with a system of equations in matrix. Then introduce two nodes that are only connected by resistance, the solution will be undetermined because there will be two equations that look like this:

V1 = IR
V2 = I
R

and no other equations to determine V1 or V2.

You won't be able to solve for those voltages and a SPICE package won't either.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.